Prompt List Iterator π
Run 50 prompts overnight without touching the queue once
- prompt
- total_prompts
- is_last
- summary
The classic overnight-batch workflow is: paste prompt 1, queue, wait, paste prompt 2, queue, wait - for fifty prompts, until you hate yourself. Prompt List Iterator π is the "run the whole list while you sleep" node. Point it at a text file (or a folder of text files), wire an index into it, and it hands back the Nth prompt plus bookkeeping outputs that let the graph know when it's done.
It's a workflow-control node, not a prompt-magic node. Its whole job is to turn a pile of prompts into a wireable sequence.
How it works
Two source_modes. single_file reads one .txt file where each non-empty line is a prompt (lines starting with # are skipped as comments - handy for organizing). folder_of_files points at a directory where each .txt file's full trimmed contents is one prompt, files sorted alphabetically so the order is stable.
index (0β999999) selects which prompt to return - that's the wire you drive with the pack's Batch Counter's index output, which increments every queue run. wrap_around controls the end of the list: True cycles back to prompt 0 and keeps going forever; False clamps at the last prompt and sets is_last=True so a downstream Conditional Gate can stop the loop cleanly instead of repeating.
Outputs: prompt, total_prompts, is_last, and summary. The is_last output is the one that makes batch automation trustworthy - without it, "run until done" means "watch the folder yourself."
The inputs that matter
path, source_mode, index, wrap_around. That's the surface. The canonical setup is: text file of 50 prompts, Batch Counter driving index, Prompt List Iterator into your encoder, is_last gating a stop. Queue once, come back to 50 images.
Installing it
It's a Workflow-category node in the OmniNodes pack:
cd ComfyUI/custom_nodes/
git clone https://github.com/TensorVizion/OmniNodes
Restart ComfyUI (or search "OmniNodes" in ComfyUI Manager). No extra dependencies - pure Python standard library. Registers under TensorVizion/Workflow. If it doesn't appear, restart completely and check the terminal for [OmniNodes] β
Loaded lines.
The honest gotcha: it returns whatever's in the file, so a file with a typo'd prompt will cheerfully generate a typo'd image. Keep the list file tidy - the node is a faithful servant, not a proofreader.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | β | |
| source_mode | COMBO | 2 options: single_file, folder_of_files | |
| index | INT | 00β999999 | β |
| wrap_around | BOOLEAN | true | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | β |
| total_prompts | INT | β |
| is_last | BOOLEAN | β |
| summary | STRING | β |