Toggle String Join (3)
Three branches, one click each — Toggle String Join (3)
- text
Three inputs is where the toggle-join idea starts to feel genuinely useful. With two, you could almost get away with a manual switch. With three optional string sockets, each carrying its own ON/OFF button, you're composing prompts by clicking - which is a lot faster than rewiring, and a lot more legible than three disconnected wires hanging in space.
Toggle String Join (3) comes from ruminar's String Join Tools pack. Each text input row has a button (left-click the row too), and the node shows QUEUE SNAPSHOT in its status area. That label is the key mechanic, so read it twice: toggle state and mode are captured when you queue, and later UI changes don't touch jobs already waiting. This is the variant you use when you've settled on a composition and want to run a batch unattended - flip the toggles, queue, leave.
Modes: multiple vs single
multiple(default): every input's toggle is independent. You can have all three on, one on, two on - anything.single: zero or one input can be enabled. Click a new input and it becomes the only active one. Great for an either/or choice - say "candid | studio | outdoor" where exactly one version should run at a time.
The mode dropdown and the per-row buttons are the whole interface you'll use day to day. The enabled_mask and selected_index widgets back the buttons and are handled for you. separator (default ", ") supports the usual escapes: \n, \r\n, \t, \\.
How it behaves
Only strings that are connected and toggled on and non-empty make it into the output. Unconnected inputs are skipped, exact empty strings are skipped, and the separator lands only between strings that actually survived. Output is a single text STRING, ready for a CLIP encoder or a saver's metadata.
If every input is off or empty, you get "". That's the sane behavior for a prompt - an empty string is a problem you can actually see, whereas a phantom ", ," hides in a prompt you'll swear you wrote correctly.
Installing it
ComfyUI Manager: search "String Join Tools" or "ComfyUI-StringJoinTools". Or manually:
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 in the node menu.
The trap, stated plainly
This is a snapshot node. Flip a toggle after queueing and the jobs already in line ignore you - deliberately. If your mental model is "I'll click the toggle and it applies immediately," you want the pack's Runtime Toggle variants instead, which read the latest live state when each job executes. Use this one for fixed-composition batches; use the runtime ones when the composition is still moving. Also remember it only captures at queue time: if you change a toggle and hit Run and "nothing changed," you're looking at the previous queue's snapshot. Re-queue.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| separator | STRING | , | Supports \n, \r\n, \t, and \\. |
| mode | COMBO | multiple | 2 options: multiple, single |
| enabled_mask | INT | 70–7 | — |
| selected_index | INT | 0-1–2 | — |
| text_1opt | STRING | Optional queued STRING input. Whether it is included is captured when the prompt is queued. | |
| text_2opt | STRING | Optional queued STRING input. Whether it is included is captured when the prompt is queued. | |
| text_3opt | STRING | Optional queued STRING input. Whether it is included is captured when the prompt is queued. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |