Skip to content

Fix deprecated flag not propagating to schema for dataset/text nodes - #15442

Open
claude[bot] wants to merge 2 commits into
masterfrom
fix/deprecated-node-schema-propagation
Open

Fix deprecated flag not propagating to schema for dataset/text nodes#15442
claude[bot] wants to merge 2 commits into
masterfrom
fix/deprecated-node-schema-propagation

Conversation

@claude

@claude claude Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Requested by Christian Byrne · Slack thread

What broke

Several nodes in comfy_extras/nodes_dataset.py were marked is_deprecated = True at the Python class level (added in #14002), but /object_info still reported deprecated: false for 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, ImageProcessingNode and TextProcessingNode, which read cls.is_deprecated as a class attribute but never passed it into the io.Schema(...) object their shared define_schema() constructs and returns. /object_info (and therefore the frontend filter) is derived entirely from that schema, so the class attribute was silently ignored. SaveImageDataSetToFolderNode in the same file builds its schema directly rather than through a base class and already passes is_deprecated=True inline, which is why it wasn't affected and served as the reference pattern for the fix.

Fix

Forward cls.is_deprecated into the io.Schema(...) returned by ImageProcessingNode.define_schema() and TextProcessingNode.define_schema(), matching how SaveImageDataSetToFolderNode already does it. This is a two-line change and fixes every affected subclass at once:

  • ResizeImagesByShorterEdgeNode
  • ResizeImagesByLongerEdgeNode
  • MergeImageListsNode
  • TextToLowercaseNode
  • TextToUppercaseNode
  • AddTextPrefixNode
  • AddTextSuffixNode
  • ReplaceTextNode
  • StripWhitespaceNode
  • MergeTextListsNode

I also grepped the rest of the codebase for the same pattern (a class-level is_deprecated/deprecated flag that never reaches io.Schema(...)) and found no other instances — every other is_deprecated=True usage in comfy_api_nodes/ and comfy_extras/ is already passed directly into the io.Schema(...) call, and the DEPRECATED = True attributes in nodes.py belong 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.py with two tests: one that walks every node class in nodes_dataset.py and asserts define_schema().is_deprecated matches the class-level is_deprecated flag wherever that attribute is declared, and one that explicitly asserts the previously-broken nodes now report deprecated: true in 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.py and ruff check on the changed files, both clean. Also added a short note to AGENTS.md under "Nodes and User-Facing Behavior" warning that is_deprecated/similar class-level flags on V3 nodes must be forwarded into the schema built in define_schema().


Generated by Claude Code

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.

@alexisrolland alexisrolland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexisrolland
alexisrolland self-requested a review August 9, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants