Batch Prompts
Render Every Prompt in a File Without Touching the Queue
- positive
- negative
- full_prompt
- next_prompt
- current_index
- total_prompts
- batch_info
The tedium of prompt testing is pasting a new prompt, queuing, waiting, pasting again. Batch Prompts automates the pasting: it reads a list of prompts from a text file and hands them to your workflow one at a time, advancing automatically on every run. Queue it once and let it chew through your whole list.
How it works
You keep a plain text file where prompts are separated by a line of three dashes (---):
a red convertible at golden hour
---
a blue sedan in the rain, Negative: rainy windshield, fog
---
a vintage motorcycle, studio lighting
The node loads the file, picks the prompt at the current index, and - the important part - increments that index after every execution. Each time you queue, you get the next prompt. Two flags control the loop: wrap_around sends you back to prompt #1 after the last one instead of dying, and auto_increment (on by default) is what makes it self-advancing in the first place; turn it off and it just holds a fixed index so you can step manually.
If split_negative is on (it is by default), it looks for a Negative: marker and splits the entry into separate positive and negative strings. That's the SDXL-style convention, and it saves you from hand-editing the file into two columns.
Inputs and outputs
The ones that matter:
- prompt_file - path to the text file. Relative paths resolve against ComfyUI's
inputdirectory, so a default ofprompts.txtmeansComfyUI/input/prompts.txt. Absolute paths work too. - index - the current 0-based position. Setting it manually jumps straight to a specific prompt.
- reload_file (optional) - force a re-read from disk if you edited the file mid-run.
Outputs are the useful part: positive, negative, and full_prompt feed your text encoders; next_prompt shows what's coming up; and current_index / total_prompts / batch_info are there for conditioning or just for you to see where you are.
Installing it
It's part of the ComfyUI-KikoTools pack. ComfyUI Manager β search "ComfyUI-KikoTools" β Install β restart, then look under ComfyAssets β Text. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/ComfyAssets/ComfyUI-KikoTools.git
cd ComfyUI-KikoTools
pip install -r requirements.txt
Restart ComfyUI. No models, no keys.
Gotchas
Three things bite people. First, file location: a bare filename like prompts.txt is looked up in ComfyUI/input, not next to your workflow - people drop the file somewhere else and get "No prompts found." Second, the separator must be at least three dashes; if your file has a stray line that doesn't split cleanly, the node treats it as part of the previous prompt. Third, split_negative only fires on the literal Negative: marker - if you used "negative prompt:" or a different label, you'll get everything dumped into positive. Also worth knowing: because each run uses a fresh file read unless you toggle reload_file, editing the file mid-batch sometimes needs a manual reload to take effect.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_file | STRING | prompts.txt | Path to text file containing prompts separated by '---' |
| index | INT | 00β9999 | Current prompt index (0-based) |
| auto_increment | BOOLEAN | true | Automatically increment index after each execution |
| wrap_around | BOOLEAN | true | Wrap to first prompt after reaching the end |
| split_negative | BOOLEAN | true | Split prompts into positive/negative at 'Negative:' marker |
| reload_fileopt | BOOLEAN | false | Force reload file from disk |
| show_previewopt | BOOLEAN | true | Show prompt preview in console |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| positive | STRING | β |
| negative | STRING | β |
| full_prompt | STRING | β |
| next_prompt | STRING | β |
| current_index | INT | β |
| total_prompts | INT | β |
| batch_info | STRING | β |