Prompts from textbox
Batch through a prompt list where every line also rolls the wildcard dice
- prompt
- line_counter
- total_counter
This is the node people mean when they want Automatic1111's "Prompts from file or textbox" inside ComfyUI. Paste a list of prompts into the box, one per line, and every time you hit queue the node serves up the next line. Then it adds the good part: each line is expanded through Impact Pack's wildcard engine with a seed you control, so one line of 1girl, __haircolor__ hair, __outfit__ can yield a different prompt on every queue run. Batch twenty lines, queue twenty, get twenty distinct generations from one textbox.
It's the wildcard-aware sibling of the pack's "Strings from textbox" node - same counter machinery, plus wildcard processing per line.
How it works
The mechanism is a counter wrapped around line extraction, with a JS extension doing the bookkeeping. A small script (the same StringsFromTextbox.js file handles both textbox nodes) hides the counter widget and increments it on every promptQueued event, so consecutive queue hits step through the lines automatically. In Fixed mode, each run reads line start + counter - 1 and leaves start alone; in Continued mode, start itself advances, so the position carries over across queue sessions - batches resume where they left off. repeats_per_line makes the node hold on a line for N runs before stepping. Then the chosen line goes through impact.wildcards.process(line, seed).
Inputs that matter
wildcard_text(STRING, multiline) - your prompt list. Each line may contain__wildcard__/{a|b|c}syntax.seed(INT) - fixed seed = reproducible expansion for every line.start(INT, default 1) - the line to begin at.mode- Fixed vs Continued, the tooltip explains: "If Fixed, start is left unchanged; if Continued, start is updated to the number at which the process has progressed."repeats_per_line(INT, default 1) - how many runs each line gets.counter(INT) - internal; the JS owns it and the README says any value you set is ignored.
Outputs
prompt(STRING) - the expanded line → your text encoder.line_counter(STRING) andtotal_counter(STRING) - both are strings, not ints, which is mildly annoying if you want to feed them into numeric nodes. Use them as display, or convert.
The workflow
A dozen prompt lines in the box, set the queue batch to the number of lines (times repeats), hit queue once, and every image in that run has its own prompt. It's the cleanest no-code batch generator in this pack, and the seed makes each line's wildcard roll reproducible when you need it to be.
Gotchas
- It calls Impact Pack's wildcard engine, so ComfyUI-Impact-Pack must be installed or the node dies at import/run. The README's first paragraph says exactly this. Install Impact Pack first, then this pack, restart.
- Each queue execution consumes one line - batch size inside the sampler doesn't. Set your queue batch, not the sampler's batch_size, to step the list.
- Continued mode mutates
startin the saved workflow. That's usually what you want (resume mid-batch), but it can surprise you if you reload a workflow expecting it to start over. - Queue more runs than there are lines and you get empty-string prompts, not errors. Keep batch ≤ line count.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack # first - required
git clone https://github.com/watarika/ComfyUI-Text-Utility
# restart ComfyUI
Or use ComfyUI Manager for both. No pip requirements, no model files in this pack.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| wildcard_text | STRING | — | |
| seed | INT | 00–18446744073709550000 | Determines the random seed to be used for wildcard processing. |
| start | INT | 1 | — |
| mode | COMBO | Fixed | If Fixed, start is left unchanged; if Continued, start is updated to the number at which the process has progressed. |
| repeats_per_line | INT | 1 | — |
| counter | INT | 0 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| line_counter | STRING | — |
| total_counter | STRING | — |