AGSoft Loop Texts
Gather a dozen prompts into one list without a daisy-chain of nodes
- STRING
Every now and then a workflow needs to run a bunch of prompts through the same pipeline - an A/B test of ten styles, a character sheet, a batch of variations. ComfyUI doesn't make that obvious, and the naive way to do it is a horrible tangle of concatenate nodes. AGSoft Loop Texts is the tidy answer: you type in N separate text fields, and out the other end comes one clean list of strings that a loop or switch can chew through.
It's from the AGSoft pack's "Loop" family - same idea as its Loop Random Seed, but for text. The node is a collector, not a generator: nothing is transformed, no defaults are injected, just your inputs gathered in order.
How it works
One knob, number_of_inputs (1–50). Set it to 5 and the node grows text_1 through text_5 input fields - managed dynamically by the pack's JavaScript frontend, so you don't see dead sockets for inputs you didn't ask for. On execution it walks the inputs in order, skips any that are None, and returns them as a single STRING list.
That list is exactly what batch-oriented nodes want. Feed it into a ForEach-style processor, a prompt-switch that cycles a sampler through each entry, or anything else that accepts a list of strings. The ordering is preserved, so input 1 is always first in the list - worth knowing if your prompts build on each other.
What to wire where
There's really one input that matters (number_of_inputs) and one output (the list). The tooltip spells out the intended companions: "Prompt Switch, ForEach, etc." If you're on ComfyUI with a loop-capable pack like rgthree's or the ones built around batch iterators, this is the feeding node on the upstream side.
One honest caveat: each text field here is a plain input - if you want the result of another node piped in (say, a translated prompt), you can connect a text output into a field, but then it stops being "static text" and becomes a pass-through. Fine either way; just know which one you're building.
Installing and using it
It's the standard AGSoft install - no surprises:
cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft
Then restart ComfyUI (or find "comfyui-AGSoft" in ComfyUI Manager). No model downloads, nothing exotic in requirements - numpy and opencv are in the pack's deps but this node doesn't touch them.
If the list ever comes back wrong, it's almost always a wiring issue - one input left unconnected (which is skipped, so the list silently shrinks) or an unexpected ordering assumption downstream. If you need a fixed-size list including blanks, you're better off with the pack's Text Concatenate nodes, which can pad with delimiters. For straight "these N prompts, in order," this is the one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| number_of_inputs | INT | 21–50 | How many text inputs to create. Each input will be named text_1, text_2, etc. Example: number_of_inputs=3 → creates text_1, text_2, text_3 Сколько текстовых входов создать. Каждый вход будет называться text_1, text_2 и т.д. Пример: number_of_inputs=3 → создаются text_1, text_2, text_3 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |