ComfyUI_frontend icon indicating copy to clipboard operation
ComfyUI_frontend copied to clipboard

[Feature Request]: Improve Group Node UX with Subgraphs

Open ronan36880 opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

This change would make editing and working with group nodes much easier. This is something that apparently has been discussed a lot in the past, and seeing that the frontend can evolve much faster (and better!) now, I think it would be a good idea to bring it up again.

Proposed workflow

I don't think I would do it justice to propose a workflow for this. Instead, having a read through this issue and through some of the issues brought up in this comment should provide a lot of context on previous discussions on this.

Additional information

No response

ronan36880 avatar Oct 03 '24 10:10 ronan36880

Now that this PR is merged ( https://github.com/comfyanonymous/ComfyUI/pull/2666 ), it should be easier to implement subgraphs, right ?

There is already an extension for Subgraph nodes: https://github.com/vivax3794/ComfyUI-Sub-Nodes

But I think a feature as important as this, should be in the core.

JorgeR81 avatar Oct 03 '24 10:10 JorgeR81

Now that this PR is merged ( comfyanonymous/ComfyUI#2666 ), it should be easier to implement subgraphs, right ?

There is already an extension for Subgraph nodes: https://github.com/vivax3794/ComfyUI-Sub-Nodes

But I think a feature as important as this, should be in the core.

It looks similar to blender's nodegroup, which is what people want GroupNode.

mijuku233 avatar Oct 04 '24 10:10 mijuku233

It looks similar to blender's nodegroup, which is what people want GroupNode.

I wonder if some of the code used for the current Group Nodes could be reused. Now, we can edit Group Nodes to some extent.

But to add nodes to a Group Node, we need to convert back to nodes; edit the nodes; and then convert to Group Node again.  I'd like to edit the Group Node, like on a regular Comfy UI a workflow, without this process.

JorgeR81 avatar Oct 04 '24 10:10 JorgeR81

Note that this isn't just aesthetic, this could help to discourage the proliferation of node variants. At least for the ones you must install and can't be just exported as JSON itself.

If the core nodes provides a good amount of simple primitives people could just regroup them as needed, instead of needing a custom group that reinvents the wheel just to group functionality in a different way.

In the past I used simulation software for FPGAs that uses graphs similar to the ones used by ComfyUI, the nested nodes was a key feature, I was really surprised when I found it was impossible using ComfyUI.

set-soft avatar Nov 08 '24 12:11 set-soft

Why such an important function has not been paid attention to is really curious.

liulsg avatar Nov 12 '24 09:11 liulsg

Why such an important function has not been paid attention to is really curious.

I guess this is because the developers are happy with the option to collapse various nodes into one. Which is useful, but is much less interesting than supporting nested nodes. Subgraphs allows to edit them, while un/compressing becomes impractical once you defined a nodes layout.

set-soft avatar Nov 12 '24 11:11 set-soft

An RFC for subgraphs has been created: https://github.com/Comfy-Org/rfcs/blob/subgraph/rfcs/0000-subgraph.md

Discussion: https://github.com/Comfy-Org/rfcs/discussions/17

webfiltered avatar Jan 17 '25 05:01 webfiltered

subgraphs are implemented https://blog.comfy.org/p/subgraphs-are-coming-to-comfyui

geroldmeisinger avatar Jun 28 '25 07:06 geroldmeisinger