Text List to Sequence
Your prompt grid is built — now make ComfyUI actually run it, one prompt at a time
- text_list
- string
Here's the whole trick this pack depends on, and it's easy to miss: in opvelll/ComfyUI_TextListProduct, a LIST is one value. Your product node hands you the entire grid of prompt combinations as a single thing flowing down one wire. That's great for building the grid. It's useless for generating - because nothing on the other end is going to run once per item.
TextListToSequence is the bridge. It takes that custom list and emits it as ComfyUI's sequential STRING output, which means every downstream node that normally accepts one string executes once per list item. One queue entry per prompt. That's the difference between "I built eight prompts" and "I generated eight images."
How it works
The mechanism is one flag and some defensive validation. The node sets OUTPUT_IS_LIST = (True,) on a STRING return type, which tells ComfyUI "iterate this." Before it hands the list over, it checks three things:
- the input is actually a list (else
TypeError), - the list isn't empty (else a clear
ValueError- ComfyUI can't safely process an empty sequential list, and the author chose to error loudly instead of failing silently), - every item is a string, and if one isn't, the error tells you the exact offending index.
Empty-string items are valid and cause one downstream run with an empty string. Order is preserved. Note what it does not do: it doesn't use INPUT_IS_LIST. The input side stays the pack's custom LIST container, so you feed it from this pack's own nodes, not from arbitrary sockets.
Inputs and output
One input, one output - this is a bridge node, not a control panel.
text_list- a connectedLIST. Forced input, so you can't leave it dangling.string- the sequentialSTRINGoutput. Wire it into anything that accepts a plain string:CLIP Text Encodeis the canonical target.
The README's recommended chain for sequential prompt generation is exactly:
TextListProduct → Text List to Sequence → CLIP Text Encode
You can also go straight from MultilineStringToList if you just want to run a handful of prompt candidates one by one. Both work; the product nodes just give you the full combinatorics first.
Installing it
Same pack, same trivial install. Via ComfyUI Manager, search "Comfy UI Text List Product" in "Install Custom Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/opvelll/ComfyUI_TextListProduct
Then restart ComfyUI. Pure Python, no dependencies to resolve, no models to download - this is one of those rare custom nodes that can't break your environment. MIT-licensed, with a test suite that covers the empty-list and wrong-type error paths.
Where people get burned
Two failure modes dominate, and both are actually informative errors instead of silent weirdness - appreciate that, it's rare in this ecosystem.
First, the empty-list error. You get it when whatever feeds this node produced [] - a MultilineStringToList with blank text, or a product whose max_results capped every combination away. The error message tells you exactly that: at least one item required. Check upstream.
Second, the non-string item error with an index. That means something on the list isn't text - usually a list from a node outside this pack, or a value you assumed was a string. The index in the message points at the culprit.
The conceptual trap is expecting the LIST socket to fan out on its own. It won't - and honestly that's the right design. Lists stay grouped while you're still doing list math (products, concats, pairings), and you add TextListToSequence only at the exact point where downstream should start running once per string. Stick it too early and you'll serialize work you meant to batch. Stick it after a Save Text File and you get the file written N times. Place it as the final hop before generation and it does exactly the boring, correct thing.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text_list | LIST | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |