CoachBate Batch Prompter
Queue 40 prompts without ever touching the Queue button again
- prompt
You've got 40 prompt variations and the patience for about three. CoachBate Batch Prompter is the node that runs the rest of them for you: type one prompt per line in a multiline box, hit Queue, and it spits out one prompt per queue run, auto-advancing to the next line each time. Set it loose with Auto Queue and it burns through the whole list without you re-queuing anything. Think of it as the still-image cousin of the pack's Shot Loader - same self-advance idea, no JSON file required.
Two ways to run a batch
The queue_all_at_once toggle picks your poison:
- ON (default) - pressing Queue posts every prompt into ComfyUI's queue as a separate job, all at once. Fast, deterministic, and every job is visible in the queue panel up front. You won't see individual results stream in real time, but the batch just runs.
- OFF (sequential) - one prompt per run, and the next job only fires after the previous one finishes. That gap is the feature: you can tweak a sampler setting or swap a LoRA between jobs and the next prompt picks it up. This is the mode to use when you're iterating and want to watch each result land.
How it works
Each run reads the starting position, finds the next non-blank line, and emits it. A frontend extension reads the node's next_start_index UI value and writes it back into the widget - which changes the workflow hash and makes Auto Queue re-fire with the advanced position. When the list is exhausted it sends a coachbate.batch_done event that clears pending queue items, which is what stops the "dozens of failing jobs" runaway you can get with run-on-change setups.
Inputs that matter
multiline_text- one prompt per line. Blank lines are ignored, and importantly they don't count toward numbering.prepend_text/append_text- text tacked onto every prompt before output. Great for injecting a shared quality tag or style suffix.starting_number- 1-based prompt to start from, matching the gutter numbers. Set it back to 1 to restart. During a run it advances on its own; when a sequential batch finishes it's restored to what you started with.max_prompts- hard cap on how many prompts run. Blank lines don't count.randomize(optional) - runs the prompts in random order, never repeating, reshuffled on every Run press. Withmax_prompts = 1it's a single randomly chosen prompt - a cheap way to inject one random entry into a workflow.
The job_index / job_total inputs are set automatically by the fan-out; you don't touch them.
The output
One socket: prompt (STRING), the current line with prepend/append applied. Wire it into your CLIP text encoder (or wherever your prompt goes) and you're done.
Common issues
- Nothing happens / falls back to a single queue - the node only drives a batch when it's active (not muted/bypassed) and has its output wired to something. An active-but-unconnected node is ignored.
- Two Batch Prompters in one graph - only one eligible node drives the batch; with two, the run falls back to a normal single queue. Keep one.
- Restarting mid-list - just set
starting_numberback to 1 and hit Queue.
Installation
Install via ComfyUI Manager (search "CoachBate") or:
cd ComfyUI/custom_nodes
git clone https://github.com/CoachBate/ComfyUI-CoachBate.git
Restart ComfyUI and the node appears under CoachBate in Add Node. No Python dependencies, no model downloads - it's a frontend-plus-python utility. The pack is alpha-stage personal tooling, so treat quirks as part of the deal.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prepend_text | STRING | Text prepended to every prompt before it is output. | |
| multiline_text | STRING | a beautiful sunset over the ocean a mountain landscape at dawn a city skyline at night | One prompt per line (blank lines are ignored). Turn newline_delimiter OFF to separate prompts with "||" instead, so one prompt can span several lines. |
| append_text | STRING | Text appended to every prompt before it is output. | |
| starting_number | INT | 11–9999 | Prompt number (1-based) to start from, matching the gutter numbers — blank lines don't count. Advanced automatically during a run; restored to its original value when the batch finishes. |
| max_prompts | INT | 10001–9999 | Maximum number of prompts to run. Blank lines don't count. |
| queue_all_at_once | BOOLEAN | true | ON — Queue All At Once (default): Pressing Queue immediately posts every prompt as a separate job into ComfyUI's queue. All jobs are visible in the queue panel up front and run back-to-back without any delay between them. Fast, but you won't see individual prompts appear in real time — they all land in the queue before the first one even starts. OFF — One At A Time (sequential): Works exactly like the Shot Loader node. Pressing Queue runs a single prompt, then waits for it to fully finish before firing the next one. You see each result appear before the next job starts. Because there is a gap between jobs, you can tweak the workflow — change a sampler setting, swap a LoRA, adjust a prompt — and the change will be picked up by the next job. To restart from the beginning, set Starting Number back to 1. The Stop button halts the sequence at any point. |
| job_indexopt | INT | 00–9999 | Set automatically by Queue All Prompts. 1-based position of this job in the bulk batch. |
| job_totalopt | INT | 00–9999 | Set automatically by Queue All Prompts. Total number of jobs in the bulk batch. |
| randomizeopt | BOOLEAN | false | Execute the prompts in random order — never repeating — until max_prompts is reached. Reshuffled on every Run press. With max_prompts = 1 this runs a single randomly chosen prompt, handy for injecting one random prompt into a workflow. Prompts before starting_number are excluded from the pool. |
| newline_delimiteropt | BOOLEAN | true | ON — New line delimiter (default): Every non-blank line is its own prompt. OFF — Double pipe delimiter: Prompts are separated by "||" instead, so a single prompt can span as many lines as you like. Useful for the very long prompts newer models take, where flattening each one onto a single line is tedious. The gutter numbering updates to match either way. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |