String Join
One small node that fixes the 'prompt is a list' problem
- string
String Join is the boring-but-essential counterpart to String Split, and it exists because of an awkward ComfyUI reality: a lot of nodes hand you a list of strings when what you actually want is one big string. Dynamic prompt wildcard outputs, tag lists, metadata fields, anything that produces one-item-per-line - they all deliver arrays. String Join takes that list, inserts a delimiter between every item, and hands you a single STRING on the other side.
The default delimiter is \n, which is the key insight: if you're joining a list that came from a multi-line prompt, \n reconstructs the original prompt exactly. You feed it a list of positive-prompt fragments and get back the full prompt. You feed it a list of tags and join with , for a clean tag string.
Inputs and output
- list - the strings to join. It's marked
force_input, so you have to wire something in; it won't run with an empty widget. This is the list of strings, not a single string - plug String Split's output, or Any To String's, into it. - delimiter - what goes between each item. Defaults to
\n. Use\tfor tabs,,for comma-separated, or literally anything else. The node understands the escape sequences as text: typing\nin the widget means newline,\tmeans tab, which saves you from fighting the UI's escaping. - output
string- the joined result, ready for a CLIP text encode, a filename node, or a save path.
The one-two punch
String Join and String Split are designed as a pair. Split a prompt into lines, filter or reorder them with string logic, then Join them back with \n - that's a complete "edit my prompt programmatically" pipeline in three nodes. Or use Join on its own as a poor man's prompt combiner: multiple Any To String nodes feeding one Join, and you've got a template builder without a single line of Python.
Installing it
This is part of Nifty Nodes for ComfyUI (Stibo/comfyui-nifty-nodes). ComfyUI Manager is the easy path - search "Nifty Nodes" - or:
cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes
Restart, done. The pack runs on the v3 API (comfy_api.latest), so keep ComfyUI updated or nothing from it will load. String nodes have no extra dependencies and need no model files.
If it feels too simple
That's the point. Most string nodes in the ecosystem are one-liners, and String Join is exactly one: join the list with the delimiter and return it. The value isn't in complexity - it's that when you need this, you need it right now, in the middle of a graph, and scrolling through a 400-node pack's worth of "Text Concatenator Pro" options is the last thing you want. It does the one thing, does it with sensible defaults, and stays out of your way.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| list | STRING | List of strings to join. | |
| delimiter | STRING | \n | Character or string to insert between each list item. Use \n for newline, \t for tab. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |