Nodes/comfyui-string-join/String Join (Multi)
ComfyUI Node

String Join (Multi)

Stitch ten strings into one, commas included

By Ramon-Balaguer·Created a day ago·Updated a day ago· 0
String Join (Multi)
  • strings
  • STRING
◄delimiter, ►
◄skip_emptytrue►
◄stripfalse►

Most of your workflow is plumbing, and string plumbing is the part nobody writes tutorials about. You've got a Florence caption over here, a WD14 tag dump over there, a style preset you keep retyping, and at the end a CLIP Text Encode that wants all of it as one blob. The old answers were the WAS Text Concatenate node - built for two inputs, so you chain them - or an rgthree Power Puter expression you'll forget how to read in a month. String Join (Multi) is the boring, correct version: connect as many strings as you want, pick a separator, get one string out.

What it actually does

It's about forty lines of Python and none of it touches pixels. The clever bit is the input side: this node is written against ComfyUI's newer V3 authoring API, and its string inputs use io.Autogrow, which means sockets appear as you use them. Connect string0 and a string1 socket shows up. Connect that and you get string2. Up to a hundred, which is more than you'll ever wire.

All of those inputs are optional, deliberately. ComfyUI's bypass passes a node's input through to its output when the types line up, so a bypassed text node with a string input forwards its text and counts; a muted node, or a bypassed primitive with nothing to forward, just vanishes from the list. No error, no stray delimiter - it joins what's left. If everything upstream is gone you get an empty string, which downstream reads as an empty prompt rather than a crash.

Internally it flattens any input that's a list (recursively), sorts the sockets by their numeric suffix so the order you plugged them in is the join order, and concatenates. Lists matter more than they sound: batched captions and tag lists arrive as lists and you never unpack them by hand.

The inputs you'll actually touch

delimiter defaults to , - comma plus space, which is what tag-based prompting wants. It understands four escape sequences: \n, \t, \r, and \\. Type \n and you get one entry per line, which is how you build paragraphs or a multi-line caption instead of a tag salad.

skip_empty defaults to on, and good. This is the fix for the a, , b problem: whitespace-only strings get dropped instead of feeding an empty slot to your encoder. Leave it on.

strip defaults to off. Turn it on if your sources are sloppy about trailing spaces and you don't want cat , a beach with a gap before the comma. If both are on, trimming happens first - and note that skip_empty already ignores whitespace-only strings regardless of strip, so the two don't fight.

One output: STRING. Most people wire it into a CLIP Text Encode, or into a display/save-text node when they're debugging what the prompt builder actually produced. It also makes a decent filename builder - someone doing batch upscales describes exactly that: get the original filename, append a suffix, join it with a space as the delimiter, and feed the filename_prefix on Save Image.

Installing it

ComfyUI Manager: search comfyui-string-join (or "String Join (Multi)"). Or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Ramon-Balaguer/comfyui-string-join.git

Restart ComfyUI. Nothing to pip install - the pack's pyproject.toml declares an empty dependency list, which is exactly what you want from a string node. It lives under utils/string, and it registers the aliases join, concat, concatenate and implode. Try "concatenate" if the menu looks empty; that's what the WAS node was called and most people still search that way. An example workflow ships in example_workflows/string_join_mute_bypass.json (also in the template browser).

Where people get burned

The node doesn't show up at all. The author is upfront: this needs a recent ComfyUI with the V3 node API and Autogrow inputs, tested on 0.41.0. On an older install the pack loads nothing - no error naming the problem, the node simply isn't in the menu. Update ComfyUI itself, not the node. A modern pack with no NODE_CLASS_MAPPINGS at all means "new API", not "broken" - that one's in our ecosystem notes too.

You joined the wrong thing. Joining strings is text concatenation, not conditioning concatenation. If what you want is one combined embedding from two prompts, that's a different operation. Feeding a comma-joined prompt into one encoder is predictable; assuming it behaves like summed conditioning is not.

Trailing delimiters. Turn skip_empty off with a disconnected or empty source and you get the classic a, , b. Some workflows want that fixed slot count; most don't.

Escapes are literal. Only those four sequences are interpreted, then everything else copies through unchanged - type \q and you get a backslash and a q.

Do I reach for it? Building a prompt out of three or four sources where one might be muted - yes, that's the case the chained two-input nodes handle badly. Arithmetic or conditionals on top, you're back in Power Puter.

Categoryutils/string

Inputs (4)

NameTypeDefaultDescription
delimiterSTRING, Separador. Admite \n, \t, \r y \\.
skip_emptyBOOLEANtrueOmite strings vacíos (o sólo espacios).
stripBOOLEANfalseQuita espacios al principio y final de cada string.
stringsoptCOMFY_AUTOGROW_V3—

Outputs (1)

NameTypeDescription
STRINGSTRING—