Skip to content

Conversation

@huchenlei
Copy link

@huchenlei huchenlei commented Jan 16, 2025

Summary

This RFC proposes adding support for variable-length inputs in ComfyUI nodes, allowing a single node to accept a dynamic number of inputs. The feature introduces a new var_length input type configuration that enables nodes to handle multiple inputs through either socket connections or widget inputs, with configurable minimum and maximum input counts. This eliminates the need for multiple fixed-input node variants or chained node connections, resulting in cleaner workflows and more maintainable code.

Links


Important: Do NOT comment on this PR. Please use the discussion thread linked above to provide feedback, as it provides branched discussions that are easier to follow. This also makes the edit history of the PR clearer.

@github-actions github-actions bot added pending When the RFC is still in comments phase rfc labels Jan 16, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2025
@huchenlei
Copy link
Author

huchenlei commented Apr 30, 2025

Note: 2025-04-29

Implementation scoping:

Backend change

Detect the connection groups, e.g. cond_1, cond_2, ..., and compress them into a single list/tuple before binding to node func args.

Frontend change

When configuring node, the var length inputs need to be properly detected and mapped. Ref: https://github.com/Comfy-Org/ComfyUI_frontend/blob/df723b56dab789bd0e9302c8793e73a4b658a1c0/src/services/litegraphService.ts#L231

Multiple var length arg should be supported.

@christian-byrne christian-byrne added active when an RFC is accepted and undergoing implementation. The feature may be shipped as experimental and removed pending When the RFC is still in comments phase labels Jun 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

active when an RFC is accepted and undergoing implementation. The feature may be shipped as experimental rfc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants