Skip to content

[Bug]: widget created dynamically can't be converted as input #3875

@numz

Description

@numz

Frontend Version

Hi,

Image

In previous versions of comfyui_frontend, we could convert a widget as an input even if the widget was dynamically created by the node.

This option has been removed in favor of the automatic conversion method when trying to connect to the input. However, this only works if the nodes have well-defined types (INT, STRING, etc.) in my INPUT_TYPES class.

However, when an input isn't defined in the INPUT_TYPES class (because it's created on the fly by the node), it no longer works.

I suppose that the widget-to-input conversion function must check the properties in INPUT_NODE, and if there isn't a matching type, the widget-to-input conversion doesn't work.

So my question is, is this a bug? An oversight? Or a feature that has simply disappeared?
Is there a way to tell if a widget can be converted to an input when creating the widget?

Expected Behavior

when i used the following code to create a STRING widget (in previous version) :

ComfyWidgets.STRING(
                    node,
                    "default",
                    ["STRING", { default: "" }],
                    app
                );

I have this :

Image

and when I want connect the string input :

Image

then :

Image

Actual Behavior

in version 0.3.33 and 1.18.9 :

Image

and when I want to connect to input the little dot doesn't appear and not connectable:

Image

Steps to Reproduce

bug.json

Debug Logs

nothing in logs

Browser Logs

nothing

Setting JSON

no change, default settings

What browsers do you use to access the UI ?

No response

Other Information

all kind of browser

┆Issue is synchronized with this Notion page by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExpectedThe behavior is expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions