Nodes/deforum-comfy-nodes/String to Combo | Deforum
ComfyUI Node

String to Combo | Deforum

Make a string play nice with dropdown-typed inputs

By deforum·Created about a year ago·Updated 3 months ago· 29
String to Combo | Deforum
    • COMBO
    • STRING
    • *
    string

    ComfyUI's type system has a frustrating quirk: a node that expects a dropdown value (a "combo" type, like a sampler name) often won't accept a plain string from a text node, even though they're the same data. String to Combo | Deforum is the bridge. It takes any string, trims and lowercases it, and hands it back in three different type faces - COMBO, STRING, and wildcard - so you can wire it into whatever socket is being picky. If you've ever had a workflow refuse a perfectly good string, this is the adapter that unblocks it.

    The input is one thing: string. The outputs are three, and they're all the same value wearing different types. The first, COMBO, is the trimmed, lowercased version typed so a combo/dropdown socket will accept it. The second, STRING, is the same normalized value as a plain string. The third, *, is the original string as a wildcard - useful when you need to preserve the exact text, spaces and all, and let any wildcard input take it.

    Why lowercase? Sampler and scheduler names in ComfyUI are lowercase (euler_ancestral, karras), so a schedule that emits "KARRAS" or "Karras" will be rejected by a combo socket that expects "karras". Normalizing on the way through means a Value Schedule | Deforum or any text source can safely drive dropdown-typed inputs without you chasing case mismatches. This is precisely the glue you need for the override path in Sampler Selector | Deforum and Scheduler Selector | Deforum - those take a raw override_string, and feeding it through this node keeps the typing and casing sane. It's also the natural endpoint for String Schedule | Deforum's text output if you want the interpolated prompt to drive a choice.

    The honest limits: it's just string normalization plus type aliasing. It won't invent values a dropdown doesn't have - if you feed it "not_a_sampler", it happily outputs that string and the downstream node will reject it. The value must match what the consuming node actually accepts. And the * output is the original string while COMBO/STRING are normalized, so don't assume all three are identical - pick the output that matches what you're feeding.

    Installation is the pack: ComfyUI Manager → search "ComfyUI-Deforum" or deforum-comfy-nodes → install and restart, or git clone https://github.com/deforum-art/deforum-comfy-nodes into ComfyUI/custom_nodes and restart. No models, no extra dependencies. It's one of those nodes you won't touch for weeks and then desperately need the first time a schedule-driven sampler refuses to run - having it on the canvas saves you an afternoon of "why is this string not a string."

    CategoryDeforum/Utility

    Inputs (1)

    NameTypeDefaultDescription
    stringSTRING

    Outputs (3)

    NameTypeDescription
    COMBOCOMBO
    STRINGSTRING
    **