Any Concat
Join up to five strings with a custom delimiter
- STRING
Despite the "Any" in the name, this one's actually typed: five optional STRING inputs (text1 through text5) and a required delimiter, joined into one STRING output. Whichever of the five slots you leave unconnected simply gets skipped - you don't have to fill all five to use this node, and you don't get stray empty segments in the result from the ones you didn't wire up.
What it's for
The obvious job is building a compound prompt or label out of pieces that live in different parts of your graph. Pair it with PonyPrefixesNode's output and your own subject description, or with Checkpoint Selector's string output plus a sampler name plus a CFG value, and you've got a one-line label ready for a filename or a saved-image path - exactly the kind of self-documenting output that matters in an XYZ-plot-style sweep, where you're saving a lot of images and want to know which settings produced which without opening metadata.
The delimiter input is what makes it more than a fixed-format concatenator - set it to ", " for a prompt fragment, to " - " or "_" for a filename-safe label, or to an empty string if you want the pieces jammed together with no separator at all.
The inputs and output
delimiter(STRING, required, default" ") - placed between each connected piece.text1throughtext5(all optional, STRING) - connect as many or as few as you need. Unconnected slots are skipped, not inserted as empty strings between delimiters.- Output: a single
STRING, the joined result.
How to install it
ComfyUI Manager: search DemonAlone-nodes-ComfyUI, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/DemonAlone/DemonAlone-nodes-ComfyUI
then restart. No dependencies, no models - a pure string utility.
Common issues & troubleshooting
I need more than 5 pieces joined. Chain two of these: concatenate your first five, feed that result into text1 of a second Any Concat, and continue from there. There's no variadic version in this pack.
I tried wiring a non-string value in and it didn't work as expected. The inputs are typed STRING, not a true wildcard, despite the node's name - if you're feeding in an integer, float, or a wildcard * value from another node, convert it to a string first (this pack's own converter nodes, or a native ComfyUI string-conversion node, handle that).
My delimiter is showing up where I didn't expect it. It's placed strictly between connected pieces, in the order text1 → text5. If a middle slot is unconnected, the delimiter doesn't leave a gap for it - the two neighboring connected pieces sit next to each other with one delimiter between them, not two.
Result has leading or trailing delimiter characters. That generally means an outer slot (text1 or text5) is unconnected while an inner one is filled - check which slots are actually wired versus which ones you assumed were.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| delimiter | STRING | — | |
| text1opt | STRING | — | |
| text2opt | STRING | — | |
| text3opt | STRING | — | |
| text4opt | STRING | — | |
| text5opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |