Load Prompts From File (Inspire)
Batch-generate from a text file of prompts
- zipped_prompt
- count
- remaining_count
Write a list of prompts in a text file, point this node at it, and it feeds them into your workflow one after another - the node for batch-generating a whole set of prompts without babysitting the queue. Each prompt in the file becomes an entry in a list, and because ComfyUI iterates over lists, your graph runs once per prompt. Great for churning through a prompt sheet overnight or generating a themed set.
The file format is simple: one file can hold multiple prompts separated by a line with ---, and each prompt can have a positive and negative part plus a name. The node reads them into ZIPPED_PROMPT entries - Inspire's little container that bundles positive, negative, and name together - which you then split with Unzip Prompt (Inspire) before wiring into your encoder and sampler.
How it works
It reads the chosen prompt file, splits it on the --- separators, and emits the results as a ZIPPED_PROMPT list. ComfyUI's list execution then runs the downstream nodes once per prompt. Alongside the list it returns a count (how many prompts loaded) and remaining_count, so you can drive logic off how many are left. Pair it with Unzip Prompt to pull out the positive/negative/name for each entry.
The inputs and outputs that matter
- prompt_file - the file to read (the dropdown lists files under the pack's
prompts/directory). - start_index - skip the first N prompts; use it to resume a batch you stopped partway.
- load_cap - cap how many prompts to load (0 = all); handy for a test run of the first few.
- text_data_opt (optional) - pass prompt text in directly instead of from a file.
Outputs: zipped_prompt (list), count, and remaining_count.
Installing it
ComfyUI Manager: search "Inspire Pack", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
Then restart (pip install -r requirements.txt if you cloned by hand).
Where people get tripped up
The prompt_file dropdown reads from a specific place - files under ComfyUI-Inspire-Pack/prompts/ (the README notes you can also register an inspire_prompts path in extra_model_paths.yaml). Drop a .txt somewhere random and it won't appear in the list; put it in the prompts folder and restart or refresh. Second snag is the plumbing: the output is a ZIPPED_PROMPT, not text - you have to run it through Unzip Prompt (Inspire) to get usable positive/negative strings, and forgetting that step is the most common "why won't this connect" moment. And since this produces a list, the whole downstream graph iterates - that's the feature, but it means every node after it runs once per prompt, so size your batch with that in mind.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_file | COMBO | 2 options: example/prompt2.txt, example/prompt1.txt | |
| text_data_optopt | STRING | — | |
| reloadopt | BOOLEAN | false | — |
| load_capopt | INT | 0 | The amount of prompts to load at once: 0: Load all 1 or higher: Load a specified number |
| start_indexopt | INT | 0-1–18446744073709550000 | Starting index for loading prompts: -1: The last prompt 0 or higher: Load from the specified index |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| zipped_prompt | ZIPPED_PROMPT | — |
| count | INT | — |
| remaining_count | INT | — |