Nodes/ComfyUI Timesaver Nodes/TS Batch Prompt Loader
ComfyUI Node

TS Batch Prompt Loader

Run a hundred prompts through the same workflow

By AlexYez·Created 2 years ago·Updated about 20 hours ago· 12
TS Batch Prompt Loader
    • prompt
    • prompts_count
    textPrompt 1: cat Prompt 2: dog Prompt 3: bird

    "Same workflow, different prompt each time" is the most common batch pattern there is - and the most tedious way to do it is to retype the prompt between runs. TS Batch Prompt Loader is the two-minute setup for prompt batching: paste a multiline block of text where prompts are separated by blank lines, and get back a list of prompts plus a count. Feed that into a list-aware CLIP encoder or a per-item processing node and your workflow runs the whole batch.

    It's a text utility from the pack's prompt toolkit, and it pairs naturally with the batch-looping nodes in the ecosystem. If you've ever written a text file of 40 prompts and wanted the graph to just consume it, this is that.

    How it works

    The rule is exactly what the README draws:

    Prompt 1: cat on a windowsill
    
    Prompt 2: dog at the beach
    
    Prompt 3: bird on a branch
    

    One or more blank lines separate prompts; each block becomes one entry in the output list. The blank-line separator (rather than, say, a comma or a newline) is a deliberate choice - prompts themselves are often multiline, so a single newline can't be the delimiter. Blank lines are the unambiguous "next item" marker.

    The text input is a multiline STRING widget (with a sensible three-prompt default so you can see the shape immediately). Outputs are prompt - the list of strings - and prompts_count, an INT with how many were found. The count is genuinely useful for driving progress math or a loop count in nodes that want one.

    Installing it

    Part of comfyui-timesaver (ComfyUI Manager → "Timesaver", or manual clone + pip install -r requirements.txt + restart). No models, no dependencies - pure text splitting.

    Where people get stuck

    The number-one confusion is the blank line. A single newline is not a separator - only blank lines are. If you paste a list where every line is a separate prompt with no gaps, you get one giant prompt, not fifty. That's the most common "it's not working" report, and it's almost always this. The second gotcha is what you wire it into: the output is a list (is_list: true), so it needs a consumer that handles lists - a list-aware text encode or a per-item processing node. If you just want one prompt at a time from a file, you don't need this; if you want the whole batch to flow, make sure the downstream node iterates. And a tiny note on counts: prompts_count counts blocks, so a trailing blank line doesn't add a phantom empty prompt - the splitter drops empty blocks. Batch on.

    CategoryTS/Text

    Inputs (1)

    NameTypeDefaultDescription
    textSTRINGPrompt 1: cat Prompt 2: dog Prompt 3: birdMultiple prompts separated by one or more blank lines. Each block becomes one prompt in the output list.

    Outputs (2)

    NameTypeDescription
    promptSTRINGList of prompts, one per blank-line-separated block.
    prompts_countINTNumber of prompts found in the text.