Multi String Concatenator
Five strings, one separator, zero middleman
- result
Chaining String Concatenator nodes five times to join five parts of a filename is exactly the kind of tedium that makes people give up on string work in ComfyUI. Multi String Concatenator collapses that into one node: a single separator field plus up to five string slots, joined in order, with empty slots skipped automatically.
It's the "more than two strings" version of the pack's plain String Concatenator, and for most real filenames - batch_style_0001_v2.png - it's the one you'll actually use.
How it works
The separator is required (or at least, it's the first field), and every non-empty string_1…string_5 gets joined by it. Empty and None inputs are filtered out before joining, which is the behavior that makes the node forgiving: you can leave the last couple of slots unwired and the output just ends where your inputs do - no trailing separator, no None text leaking in.
Note the one asymmetry with its two-string sibling: here the separator is separator.join(parts), so it lands between parts rather than being a single inserted glue value. Same idea, applied to N parts.
Inputs
- separator - the joiner between parts. Default empty.
- string_1 … string_5 - the parts, all optional. Connect as many as you need.
Output
result - the joined string.
Install
Standard pack install - ComfyUI Manager (search "ComfyUI-AutoFlow") or:
cd ComfyUI/custom_nodes
git clone https://github.com/ZXL-Xinram/ComfyUI-AutoFlow
Restart after. No dependencies.
Where people get burned
- Whitespace counts as content. A slot containing
" "(a single space) is not empty, so it joins as a real part. Trim inputs upstream if that bites you. - Order is fixed. The parts join in slot order - there's no reordering, so wire your slots in the order you want the final string.
- Five is the ceiling. More parts means chaining two of these (feed the first node's
resultinto the second'sstring_1) or switching to String Formatter, which is often cleaner for complex names anyway.
It's a small node with a small job, but "join these five bits into a filename without a pile of nested joins" is a genuinely common need. It's the string helper that quietly saves you a dozen wires in a batch workflow.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| separator | STRING | — | |
| string_1opt | STRING | — | |
| string_2opt | STRING | — | |
| string_3opt | STRING | — | |
| string_4opt | STRING | — | |
| string_5opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | STRING | — |