Text Loop Combiner
Accumulate text across a loop with a separator
- text_out
Most text nodes join a fixed number of inputs. This one is built to accumulate - it takes your current text and an optional previous text, and welds them together with a separator you choose. Chain it to itself (or run it in a loop) and you build up a growing list one piece at a time, each entry divided by your chosen character.
That "optional previous input" is the whole trick. Because text_in is optional, the first node in a chain has nothing feeding it and just emits its own text; the next one prepends what came before; and so on. The result is a single string that's really a separator-delimited array - useful for assembling a wildcard list, a batch of prompt variants, or any place you want N fragments collapsed into one delimited value you can split again later.
How it works
It concatenates text onto text_in (if text_in is connected) with seprator between them, and outputs the combined string on text_out. Feed text_out into the next combiner's text_in and the chain grows. With text_in left unconnected, it's just your text on its own - the natural starting link.
The inputs that matter
- text - the fragment to add this step (multiline).
- seprator - the delimiter between entries, default
|. Pick something that won't appear inside your fragments so you can cleanly split them back apart later -|is a good default for exactly that reason. - text_in (optional) - the accumulated text from a previous Text Loop Combiner (or any text box). Connect it to continue a chain; leave it empty to start one.
Output is text_out, the combined delimited string.
Where it fits
Two common uses. One, building a delimited wildcard/option list that you later feed to a splitter node to pick one segment. Two, accumulating results across iterations of a loop so you end with one string holding everything. The | separator pairs naturally with the pack's own wildcard-separator node, which splits a delimited string back into a chosen segment - so this builds the list and that consumes it.
Install
ComfyUI Manager → search ComfyUI_Mira → Install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git and restart. On a load error, pip install -r requirements.txt in the pack folder. No downloads.
Common issues
The classic mistake is connecting text_in on the first node in the chain to something that doesn't exist yet, or forgetting to connect it on the later ones - either way the accumulation breaks. Leave text_in empty on the starter link and wire each subsequent node's text_in to the previous text_out. The other thing: choose a seprator that doesn't occur inside your fragments, or you'll be unable to split them back cleanly. If your entries can contain |, switch to something rarer.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| seprator | STRING | | | — |
| text_inopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text_out | STRING | — |