Simple Load Line From Text File π
Batch prompts from a .txt list, Forge-style
- text
- batch_counter
- line_counter
- lines
If you ever ran Forge or A1111, you had a script called "Prompts from file or textbox" - point it at a .txt, one prompt per line, hit generate, and it chews through the whole file. ComfyUI has never had a stock equivalent, and it's the kind of gap you don't notice until you actually try to batch a hundred pre-written prompts and realize you're supposed to paste them in one at a time. Simple Load Line From Text File is that script, rebuilt as a node.
It's worth being clear about what it isn't. If you want combinatorial randomness - "a woman with {brown|blonde|black} hair" picking a random option each run - that's Impact Pack's wildcard syntax, and it already does that job well. This node is for the opposite case: you have a fixed list of prompts you already wrote (maybe exported from a spreadsheet, maybe scraped off CivitAI, maybe hand-curated) and you want to run through them in order, or shuffle through them without repeats, across a batch.
How it works
Point file_path at your text file and it treats each line as one prompt. The next setting controls how it walks the file: increment and decrement step through sequentially from start, fixed always returns the same line, random picks freely (can repeat), and random no repetitions shuffles through every line once before looping. Note that in the random modes, start is ignored - the enumeration mode overrides it. Whatever line gets picked gets sandwiched between your prefix and postfix strings before it comes out as text, so you can keep your quality tags and negative boilerplate outside the file itself and just vary the subject line.
Inputs and outputs that matter
file_pathandnextare the two you're actually configuring - the file to read and how to walk it.load_file(bool) has to beTruefor the file to be read at all; leave it off and you're just wiringprefix+postfixtogether.prefix/postfixare optional but this is where most of the value is - write your file with just the varying part.nameis purely cosmetic, there to keep multiple instances of this node distinguishable in a busy graph.
On the output side, text is what you feed to your CLIP Text Encode. The other three are counters worth wiring to a Save Image filename or a console display if you're debugging a batch: line_counter tells you which line just got used, lines is the total line count in the file, and batch_counter resets to 1 every time you start a new batch - handy for knowing whether a given output is run #3 of this session or a leftover from before.
Installing it
Easiest path is ComfyUI Manager β Custom Nodes Manager β search ComfyUI_SimpleButcher. Manually, it's the standard drop-in:
cd ComfyUI/custom_nodes
git clone https://github.com/KLL535/ComfyUI_SimpleButcher.git
cd ComfyUI_SimpleButcher
pip install -r requirements.txt
Restart ComfyUI after either method. This particular node has no model downloads and no heavy dependencies - it's just reading a text file off disk.
Common issues
Batch is bigger than your file. If your batch count exceeds the number of lines, it loops back to the top and keeps going rather than erroring out. Fine for most cases, but if you're relying on "one unique prompt per image," check your line count against your batch size first.
"Random no repetitions" repeats anyway. This mode only guarantees no repeats within one full pass through the file. If your batch count is larger than lines, it'll start a fresh shuffled pass once it runs out - which looks like a repeat if you weren't expecting it. Set batch size equal to line count if you want a true no-repeat run.
Nothing loads. Double check load_file is actually True - it's easy to leave it off after testing with a manual prompt and forget to flip it back. Also worth checking the path is absolute or correctly relative to wherever ComfyUI was launched from, since the pack was primarily built and tested on Windows.
This node pairs naturally with Simple Extract Lora From Text and Simple Lora Loader from the same pack - write your file with <lora:name:1.0> tags baked into each line, and the loader downstream will pull them out and apply them automatically.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | Node name | |
| start | INT | 0 | Start position for increment or decrement methods |
| load_file | BOOLEAN | true | if True, load center of prompt from file |
| file_path | STRING | Path to the file from which the lines for the central part of the prompt will be taken | |
| next | COMBO | increment | Option for enumerating lines, in case of randomness the start parameter is ignored |
| prefixopt | STRING | Add text to the beginning of the prompt | |
| postfixopt | STRING | Add text to the ending of the prompt | |
| countopt | INT | 0 | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| text | STRING | β |
| batch_counter | INT | β |
| line_counter | INT | β |
| lines | INT | β |