Concatenate Text Lists (Autogrow)
Concatenate Text Lists, Element by Element
- delimiter
- text_inputs
- concatenated text
The scalar UC_TextConcatenateAutogrow joins text parts into one string. This node does the same thing but element-by-element for lists - perfect for batch workflows where you've got a list of subjects and a list of styles and you want position 1 joined with position 1, position 2 with position 2, and so on. It's the prompt-builder that scales to a whole batch in one pass.
Why you'd reach for it
Any workflow that runs a batch of generations with per-item prompts. Say a list node hands you five subjects and another hands you five style strings: this node emits a list of five joined prompts, and you can wire that list straight into a batch-friendly text encode or a loop. The "autogrow" part is the same as its scalar sibling - new text_N sockets appear as you connect wires - but the semantics are list-aware.
The two behaviors that make it genuinely useful:
- Broadcasting - a scalar input is reused for every output. So one fixed "quality tags" string plus a list of five subjects yields five prompts that all carry the quality tags.
- Per-index delimiters - the
delimiterinput accepts either a single value (used for every join) or a list of values, one per output. Mostly you'll use one delimiter, but the option is there if your batch needs varied separators.
Index alignment is exact: output i is built from input index i of each list, with shorter lists having their last value broadcast to fill, and the output list has the length of the longest input.
The outputs
One concatenated text output that is itself a list - feed it into a list-consuming node or an encoder that accepts lists, and you've turned "build N prompts by hand" into "build N prompts automatically." The exact-match tooltips: the delimiter is "one delimiter for every output, or one delimiter per output," and each input is "one value for every output, or one value per output."
Installing it
It's in ComfyUI-UtilsCollection (author: silveroxides):
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart ComfyUI, or install "ComfyUI-UtilsCollection" via Manager. Just the pack's opencv-python / typing-extensions requirements - nothing more.
Where people get tangled
The most common stumble is expecting a list output to act like a single string. If you wire this into a scalar text socket, only one value flows and it's usually the first. Second: when lists differ in length, the last value of the shorter list is broadcast to fill the gap rather than the join failing - which is usually what you want, but it can silently repeat a value if you assumed strict alignment. And don't confuse it with the scalar joiner; reach for UC_TextConcatenateAutogrow when you want one string out. Keep those two straight and this node is painless.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| delimiteropt | * | Use one delimiter for every output, or one delimiter per output. | |
| text_inputsopt | COMFY_AUTOGROW_V3 | Use one value for every output, or one value per output. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| concatenated text | STRING | — |