StringToolsConcat
Glue a pile of text wires together with one node
- STRING
The string-joiner your prompt graph has been missing
ComfyUI is full of nodes that take one text input. The moment you want "base prompt + quality tags + a style suffix" assembled out of parts you control separately, you're stuck dragging three text boxes around or hand-typing the whole thing into one CLIP encode. StringToolsConcat exists to fix exactly that: it takes any number of string inputs and joins them, in order, into a single string. It's the "paste them together" node.
And like its sibling StringToolsRandomChoice, it refuses connections from ComfyUI's PrimitiveNode (the thing "convert widget to input" creates) - the author blocks that deliberately. So you feed it from the pack's own StringToolsString / StringToolsText nodes. That's the deal, and it's the reason this tiny pack exists at all.
How it works
Same dynamic-slot mechanic as the rest of the pack. You get a separator input and a text_0 slot; connect a string and a fresh empty text_1 slot appears beside it, and so on. Unplug something and the empties vanish. Double-clicking a slot creates a StringToolsText node instead of a PrimitiveNode. The inputs are slots only - there are no widgets to convert.
At run time it collects the connected text_N values, sorts them by their numeric suffix so text_0 → text_1 → text_2 regardless of wire order, then joins them with the separator. Nothing smarter than that, which is the appeal.
The inputs that matter
- separator (STRING) - what goes between the parts. Here's the gotcha: it's a force-input port, not a text box. You don't type into the node; you wire a string node into it. Connect a
StringToolsStringcontaining", "if you want comma-separated tags, or"\n"for newlines. Leave it unwired and you get no separator at all -"cat"+"dog"becomes"catdog", which surprises people about once per week. - text_0, text_1, … - the parts, in order. Disconnected slots are ignored, and if nothing is connected the output is an empty string.
Output is a single STRING, ready for a CLIP Text Encode, another concat, or whatever consumes text.
Installing it
ComfyUI Manager is the easy route: "Install Custom Nodes", search ComfyUI String Tools, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Taremin/comfyui-string-tools
Restart fully. Zero pip dependencies, zero model downloads - pure Python plus one JS file, MIT licensed, release 0.0.7. It's from Taremin, the author of the well-liked WebUI Monaco Prompt editor, which is to say this person spends their time on prompt tooling and it shows.
Gotchas
- The separator is a wire, not a widget. If you can't find where to type a comma, that's why. Make a
StringToolsString, put your separator in it, connect it. - Order follows slot numbers, not your memory.
text_0always sorts first. If the output reads wrong, look at which slot is which. - Empty trailing slots are fine and ignored - you don't have to fill every slot you see.
- If a wire won't take, it's a PrimitiveNode at the other end again. Reach for
StringToolsStringorStringToolsText.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| separatoropt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |