Nodes/Comfyui_TextBatch_aidec/Text Queue Processor
ComfyUI Node

Text Queue Processor

Run a list of prompts one at a time

By aidec·Created 2 years ago·Updated 9 months ago· 19
Text Queue Processor
    • text
    • current_index
    • total
    • completed
    • status
    text1girl 1cat 1dog
    separator_typenewline
    separator,
    start_index0
    trigger_nexttrue

    You've got twenty prompts and you want twenty images, each a full separate generation - not one giant VRAM-melting tensor batch, and not you babysitting the queue button twenty times. That's the whole reason this node exists. Paste your prompts, one per line, hit run once, and it walks the list for you, one generation per prompt, until it's done.

    This is the flagship of aidec's little Comfyui_TextBatch_aidec pack, and it's genuinely the node you'd reach for. ComfyUI's native "batch" means stacking everything into a single tensor that all lives in memory at once - great for variations on one seed, useless when each prompt is its own thing. Text Queue Processor takes the other road: it iterates serially, so every prompt gets a clean independent run with its own seed, its own output file, its own everything.

    How it works

    The trick is a counter that lives on the server, not in the graph. Each time the prompt queue fires, the node hands out the line sitting at current_index, then bumps the counter by one. Because it's an output node with trigger_next switched on, it quietly re-queues the workflow after each run - so once you kick it off, it keeps feeding itself the next line until the list runs out. When there's nothing left, completed flips to true and it stops. No loop node, no scripting, no external tool.

    The inputs that matter

    • text - your list, one item per line by default (1girl, 1cat, 1dog is the placeholder). This is the whole job.
    • separator_type / separator - leave it on newline and each line is one prompt. Switch to custom and set separator to something else (a comma, say) if your items live on one line.
    • start_index - where it begins. Normally 0. This one bites people (see below).
    • trigger_next - the auto-advance. On means it drives the whole batch itself; off means it hands out one item per manual queue.

    Outputs are text (the current prompt - wire this straight into your CLIP Text Encode positive), plus current_index, total, completed, and status. The index output is the useful companion: feed it into a filename node so your saved images line up with the list, or into a seed so each run is reproducible.

    Installing it

    No ComfyUI Manager entry to rely on, so the clone is the honest path: cd ComfyUI/custom_nodes && git clone https://github.com/aidec/Comfyui_TextBatch_aidec then restart ComfyUI. (Manager's "Install via Git URL" with that same link works too.) There are no model downloads and no heavy dependencies - it's plain Python riding on what ComfyUI already ships, which is a nice change from packs that want a 4GB checkpoint before they'll load. Look for it under the TextBatch category.

    Where people get burned

    The author is refreshingly upfront about the rough edges, and they're worth knowing before you blame yourself:

    • The first run sometimes only does one. Kick it off and occasionally it processes a single line and stops. Just queue it again and it'll walk the rest normally. It's a known quirk, not your workflow.
    • start_index doesn't reset itself. After a full pass you have to set it back to 0 by hand before the next run. Forget, and it thinks it's already finished.
    • Don't run multiple ComfyUI tabs at once. The counter is global server state. Two open workflows, or queuing a second batch mid-run, and they trip over each other - double-queues, the wrong window executing. One tab, one batch, let it finish.

    None of this is a dealbreaker. For churning through a prompt list without touching the mouse again, it does exactly what it says.

    CategoryTextBatch

    Inputs (5)

    NameTypeDefaultDescription
    textSTRING1girl 1cat 1dog
    separator_typeCOMBOnewline2 options: newline, custom
    separatorSTRING,
    start_indexINT00–10000
    trigger_nextBOOLEANtrue

    Outputs (5)

    NameTypeDescription
    textSTRING
    current_indexINT
    totalINT
    completedBOOLEAN
    statusSTRING