Prompt Batcher
One box of prompts, one queue, and a shared prefix on every one
- prompt
Prompt Batcher is the node that turns a wall of prompts into a queue: type one prompt per line, add a shared prepend and append, and it outputs the whole thing as a batch - one item per line - for downstream nodes that iterate a list. It's for the "I have 15 prompts and I want them all run with the same quality keywords" moment, which is more common than the tutorials admit.
It's part of ComfyUI-FBnodes, François Beaudry's utility pack. Nothing about it is glamorous, which is the point: it's a batch-text utility, the kind of node you reach for when manual copy-paste starts eating your evening.
How it works
Three text inputs: prepend, prompts (multiline), and append. The node splits prompts on newlines, drops empty lines, trims each one, and builds prepend + prompt + append for every line, inserting commas so the grammar stays sane (prepend and append only add a separator if they're non-empty). The result comes out the prompt output as a STRING list - which is the important bit for ComfyUI: nodes that consume batches (prompt schedulers, batch testers, list iterators) see multiple items and run one generation per item.
It also prints each assembled prompt to the console as it goes, so you can verify what's actually being generated without staring at the graph. And the source file is careful about safeguards: empty lines are stripped and a totally empty prompts box returns a single empty prompt rather than nothing, so you can't accidentally queue a run of zero items.
The inputs
prepend(STRING) - text added before every prompt. This is where your shared quality keywords go.prompts(STRING, multiline) - one prompt per line.append(STRING) - text added after every prompt.
Output: prompt (STRING, list).
Installing it
ComfyUI Manager - search "ComfyUI-FBnodes" - or:
cd ComfyUI/custom_nodes
git clone https://github.com/FranckyB/ComfyUI-FBnodes.git
pip install -r ComfyUI-FBnodes/requirements.txt
Restart ComfyUI. Pure text handling - the pack's av/color-matcher dependencies are irrelevant here.
Gotchas
The thing to remember is that it batches, it doesn't randomize or dedupe - if you paste the same prompt twice you'll generate it twice. There's also no wildcard support in the node itself; if your batch needs {random} substitutions or CSV-driven variation, that's a different tool's job. And be careful what you put in prepend: because it's applied to every line, a stray trailing comma or a long quality tag inflates every prompt in the batch, and the console print is your friend for spotting that before the queue starts.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prepend | STRING | Text prepended to every prompt. | |
| prompts | STRING | Each line is treated as a separate prompt for batch processing. | |
| append | STRING | Text appended to every prompt. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |