StringToolsConcatList
Join an entire list of strings with one node
- STRING
Concatenation, but the parts arrive in one list
StringToolsConcat joins several separate text wires with a separator you wire in. StringToolsConcatList does the same job for the case where your parts already come as a list on a single text_list port - say, bundled by StringToolsStringsToList or produced by any other list-of-strings node.
The use case is the classic "tags from a list" pattern: instead of five separate text_0/text_1 wires, you have one list of tag strings, and you want them joined into a single comma-separated prompt line. Feed the list into text_list, wire a StringToolsString containing ", " into separator, and the node hands back one assembled string.
How it works
This is an INPUT_IS_LIST node: text_list arrives as a whole list on one port, gets flattened (nested lists are unwound), and every element is stringified and joined with the separator. Order is preserved - first element first, last element last.
The separator is where the differences from its sibling show up:
- It's a force-input port, same as
StringToolsConcat- you wire a string node into it rather than typing into a box. Connect aStringToolsStringwith", ","\n"," + ", whatever. - If you leave it unconnected, it defaults to a newline (
"\n"). Note that contrast: plainStringToolsConcatdefaults to no separator (parts get smushed together), while this one quietly newline-joins. It's a sensible default for "list of prompt lines," but it surprises people who expected an empty join.
The inputs that matter
- text_list (STRING list) - the strings to join, in order.
- separator (STRING, optional) - what goes between elements. Unwired means newlines.
Output is a single STRING - the joined result, ready for a CLIP encode or wherever assembled text goes.
Installing it
One-pack install. ComfyUI Manager: "Install Custom Nodes", search ComfyUI String Tools (repo Taremin/comfyui-string-tools), install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Taremin/comfyui-string-tools
Restart fully. No pip dependencies, no model downloads - stdlib Python plus a small JS file, MIT license, release 0.0.7.
Gotchas
- An empty list returns an empty string. If your upstream bundler is half-disconnected, the output silently collapses to nothing.
- Remember the newline default. If your joined output looks like a block of separate lines, that's the unwired separator doing its job. Wire a separator string in to change it.
- Single string into
text_listwon't fly - a list port wants a list. Bundle withStringToolsStringsToListfirst. - Newline characters from the source strings are preserved as-is; a
"\n"inside one element stays there even if your separator is a comma.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text_list | STRING | — | |
| separatoropt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |