Nodes/String Join Tools/Toggle String Join (5)
ComfyUI Node

Toggle String Join (5)

Click a composition together — Toggle String Join (5)

By ruminar·Created 2 months ago·Updated 27 days ago· 2
Toggle String Join (5)
    • text
    separator,
    modemultiple
    enabled_mask31
    selected_index0
    text_1
    text_2
    text_3
    text_4
    text_5

    Five toggle-able string inputs is where this starts to look like a real prompt console. You've got quality tags, a subject, a style block, a scene, a camera - five branches, each with an ON/OFF button on its row, and you assemble the final prompt by clicking, not by unplugging wires. That's Toggle String Join (5) from ruminar's String Join Tools pack.

    The workflow it's built for is the unattended batch. The node's status area reads QUEUE SNAPSHOT, and that's the one thing to understand before anything else: the toggle state and mode are captured when you queue, and later UI changes don't affect jobs already waiting. The pack is explicit about the intent - this variant suits unattended batch generation after you've chosen the desired prompt composition. Set the buttons, queue a run, walk away, and no mid-batch click is going to silently change what job 40 generates.

    The controls

    • mode - multiple (each input independent) or single (zero or one enabled; clicking a new one turns the rest off). This is the classic either/or switch for "which style is running this batch."
    • Per-row buttons - click to toggle each input on/off. Left-clicking the input row works too.
    • separator - default ", ", with \n, \r\n, \t, \\ escapes.

    The enabled_mask and selected_index widgets underneath are the state backing the buttons; the node manages them for you, so you'll rarely set them by hand. And unlike a manual bitmask, the buttons make the state readable at a glance.

    What comes out

    The output is one text STRING. Only inputs that are connected, toggled on, and non-empty make it in; empty strings and unconnected sockets are dropped, and the separator only appears between surviving strings. All five off or empty gives you "". Feed the output into CLIP Text Encode and you've got a five-way composition panel in front of you.

    Installing it

    ComfyUI Manager: search "String Join Tools" or "ComfyUI-StringJoinTools". Or:

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

    Restart ComfyUI and refresh the browser. No extra Python packages, no model files - this is pure UI-and-plumbing, so the install is about as safe as custom nodes get. It lives under String Join Tools.

    Choosing between snapshot and live

    This is the snapshot family, and it's worth being deliberate about which variant you grab. Toggle String Join (5) locks the composition at queue time - perfect when the batch is the whole point. But the moment you catch yourself wanting to nudge a toggle between queued jobs and have the next one pick it up, you've outgrown it; the pack's Runtime Toggle String Join (5) reads the latest live state at execution time and is designed exactly for that long pre-queued run. Same five sockets, different philosophy. Pick the one that matches how much you trust your composition before you hit Queue.

    CategoryString Join Tools

    Inputs (9)

    NameTypeDefaultDescription
    separatorSTRING, Supports \n, \r\n, \t, and \\.
    modeCOMBOmultiple2 options: multiple, single
    enabled_maskINT310–31
    selected_indexINT0-1–4
    text_1optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.
    text_2optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.
    text_3optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.
    text_4optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.
    text_5optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.

    Outputs (1)

    NameTypeDescription
    textSTRING