Nodes/ComfyUI Level Pixel/Convert Combo To Text [LP]
ComfyUI Node

Convert Combo To Text [LP]

Flattening a dropdown's picks into a string

By LevelPixel·Created 2 years ago·Updated 6 months ago· 31
Convert Combo To Text [LP]
    • text
    combo_list
    delimiter,
    as_jsonfalse

    COMBO is ComfyUI's internal type for dropdown/enum widgets - the thing behind every "pick one from a list" selector in the UI. This node takes a COMBO value and flattens it into plain text, either as a delimited string or as JSON, so it can travel anywhere a STRING is expected instead of staying locked to whatever widget produced it.

    Why you'd want this

    Most of the time a COMBO value just drives the node it's attached to and never needs to leave that context. But some upstream nodes expose combos that can carry more than one selection at once - the combo_list naming here specifically implies a list-valued combo, not a single pick - and once you've got a multi-select value like that, you often want it recorded somewhere: logged, saved to a filename, embedded in a report, or turned into a single readable string for a downstream text node that has no concept of what a COMBO even is. This node is that off-ramp.

    The inputs and outputs that matter

    • combo_list - the COMBO value to convert. Given the name, this is built for a combo that can hold multiple selected entries, not just a single dropdown pick.
    • delimiter - the STRING used to join multiple entries together, default ", ".
    • as_json - a BOOLEAN, default False. When set, the schema implies it changes the output format to a JSON-encoded representation rather than a delimiter-joined string - the two options aren't documented as to which one wins if both apply, so if you're relying on this in an automation pipeline, run it once with a distinctive delimiter and confirm which format you actually get before building logic around it.
    • Output - text, a single STRING.

    How to install it

    ComfyUI Manager: search "ComfyUI Level Pixel" or ComfyUI-LevelPixel, install, restart - auto-updates via Manager's "Update ALL." Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/LevelPixel/ComfyUI-LevelPixel.git
    

    Restart ComfyUI. No models, no extra dependencies - pure text formatting.

    Common issues & troubleshooting

    You wired in a plain single-select combo and only got one item back, no delimiter in sight. That's expected - the delimiter only matters when there's more than one entry to join. A single selection just becomes that one value as text.

    You want valid JSON and set as_json but the delimiter field is still sitting there unused. If your output turns out to be JSON-formatted, the delimiter field simply doesn't apply in that mode - leave it at the default rather than assuming it changes the JSON's separators.

    You need this to plug into something that only takes a plain BOOLEAN or FLOAT list-string in a very specific shape. This node gives you general-purpose text, not a type-specific serializer - if the downstream consumer needs a very particular string shape, you may need a text-processing step after this one to reformat it exactly.

    CategoryLevelPixel/Conversion

    Inputs (3)

    NameTypeDefaultDescription
    combo_listCOMBO
    delimiterSTRING,
    as_jsonBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    textSTRING