Light-Tool: Connect Text Strings
Join up to eight strings plus a whole list — the pack's one-stop string splicer
- string_list
- text
ComfyUI is a graph of typed wires, and one of the most common little chores is "glue a bunch of strings together into one prompt/tag/path." That's this node: up to eight individual string inputs (string_1 through string_8) plus one string_list input, all joined by a single delimiter into one output text string. It's the pack's grown-up version of Simple Text Connect, and it's the one you'll actually leave in your default graph.
What you set
Everything except the output is optional - wire only the slots you need. string_list takes a list/array (or a string) and gets merged in with the individual strings, which is what makes this useful: you can pipe in a generated list of tags from another node and splice them together with a fixed prompt fragment. delimiter is the glue - a comma, a space, a newline, whatever. Output is a single STRING named text.
Two behaviors worth knowing before you lean on them:
- Empty values are skipped. The node filters out empty/falsy inputs before joining, so
"a" + "" + "b"with a,delimiter gives youa,b, nota,,b. That's usually what you want when building prompts from optional fragments - but if you were counting on a literal empty slot (say, for a CSV row), it'll surprise you. - The list input is flattened in. If
string_listis a list, its items join alongside the individual strings in the order it was passed.
Where it fits
Prompt engineering is the obvious home: stitch subject + style + quality fragments from separate input nodes into one CLIP-encodable string, or assemble tag lists. It's also the right node for building file paths, delimited data, or anything that's "N strings plus a separator." This pack is text-heavy on purpose - it ships an Input Text node, a Text Replace node, and Show Text - and Text Connect is the hub that makes the fragments useful. The KB's prompt-engineering notes make the same point: ComfyUI workflows live or die on being able to assemble strings from parts, and this is a clean, dependency-free way to do it.
Installing it
Part of ComfyUI-Light-Tool by Hmily. ComfyUI Manager → search "ComfyUI-Light-Tool" → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ihmily/ComfyUI-Light-Tool
pip install -r requirements.txt
# restart ComfyUI
Pure Python string work - no models, no keys, offline.
Where people get burned
- Empty-string filtering. As above - don't rely on empty slots to create separators.
- String-typed vs wildcard.
string_listis a wildcard (*) input, so it accepts lists from other nodes; the individual strings are plainSTRING. If a list won't wire in, it's because you're feeding a type the slot won't take. - Order assumptions. The join order is list-then-individuals as wired; if you need a specific ordering, wire accordingly or use Simple Text Connect for a two-part sequence.
If you've been chaining primitive "concatenate" nodes from other packs, this replaces a lot of them with one clean node.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| string_listopt | * | — | |
| string_1opt | STRING | — | |
| string_2opt | STRING | — | |
| string_3opt | STRING | — | |
| string_4opt | STRING | — | |
| string_5opt | STRING | — | |
| string_6opt | STRING | — | |
| string_7opt | STRING | — | |
| string_8opt | STRING | — | |
| delimiteropt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |