Fix deprecated flag not propagating to schema for dataset/text nodes - #15442
Open
claude[bot] wants to merge 2 commits into
Open
Fix deprecated flag not propagating to schema for dataset/text nodes#15442claude[bot] wants to merge 2 commits into
claude[bot] wants to merge 2 commits into
Conversation
ImageProcessingNode and TextProcessingNode set is_deprecated as a class attribute but never forwarded it into the io.Schema built by their shared define_schema(), so /object_info reported deprecated: false for nodes like ResizeImagesByShorterEdgeNode, TextToLowercaseNode, and ReplaceTextNode despite is_deprecated = True on the class. The frontend's hide-deprecated filter reads the schema, not the class attribute, so these nodes kept showing up in search. Forward cls.is_deprecated into io.Schema(...) in both base classes, same as SaveImageDataSetToFolderNode already does directly. Adds a regression test asserting schema.is_deprecated matches the class flag for every dataset node.
claude
Bot
requested review from
Kosinkadink,
alexisrolland,
comfyanonymous,
guill,
kijai and
rattus128
as code owners
August 9, 2026 06:55
alexisrolland
approved these changes
Aug 9, 2026
alexisrolland
approved these changes
Aug 9, 2026
alexisrolland
self-requested a review
August 9, 2026 15:50
alexisrolland
approved these changes
Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Christian Byrne · Slack thread
What broke
Several nodes in
comfy_extras/nodes_dataset.pywere markedis_deprecated = Trueat the Python class level (added in #14002), but/object_infostill reporteddeprecated: falsefor them. Since the frontend's "hide deprecated nodes" search filter reads/object_info, these nodes kept showing up in node search even with the filter on.Why
These nodes are built on two shared base classes,
ImageProcessingNodeandTextProcessingNode, which readcls.is_deprecatedas a class attribute but never passed it into theio.Schema(...)object their shareddefine_schema()constructs and returns./object_info(and therefore the frontend filter) is derived entirely from that schema, so the class attribute was silently ignored.SaveImageDataSetToFolderNodein the same file builds its schema directly rather than through a base class and already passesis_deprecated=Trueinline, which is why it wasn't affected and served as the reference pattern for the fix.Fix
Forward
cls.is_deprecatedinto theio.Schema(...)returned byImageProcessingNode.define_schema()andTextProcessingNode.define_schema(), matching howSaveImageDataSetToFolderNodealready does it. This is a two-line change and fixes every affected subclass at once:ResizeImagesByShorterEdgeNodeResizeImagesByLongerEdgeNodeMergeImageListsNodeTextToLowercaseNodeTextToUppercaseNodeAddTextPrefixNodeAddTextSuffixNodeReplaceTextNodeStripWhitespaceNodeMergeTextListsNodeI also grepped the rest of the codebase for the same pattern (a class-level
is_deprecated/deprecatedflag that never reachesio.Schema(...)) and found no other instances — every otheris_deprecated=Trueusage incomfy_api_nodes/andcomfy_extras/is already passed directly into theio.Schema(...)call, and theDEPRECATED = Trueattributes innodes.pybelong to the legacy V1 node system, which reads that attribute directly rather than through a schema.Tests
There was no existing coverage for this class of bug. Added
tests-unit/comfy_extras_test/nodes_dataset_test.pywith two tests: one that walks every node class innodes_dataset.pyand assertsdefine_schema().is_deprecatedmatches the class-levelis_deprecatedflag wherever that attribute is declared, and one that explicitly asserts the previously-broken nodes now reportdeprecated: truein their schema. Verified both tests fail against the pre-fix code and pass with the fix applied.Ran
pytest tests-unit/comfy_extras_test/nodes_dataset_test.pyandruff checkon the changed files, both clean. Also added a short note toAGENTS.mdunder "Nodes and User-Facing Behavior" warning thatis_deprecated/similar class-level flags on V3 nodes must be forwarded into the schema built indefine_schema().Generated by Claude Code