Nodes/ComfyUI Inspire Pack/Load Prompts From File (Inspire)
ComfyUI Node Runs on cloud

Load Prompts From File (Inspire)

Batch-generate from a text file of prompts

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Load Prompts From File (Inspire)
    • zipped_prompt
    • count
    • remaining_count
    prompt_file
    text_data_opt
    reloadfalse
    load_cap0
    start_index0

    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.

    CategoryInspirePack/Prompt

    Inputs (5)

    NameTypeDefaultDescription
    prompt_fileCOMBO2 options: example/prompt2.txt, example/prompt1.txt
    text_data_optoptSTRING
    reloadoptBOOLEANfalse
    load_capoptINT0The amount of prompts to load at once: 0: Load all 1 or higher: Load a specified number
    start_indexoptINT0-1–18446744073709550000Starting index for loading prompts: -1: The last prompt 0 or higher: Load from the specified index

    Outputs (3)

    NameTypeDescription
    zipped_promptZIPPED_PROMPT
    countINT
    remaining_countINT