ComfyUI_frontend icon indicating copy to clipboard operation
ComfyUI_frontend copied to clipboard

[Feature Request]: Make dynamic widgets first class as inputs are

Open StableLlama opened this issue 7 months ago • 1 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 ?

Adding dynamically a new input with addInput is easy. At least when you are happy that it's located at the end.

But when dynamically adding a widget with addWidget() it doesn't have full functionality as Comfy widgets have. It is missing the additional input. To add it you must manually add a input at the same time as #addInputWidget is not exposed.

Proposed workflow

  1. Have code, e.g. in a custom onConnectionsChange that wants to create additional dynamically inputs and widgets.
  2. Add a widget
  3. Wonder that you can't connect a link to it.

Additional information

No response

┆Issue is synchronized with this Notion page by Unito

StableLlama avatar May 21 '25 20:05 StableLlama

Adding an input and a widget is what frontend does internally, right now. When time permits, the plan is for addInput to do the work of both; create inputs, and by default, add widgets if the type is known.

webfiltered avatar May 22 '25 01:05 webfiltered