LZ String Concat
Join prompt parts without thinking about joins
- string
Prompts are almost always assembled from parts - a base, a subject, an artist, a quality suffix - and doing that with a handful of string nodes plus manual edits is how prompts get mangled. LZ String Concat is the pack's plain-Jane answer: up to five text inputs, one separator, and it joins whatever's actually populated, skipping the empties, so you can build a prompt from components without ending up with stray commas or doubled separators.
The "skips the empties" bit is the feature that separates this from a naive join. Leave text2 blank and it simply isn't in the output; there's no ",, " artifact to clean up. That makes it genuinely pleasant to compose prompts as blocks - say "1girl, school uniform" in one box, an artist in another, quality tags in a third - and toggle blocks by emptying them rather than deleting and re-adding nodes.
The inputs
separator- what goes between parts. Default", ", which is the booru-friendly delimiter the KB's prompt-engineering notes everyone uses for tag models.text1…text5- the parts to join. Any can be left blank.
There's a small bit of frontend polish here: the pack's JavaScript hides trailing empty inputs, so a node with three populated boxes shows three boxes, not five. Populate the fourth and it appears. The node sorts the inputs numerically before joining, so order is always text1, text2, … regardless of connection order.
The behaviors worth knowing
Only populated strings are joined - a blank middle input is skipped, not emitted as an empty segment. It's a strict string operation: numbers must be strings before they go in, and there's no trimming beyond what you type (it strips surrounding whitespace on each part). If you need five-plus parts, chain two concats; if you need the parts to persist as a reusable list, the pack's LZStringSelect is the index-based picker, not this.
A pattern that works well: wire the output into LZTextPreview so you can see the assembled prompt after each run, then feed the result into a CLIPTextEncode or the pack's pipe system. With wildcard-replace nodes upstream, the concat becomes the "now assemble the final string" step of your pipeline.
Where it's not the right tool
If your parts contain commas you want preserved as-is, that's fine - this node just joins with the separator, it doesn't parse anything. The thing it can't do is conditionally include different text based on a switch; that's LZStringSelect's job. And like all the text utilities in this pack, it's encoding-agnostic - it produces text, and whether (tag:1.2)-style weighting in that text does anything depends entirely on the text encoder downstream (inert on LLM-encoded models, per the KB). The concat itself never judges.
Installing it
Part of the ComfyUI-LZNodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/liz-ils/ComfyUI-LZNodes
Restart ComfyUI, or ComfyUI Manager → search "ComfyUI-LZNodes". No extra dependencies, no model downloads.
It's a boring node, and that's a compliment. Every workflow needs a few boring nodes that just do the assembly without surprises - this is one of them.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| separator | STRING | , | — |
| text1opt | STRING | — | |
| text2opt | STRING | — | |
| text3opt | STRING | — | |
| text4opt | STRING | — | |
| text5opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |