Winnougan Prompt Cycler π
The Winnougan Prompt Cycler
- prompt
- current_index
- total_prompts
- is_done
"Can I generate one image per prompt from a list?" is one of the oldest questions in ComfyUI - asked back in 2023, when people were porting their A1111 habits over. The Winnougan Prompt Cycler π is the dead-simple answer to it. You point it at a .txt file of prompts, hit Queue once, and it generates one image per prompt, re-queuing itself until the list is done. No babysitting, no scripting, no API keys.
It's the dumb-lazy tool for a real, recurring job: you've got 20 prompt variations to test, or a stack of character/pose ideas for an SDXL or Illustrious batch, and you don't want to sit there pasting prompts and clicking Queue. Drop the list in a file, walk away, come back to a folder of results. The heavy end - wildcards, random composition - is Dynamic Prompts territory, and most people land there eventually. This node is the opposite: no syntax, no config, just a text file and a path. For a straight sequential list, that's all you wanted.
How it actually works
Under the hood it's minimalism plus one genuinely clever bit. The node reads your .txt, splits it on blank lines (that's the separator - a single newline does not count), and strips each block. It keeps its position in a small prompt_cycler_state.json next to its own code, so a crash or restart picks up where it left off instead of re-running the list. It also returns a fresh value from IS_CHANGED keyed on that state file - the standard plumbing trick that stops ComfyUI's aggressive caching from skipping the node on the next run.
The clever part is the auto-requeue. ComfyUI's frontend has no "run this graph N times with a different value each time" button, so the node fakes it: it patches the server's prompt queue to capture a snapshot of your workflow, advances its index, then POSTs that snapshot back to its own local API at http://127.0.0.1:8188/prompt with a unique _run_id injected to bust the cache. The next execution reads the next prompt. So the node is quietly acting as a one-call API client - except the API it calls is its own ComfyUI, no key, no network. That's the whole trick, and it's why "auto requeue" barely shows up elsewhere in the community: a small piece of genuine engineering for a convenience that feels like it should be built in.
The inputs and outputs that matter
Four inputs, though you'll mostly touch two:
txt_file- the full path to your prompts file. This is the one that bites people (see below).reset- defaults to "Continue". Flip it to Reset to first, queue once, then flip it back. That's how you restart from prompt 1.loop- ON restarts from the top after the last prompt instead of stopping. Handy for unattended testing.auto_requeue- ON by default; it's what makes the walk-away workflow work. Leave it on unless you want to step through manually.
Outputs: prompt (STRING - wire this to the positive input of your CLIP Text Encode), plus current_index (0-based position), total_prompts, and is_done (True on the last one).
Installing it
Search "Winnougan Prompt Cycler" in ComfyUI Manager and hit install, or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/Winnougan/Comfy_Prompt_Cycler.git winnougan_prompt_cycler
Then restart ComfyUI. That's it - zero dependencies (its pyproject.toml list is empty), no model downloads, MIT-licensed, pure Python leaning on ComfyUI's own server. The author's a solo creator (Patreon/Ko-fi, "Lord Winnougan") without the reputation tail of the big packs, but the whole source is ~200 lines, so read it if you care.
Where people get burned
- The default
txt_filepath is the author's own Windows path (C:\Users\uthma\Downloads\prompts.txt). You will forget to change it, and the node then hard-errors "File not found." Windows keeps backslashes; Linux/macOS want a normal/home/you/prompts.txt. - Blank lines are the separator, not single newlines. Write one prompt per line with no blank lines and you get one giant prompt, not a list.
- The first queue can warn "No snapshot yet - queue manually once to start the chain." It needs the workflow snapshot before it can loop; see that console line, click Queue once more, done.
- Auto-requeue hits
127.0.0.1:8188. Different port, proxy, or remote box and the requeue silently fails - it only prints a warning. Local default install? Fine. Anything exotic, expect to click Queue yourself. - Editing the
.txtmid-list drifts your position - the index is saved, not recomputed. Flipresetto start over clean. loopON left running generates forever - fine for testing, surprising when you come back to 400 images.
Verdict: if your batch is "here is a list, make one image of each," this is the least-effort tool going. It won't replace Dynamic Prompts for clever prompt math, but it was never trying to.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| txt_file | STRING | C:\Users\uthma\Downloads\prompts.txt | β |
| reset | BOOLEAN | false | β |
| loop | BOOLEAN | false | β |
| auto_requeue | BOOLEAN | true | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | β |
| current_index | INT | β |
| total_prompts | INT | β |
| is_done | BOOLEAN | β |