Comfy-Org / Comfy-Org/ComfyUI

[Feature Request] Group Node editing overhaul.

Open
#2,702 1 comment 16 reactions 0 assignees View on GitHub
User Support
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

This is going to be a lot, so bear with me.

I've recently discovered group nodes and have really appreciated how they function. their ability to clean up workflows and practically create new custom nodes using a purely UI interface makes them incredibly powerful tools. despite this, I feel like they are not currently anywhere near their full potential. there are a lot of minor snags and hitches that make what should be a time saving technique into a frustrating time sink.

My suggestion would be a complete rework of how you interface with grouped nodes. Firstly, I propose to completely get rid of this menu
![image](https://github.com/comfyanonymous/ComfyUI/assets/21179158/16e417d3-f7e6-4a69-8895-df7a60d9446c)
It is a clunky piece of work that just gets more crowded the more complex you try and get with grouped nodes.

in it's place, I suggest that you would replace it's spot on the menu with the option to "enter" a grouped node. Doing this would put you into a new 'sub' workspace which contains the contents of the grouped node. A sub-workspace would have a few key differences to the main workspace

1. all widgets would have a check box to the side which would control whether or not they display in the parent node
2. all unplugged inputs and outputs would have a check box next to them which controls whether or not they get piped out to the parent node
3. all nodes would have a small integer input on the top right hand corner (aligned with the title of the node) defaulted to zero. this would be the "priority" of the node. by default, the parent's input, output, and widget ordering would be sorted how they normally are by default. However, any node can have their priority raised or lowered. higher priority nodes would have their components display lower priority nodes, defaulting to the default ordering when multiple nodes have the same priority.

here is a mock up design of how something like this could look using a KSampler node as example.
![KSampler Sub worflow example](https://github.com/comfyanonymous/ComfyUI/assets/21179158/fbe16e1b-bb4a-4dab-a99e-4a97ffa2ff61)

there would be a button on the bottom left corner of the screen (next to the debug info) that would bring you up out of a grouped node. additionally, there would be a key combo a user could enter to quickly exit a group node. Doing this key combo with a group node selected would allow a user to quickly enter the group node instead.

I would also suggest that the ability to nest group nodes be implemented along-side this feature. I feel like these two go hand in hand, as having a group node represented as a workflow itself would allow another group node to be nested inside of it. Group Node definitions would still remain in the "root" of the workflow json, since these definitions improve upon re-usability and save on space.

I am well aware that something like this is a lot to ask, but I just wanted to write down my thoughts In a github commit so that if one day I, or someone else, wanted to tackle this, they'd have something to reference.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.