Comfy-Org / Comfy-Org/ComfyUI_frontend

[Feature Request]: Allow for primitive types to be widgets on subgraph nodes

Open
#4,189 9 comments 0 reactions 2 assignees Claimed by @christian-byrne View on GitHub
area:subgraph area:widgets enhancement subgraph-v2
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

### Current Progress (close when all are ticked)
- [x] Widgets are added and fully functional (solved with #4429)
- [x] #4399
- [x] #4431 (solved with #4433)
- [ ] Seed widgets spawn the `control_after_generate` widget

### 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 ?

Subgraphs are intended to be the successor to Group Nodes, but let's take a look back at group nodes for a second:

![Image](https://github.com/user-attachments/assets/6bd488c7-6478-4e5b-8a59-f0d852db7d64)

From this combination of a KSampler and a VAE decode, we can see that we have all the widgets we need for the KSampler, giving us a convenient node that outputs an image after taking in a latent and sampling it.

However, let's take a look at how this same thing would look in a subgraph:

![Image](https://github.com/user-attachments/assets/3b03c5db-f40b-445c-af7d-c3f68c206480)

Well, now if we want to modify the parameters of the KSampler, we would have to go into the subgraph. Even if we were to tie one of the inputs to the subgraph's input:

![Image](https://github.com/user-attachments/assets/61342879-08a8-400c-82fb-95a571e37fe7)

The int input for the step count is forced to be an input. We can see here that we have a problem: subgraphs are in some ways less convenient than group nodes because they lack these widgets. And in order to make them just as convenient, and more convenient due to easier node modification, we should allow for the user to choose which values to be a widget.

### Proposed workflow

1. Detect which input parameters on a subgraph are the five primitive types (bool, int, float, string, combo)
2. Allow the user to right click on the subgraph and choose which one of these inputs to turn into a widget on the subgraph node

### Additional information

_No response_

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-4189-Feature-Request-Allow-for-primitive-types-to-be-widgets-on-subgraph-nodes-2136d73d365081228209c4d4bacf7da7) by [Unito](https://www.unito.io)

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.