Text Joiner
Turn a list of tags into one comma-separated prompt
- text_list
- joined_text
Lists are great until a node wants one big string. Text Joiner takes a list of strings and glues them together with a delimiter - the inverse of a text splitter. Feed it ["cinematic", "volumetric light", "8k"], set the delimiter to ", ", and out comes "cinematic, volumetric light, 8k", ready for the CLIP encoder. It's the node that makes tag lists and modular prompts actually work.
It's part of DebugPadawan's ComfyUI Essentials, a pure-Python utility pack. The mechanism is Python's str.join() with a couple of thoughtful options.
How it works
Two required inputs:
text_list- the LIST of items to joindelimiter- the string to put between items (default", ")
Three optional inputs:
prefix- text prepended to the whole result (default empty)suffix- text appended to the whole result (default empty)skip_empty- BOOLEAN, default True: drop blank/whitespace-only items before joining
One output: joined_text - the combined STRING.
A few implementation details worth knowing. Every item is coerced with str(), so a list of numbers or mixed types joins fine. With skip_empty on (the default), ["a", "", "b"] joins as "a, b", not "a, , b". And the prefix/suffix wrap the entire result, not each item: prefix="Colors: " gives "Colors: red, green, blue".
Where you'll use it
- Building prompts from parts. Assemble a prompt from a style list, a subject, and a quality tag, then join into one string for
CLIP Text Encode. - Tag normalization. Join a deduplicated tag list (pair with the pack's
List Deduplicator) into a clean comma-separated prompt. - Filenames and labels. Join tokens with
"_"or"-"and add a prefix/suffix for structured names. - Reversing a split. If
Text Splitterbroke something apart, this puts it back together - great for round-tripping.
Installing it
Whole pack, one install. ComfyUI Manager, searching for "DebugPadawans-ComfyUI-Essentials," or:
cd ComfyUI/custom_nodes
git clone https://github.com/DebugPadawan/DebugPadawans-ComfyUI-Essentials
Then restart ComfyUI. Requirements (numpy, torch, opencv-python) are already satisfied by stock ComfyUI; no model downloads. Don't confuse the pack with cubiq's "ComfyUI Essentials" when searching Manager - a different, larger pack now in maintenance mode.
Gotchas
skip_emptydefaults on. If you actually want to keep empty slots (e.g. joining fixed-width fields), flip it off.- Empty list gives just
prefix + suffix-""by default. Not an error, just empty output; check your upstream list if joined text keeps coming out blank. - The delimiter is a literal string, so a delimiter of
", "inserts a comma-space;"\n"won't produce newlines unless you actually pass a newline character. - Whitespace-only items count as empty when
skip_emptyis on (it checks.strip()). - Small, quiet pack - the source is the doc.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text_list | LIST | — | |
| delimiter | STRING | , | — |
| prefixopt | STRING | — | |
| suffixopt | STRING | — | |
| skip_emptyopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| joined_text | STRING | — |