Prompt Queue
Generate a whole batch of scenes without touching ComfyUI again
- text
Prompt Queue is the node that turns one text box into a whole batch job. Paste a multi-line list of prompts, connect its text output into your conditioning, set ComfyUI's batch count to match, and each queue run feeds the next line down the graph. You walk away; the node babysits the list. It's the "Storyteller" pattern the Flow Assistor README pushes, and for anyone who generates multi-scene comics, slideshows, or variant tests it's the most useful node in the pack.
How it works
This is a stateful node, which is rarer than it should be in ComfyUI. On every execution it hands back the current line, then advances an internal pointer. The pointer lives in a per-node state store keyed by the node's unique ID, not on the node object, because ComfyUI's V3 API doesn't keep node instances alive between runs. Two details matter if you're debugging:
- The whole list is the config. If you change the
promptstext, the node re-parses and starts over from line 1. You don't need to hunt for a reset button. reset_triggerforces a restart. Bump it (any integer change works) and the pointer jumps back to the start mid-run.
The only input you really touch is prompts - a multiline text field. The other three are genuinely optional:
on_end- what happens when you run out of lines:empty(outputs a blank string and stays at the end),repeat_last(keeps emitting the last line), orloop(wraps back to the top).loopis your friend for endless K-Sampler iteration testing;repeat_lastis handy when batch count slightly overshoots the list.strip_linesandskip_empty_lines- both default totrue, and you basically never turn them off. They kill stray whitespace and blank lines so your queue doesn't cough up an empty prompt halfway through.
Output is a single text (STRING). Wire it into a CLIP Text Encode in place of your normal prompt box.
Installing
This ships in the ComfyUI-Flow-Assistor pack - install via ComfyUI Manager (search "Flow Assistor"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/Merserk/ComfyUI-Flow-Assistor.git
Then restart ComfyUI. Two version gotchas: the pack is V3-only (it needs a current ComfyUI build with the comfy_api.latest node API - an old ComfyUI simply won't load it), and it has zero extra Python dependencies beyond what ComfyUI already ships. If it doesn't appear after install, update ComfyUI first, not the pack.
Where people get burned
The classic mistake is expecting Prompt Queue to be stateless. Because it advances on every execution, running the graph once to test a single prompt will silently skip you ahead in the list. If you're debugging one line, connect the line to a plain text node or reset the trigger before you run. Also remember it's per-node: duplicate the node and it starts its own independent queue, which is exactly what you want for positive/negative pairs.
For the "why" behind ComfyUI's endless small nodes and the dependency friction around them, the ecosystem essay in the knowledge base sets the context; this pack at least sidesteps the dependency part entirely.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prompts | STRING | — | |
| on_endopt | COMBO | empty | 3 options: empty, repeat_last, loop |
| strip_linesopt | BOOLEAN | true | — |
| skip_empty_linesopt | BOOLEAN | true | — |
| reset_triggeropt | INT | 00–2147483647 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |