Skip to content

Remove useless group argument from desc.Node attributes#43

Merged
demoulinv merged 2 commits intomainfrom
copilot/remove-group-argument-nodes
Mar 10, 2026
Merged

Remove useless group argument from desc.Node attributes#43
demoulinv merged 2 commits intomainfrom
copilot/remove-group-argument-nodes

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 9, 2026

group on attributes is only meaningful for desc.CommandLineNode (used to construct CLI argument groups). All nodes in this repo extend desc.Node, making every group= declaration a no-op.

Changes

  • All node files — remove group="" from input/output attribute definitions across all 9 nodes (ImageBiRefNetMatting, ImageDetectionPrompt, ImageSegmentationBox, ImageSegmentationPrompt, ImageSegmentationSam3, ImageTagsExtraction, SDMatte, VideoSegmentationSam3, VideoSegmentationSam3Text)

  • FilterMasks.py — remove group="opt" from the 5 optional filter parameters (kernel_size, kernel_shape, iterations, use_of, smoothing_strength) and replace the runtime introspection that relied on it with an explicit parameter name list:

# Before — abused group= as a runtime tag
for a in chunk.node.attributes:
    if a.desc.group == 'opt':
        kargs[a.name] = a.value

# After — explicit list
optParams = ['kernel_size', 'kernel_shape', 'iterations', 'use_of', 'smoothing_strength']
for a in chunk.node.attributes:
    if a.name in optParams:
        kargs[a.name] = a.value

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Remove group argument for attributes in Nodes Remove useless group argument from desc.Node attributes Mar 9, 2026
@fabiencastan fabiencastan marked this pull request as ready for review March 9, 2026 13:21
@fabiencastan fabiencastan requested a review from demoulinv March 9, 2026 13:21
Copilot AI and others added 2 commits March 10, 2026 08:26
Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
@demoulinv demoulinv force-pushed the copilot/remove-group-argument-nodes branch from 3aac673 to 28fa67d Compare March 10, 2026 07:26
@demoulinv demoulinv merged commit d406eda into main Mar 10, 2026
@demoulinv demoulinv deleted the copilot/remove-group-argument-nodes branch March 10, 2026 07:27
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.

3 participants