ComfyUI Node

Dynamic Text-to-Combo

A live dropdown that drives any combo input — the variable Set/Get trick, made editable

By gh055·Created 2 months ago·Updated 2 months ago· 0
Dynamic Text-to-Combo
    • VALUE
    multiline_entriesOption_1 Option_2 Option_3
    selected_value

    ComfyUI has a dumb rule that bites everyone eventually: a dropdown (COMBO) widget on a node is a dead end. You can't wire a value into it, and you can't make its options change from anywhere except its own hardcoded list. The DynamicComboGenerator from the ComfyUI-Dynamic-Combo pack exists to break that rule in one specific way - it lets you type the dropdown's options into a multiline text box, pick one live, and then route that choice out as a wildcard wire into a variable Set/Get chain that ends up driving a strict combo input on some other node.

    It's a niche utility, and honest about it. If you've never wanted to remotely control a dropdown, you can skip this pack. But the moment you're building a workflow where one selection should flip a downstream node's combo - say a checkpoint switcher, a sampler-preset selector, or a model list that changes as you add files - this is the missing piece.

    How it works

    The Python half is almost comically thin. The class defines two inputs - a multiline string and a static dropdown seeded with ["Option_1"] - and returns one output called VALUE with type * (wildcard). Wildcard means ComfyUI skips its connection validation entirely, which is the whole trick: a normal typed output would refuse to plug into the mismatched inputs the variable Set/Get route needs.

    The real work lives in the frontend. A small JS extension watches the multiline_entries text widget, splits your lines on newlines, trims whitespace, drops blanks, and swaps them into the selected_value dropdown's option list live. If your active choice disappears because you edited the text, it silently falls back to the first remaining line instead of erroring. The class also overrides VALIDATE_INPUTS to always return True, so the backend doesn't crash when the dropdown's real choices no longer match the placeholder ["Option_1"] it was registered with.

    The two inputs that matter

    • multiline_entries - your option list, one per line. Type SD1.5\nSDXL\nFlux and the dropdown fills itself in as you type.
    • selected_value - the dropdown itself; your active pick. This is what actually gets sent downstream.

    Output is a single VALUE wire. Wire it into a variable Set node, then on your target node right-click → "Convert widget to input" on the combo you want to control, and feed the corresponding Get node into that new slot. That's the entire README's workflow.

    Install

    ComfyUI Manager: search "Dynamic Text-to-Combo Generator" and hit Install. Or the manual way:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/gh055/ComfyUI-Dynamic-Combo
    

    Then restart ComfyUI. No models, no dependencies - pyproject.toml lists an empty dependency array, so it's pure Python plus one JS file.

    Gotchas

    The wildcard output is the point, but it's also the trap: VALUE will happily connect to anything, so whatever string you send gets strung straight into whatever input you exposed. Garbage in, garbage out - there's no type safety left to catch you.

    This pack is very new and the JS pokes widgets the old-school way. If the dropdown ever stops refreshing, suspect the experimental Nodes 2.0 frontend - that rewrite broke a lot of widget-manipulating extensions - and flip it back off. And remember: on the backend, all this produces is a string. If you want the choice to actually load a model, the Set/Get route has to reach a node that accepts a string where the old combo lived.

    CategoryCustomRouting

    Inputs (2)

    NameTypeDefaultDescription
    multiline_entriesSTRINGOption_1 Option_2 Option_3
    selected_valueCOMBO1 options: Option_1

    Outputs (1)

    NameTypeDescription
    VALUE*