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

Runtime Toggle String Join (5)

Five live switches for long pre-queued runs

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

    Five toggle-able inputs that stay live while a queue drains - that's the sweet spot of the Runtime Toggle String Join family in ruminar's String Join Tools pack. Runtime Toggle String Join (5) gives you a quality block, subject, style, scene, and lighting each on its own switch, and every queued job reads the current state of those switches at execution time.

    The contrast with the plain Toggle joins is the whole story. Snapshot toggles capture state when you queue and ignore you afterward. Runtime toggles are wired to a small state store on the ComfyUI server: click a switch, the frontend pushes the new mode and mask, and the next job that executes the node reads it live. The node marks itself with a faint amber tint and a LIVE status so you never mistake it for its snapshot sibling. That makes it the right tool when the batch is the point but you still want to course-correct mid-run - change a style switch and the next image picks it up, no re-queueing.

    The mechanics that matter

    • Live state wins, saved state is the fallback. If the server-side state exists, it's used; if it doesn't (fresh restart), the queue-time saved values take over.
    • Changes propagate through the cache. The node includes a monotonic revision number in its IS_CHANGED result, so flipping a toggle invalidates the cached join and forces downstream work. It's not magic - it's just a dirty flag that actually fires.
    • Timing is "next image onward." A click affects jobs that haven't executed the node yet. The job currently generating finishes with its old composition.
    • One browser tab per workflow. Live state is keyed server-side by state_key, and the README's rule is direct: use one active tab for controlling a given workflow, because a second tab holding the same key overwrites your clicks.

    What you set

    • mode - multiple (independent toggles) or single (zero or one enabled).
    • Per-row ON/OFF buttons - the control surface.
    • separator - default ", ", with \n, \r\n, \t, \\ escapes.
    • state_key - auto-generated per node; only set it manually to share live state between copies.
    • text_1text_5 - optional STRING sockets. Output: one text STRING, ready for CLIP Text Encode or a saver's metadata.

    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 packages, no model downloads. Under String Join Tools.

    The honest use-it-or-not

    This node is specialized, and it's worth saying so. If you run one image at a time, the snapshot Toggle joins are simpler and give the same results. The runtime family earns its keep exactly when re-queueing is expensive - long pre-queued runs where the composition is still moving. It also pairs naturally with runtime text sources (the pack ships Runtime Text Input for that), so you can change both the text and the toggles while a batch drains. Just remember the live state is memory-only: a server restart drops it, and you're on fallback values until you click something.

    CategoryString Join Tools

    Inputs (10)

    NameTypeDefaultDescription
    separatorSTRING, Supports \n, \r\n, \t, and \\.
    modeCOMBOmultiple2 options: multiple, single
    enabled_maskINT310–31
    selected_indexINT0-1–4
    state_keySTRING
    text_1optSTRINGOptional queued STRING input. Its generated value is accepted or rejected at execution time by the live toggle.
    text_2optSTRINGOptional queued STRING input. Its generated value is accepted or rejected at execution time by the live toggle.
    text_3optSTRINGOptional queued STRING input. Its generated value is accepted or rejected at execution time by the live toggle.
    text_4optSTRINGOptional queued STRING input. Its generated value is accepted or rejected at execution time by the live toggle.
    text_5optSTRINGOptional queued STRING input. Its generated value is accepted or rejected at execution time by the live toggle.

    Outputs (1)

    NameTypeDescription
    textSTRING