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

Toggle String Join (10)

A prompt console for unattended batches — Toggle String Join (10)

By ruminar·Created 2 months ago·Updated 27 days ago· 2
Toggle String Join (10)
    • text
    separator,
    modemultiple
    enabled_mask1023
    selected_index0
    text_1
    text_2
    text_3
    text_4
    text_5
    text_6
    text_7
    text_8
    text_9
    text_10

    Ten toggle-able string inputs, each with an ON/OFF button, all feeding one clean prompt. Toggle String Join (10) is the biggest member of the snapshot-toggle family in ruminar's String Join Tools pack, and it's the one that turns prompt composition into clicking. You can have ten branches - wildcard picks, LoRA triggers, style blocks, per-slot subjects - and assemble the final prompt by flipping buttons instead of untangling wires.

    The design target is stated right in the pack: this variant suits unattended batch generation after the desired prompt composition is chosen. The node displays QUEUE SNAPSHOT in its status area, which is the honest description of how it behaves. The toggle state and mode are captured when the prompt is queued. Later UI changes do not affect jobs already waiting in the queue. That's not a bug report waiting to happen - it's the feature. You compose, you queue, you leave, and job 100 gets exactly the same composition as job 1.

    The controls

    • mode - multiple lets every input toggle independently; single restricts you to zero or one enabled input, so it doubles as a big either/or selector across up to ten options.
    • Per-row buttons (and left-click on the row) - the whole point of the node. On state is visible at a glance.
    • separator - default ", ", with \n, \r\n, \t, \\ escapes.

    The enabled_mask and selected_index widgets that back the buttons are managed for you by the node's UI. You're not expected to hand-edit a ten-bit mask, and you won't need to.

    What comes out

    One text STRING. Only inputs that are connected, toggled on, and non-empty survive; empty strings and unconnected sockets are dropped, and the separator appears only between survivors. Everything off or empty returns "". Wire the output into your CLIP Text Encode and you have a ten-way prompt console in front of you - handy when you're testing which of several style blocks actually moves the needle, because toggling one on and re-running is a single click.

    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 and refresh. No Python dependencies, no model downloads. Under String Join Tools.

    The honest tradeoff

    Ten buttons is power, and power needs a mental model. Remember this is the snapshot family: your toggles freeze at queue time, deliberately. If you're running long batches and want the freedom to change the composition between queued jobs - flip a toggle, and the next job picks it up - this is the wrong node. The pack's Runtime Toggle String Join (10) reads the latest live state at execution time and exists precisely for that. The two are siblings that share sockets and differ in philosophy: lock it down before you queue, or keep it live while the queue drains. Pick the one that matches how much you trust your composition.

    CategoryString Join Tools

    Inputs (14)

    NameTypeDefaultDescription
    separatorSTRING, Supports \n, \r\n, \t, and \\.
    modeCOMBOmultiple2 options: multiple, single
    enabled_maskINT10230–1023
    selected_indexINT0-1–9
    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.
    text_6optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.
    text_7optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.
    text_8optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.
    text_9optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.
    text_10optSTRINGOptional queued STRING input. Whether it is included is captured when the prompt is queued.

    Outputs (1)

    NameTypeDescription
    textSTRING