Text Concatenate (NH)
Up to 64 strings joined on one delimiter, without the mess
- text
There are a hundred ways to glue strings together in ComfyUI, and most of them leave stray spaces, double delimiters, or a pile of nodes on your canvas. Text Concatenate (NH) is the grown-up version: join up to 64 strings with a single delimiter, with whitespace cleanup built in, all in one node.
The headline input is string_count, default 2, max 64 - it controls how many string slots the node shows. That's the feature that makes this different from a fixed-input join node: you set it to 3 or 12 or 40 and the node exposes exactly that many string_N inputs, no more, no clutter. Every slot is optional, and you can connect a text node into any of them.
Then two things happen per input: it's stripped of surrounding whitespace (that's the clean_whitespace toggle, on by default), and everything gets joined with the delimiter between each piece. The default delimiter is /, which is a bit of a tell - this node was clearly built for building paths (filenames, folder paths, model paths) as much as prompts. Set the delimiter to , for prompt work or leave it as / for path assembly.
The sharp edges
Because slots are optional and whitespace is stripped, an unconnected or empty slot simply vanishes - no empty strings in the middle of your output, no a//b artifacts. That's usually what you want, but note the two ways it can still surprise you:
string_countcontrols visibility, not validity. If you raise it from 2 to 4, you getstring_3andstring_4sockets; lower it back and those inputs are hidden but their values aren't lost in a saved workflow you later re-expand. It's a display control, not a data delete.- It's a join, not a formatter. Every piece gets the same delimiter, so you can't do "comma between subjects, but a space before the style tag." For per-slot custom separators you're back to Prompt Join or a hand-built approach.
The single output is text, a plain STRING, ready for a CLIP encoder, a filename node, or another text node. There's no count output here - if you need to know how many strings actually made it in, count them upstream.
Install
It's in the NH-Nodes pack:
- ComfyUI Manager → search NH-Nodes → install → restart ComfyUI. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/jetthuangai/NH-Nodes.git
cd NH-Nodes
pip install -r requirements.txt
Then restart ComfyUI.
No models, no extra dependencies.
Common issues
The classic confusion is expecting a fixed number of inputs: you add a string to the graph and can't find the socket, because string_count was left at its default 2. Bump it and the slot appears. The other one is delimiter amnesia - a path that comes out as folderprompts/name because you forgot the leading slash on the delimiter. And if your output looks clean but the downstream node complains about empty strings, check clean_whitespace - turning it off will happily preserve those spaces you've been ignoring.
Inputs (67)
| Name | Type | Default | Description |
|---|---|---|---|
| string_count | INT | 22–64 | — |
| delimiter | STRING | / | — |
| clean_whitespace | BOOLEAN | true | — |
| string_1opt | STRING | — | |
| string_2opt | STRING | — | |
| string_3opt | STRING | — | |
| string_4opt | STRING | — | |
| string_5opt | STRING | — | |
| string_6opt | STRING | — | |
| string_7opt | STRING | — | |
| string_8opt | STRING | — | |
| string_9opt | STRING | — | |
| string_10opt | STRING | — | |
| string_11opt | STRING | — | |
| string_12opt | STRING | — | |
| string_13opt | STRING | — | |
| string_14opt | STRING | — | |
| string_15opt | STRING | — | |
| string_16opt | STRING | — | |
| string_17opt | STRING | — | |
| string_18opt | STRING | — | |
| string_19opt | STRING | — | |
| string_20opt | STRING | — | |
| string_21opt | STRING | — | |
| string_22opt | STRING | — | |
| string_23opt | STRING | — | |
| string_24opt | STRING | — | |
| string_25opt | STRING | — | |
| string_26opt | STRING | — | |
| string_27opt | STRING | — | |
| string_28opt | STRING | — | |
| string_29opt | STRING | — | |
| string_30opt | STRING | — | |
| string_31opt | STRING | — | |
| string_32opt | STRING | — | |
| string_33opt | STRING | — | |
| string_34opt | STRING | — | |
| string_35opt | STRING | — | |
| string_36opt | STRING | — | |
| string_37opt | STRING | — | |
| string_38opt | STRING | — | |
| string_39opt | STRING | — | |
| string_40opt | STRING | — | |
| string_41opt | STRING | — | |
| string_42opt | STRING | — | |
| string_43opt | STRING | — | |
| string_44opt | STRING | — | |
| string_45opt | STRING | — | |
| string_46opt | STRING | — | |
| string_47opt | STRING | — | |
| string_48opt | STRING | — | |
| string_49opt | STRING | — | |
| string_50opt | STRING | — | |
| string_51opt | STRING | — | |
| string_52opt | STRING | — | |
| string_53opt | STRING | — | |
| string_54opt | STRING | — | |
| string_55opt | STRING | — | |
| string_56opt | STRING | — | |
| string_57opt | STRING | — | |
| string_58opt | STRING | — | |
| string_59opt | STRING | — | |
| string_60opt | STRING | — | |
| string_61opt | STRING | — | |
| string_62opt | STRING | — | |
| string_63opt | STRING | — | |
| string_64opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |