Nodes/comfyui-auto-anime-prompts/🎨 Auto Prompt Batch
ComfyUI Node

🎨 Auto Prompt Batch

Batch anime generation without the click loop

By jluo-githubΒ·Created 7 months agoΒ·Updated 7 months agoΒ· 0
🎨 Auto Prompt Batch
    • prompts
    • negative
    β—„prompt_filesample_1girl_v1.txtβ–Ί
    β—„start_index0β–Ί
    β—„batch_size4β–Ί
    β—„presetstandardβ–Ί
    β—„random_actiontrueβ–Ί
    β—„random_backgroundtrueβ–Ί
    β—„random_cameratrueβ–Ί
    β—„custom_positiveβ–Ί
    β—„custom_negativeβ–Ί
    β—„seed0β–Ί

    Auto Prompt Batch is the sibling of Auto Prompt Loader that gives up on "one good prompt" and gives you a wall of them. Same pack, same formula - quality tags + character + random action + random background + random camera - but instead of one string out, you get a list of them, sized to your batch.

    This is the node for the workflow where you want twenty variations of a character sheet, or a contact sheet of the same girl in fourteen moods, and you refuse to click "Queue" twenty times. If you've ever batch-generated with ComfyUI's built-in Batch Count and discovered that every image gets the same prompt, you already understand the problem this solves: with the batch node, each slot gets its own random action, background, and camera, so every output is actually different.

    How it works

    Under the hood it's the loader's loop. start_index + batch_size walks your TXT file sequentially (wrapping at the end), and for each slot it rolls a fresh random action, background, and camera from the same curated pools in constants.py. The seed input seeds Python's random module, so the same seed reproduces the same set of rolls - useful when one variation out of twenty is a keeper and you want to rebuild around it.

    The inputs that matter

    • prompt_file - same dropdown of .txt files in the pack's prompts/ dir.
    • start_index - where in the file to start; lets you resume past images 0–19 next time.
    • batch_size - 1 to 1000. You'll almost never want 1000.
    • preset - the same eight quality styles as the loader (standard, dynamic, atmospheric, flat, dreamy, gothic, retro, none), each dragging its matching negative along.
    • random_action / random_background / random_camera - off by default? No: on, all three. Turn them off for a controlled batch.

    Outputs are two: prompts (a list of strings) and negative (one shared negative for the whole batch, preset plus any custom_negative).

    The gotcha nobody warns you about

    Here's where most people stall: prompts is a Python list, and a plain CLIP Text Encode reads only the first element. Wire it straight into a CLIPTextEncode and you'll sample prompt #1 for every image in the batch - silently undoing the whole point.

    Look at the pack's own batch_workflow.json and you'll see the author's honest answer: the list feeds an easy showAnything preview node so you can read all the prompts, and slot 0 goes to the sampler. To actually render every item you need a list-aware consumer - the Impact Pack ForEach family, an easy-use list node, or a loop pattern that pops one prompt per iteration. If you'd rather not add machinery, the pragmatic move is: generate the batch once, read the preview, and queue single generations for the ones you like.

    Install

    Same as the rest of the pack - ComfyUI Manager search "Auto Anime Prompt", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jluo-github/comfyui-auto-anime-prompts
    

    No extra dependencies, no model downloads. Python 3.10+, MIT licensed, one-maintainer size (read the source before you trust it with a queue of 1000).

    Bottom line

    For a controlled batch of distinct Illustrious prompts from your own character list, this is the right tool, and it's the most "set it and walk away" node in the pack once you've sorted the list-consumption step. If you're only ever generating one image at a time, the plain loader is simpler. The batch node earns its place the moment you're doing variations.

    Categoryprompt/anime

    Inputs (10)

    NameTypeDefaultDescription
    prompt_fileCOMBOsample_1girl_v1.txt2 options: sample_1girl_v1.txt, style_names_v1.txt
    start_indexINT00–99999β€”
    batch_sizeINT41–1000β€”
    presetCOMBOstandard8 options: none, standard, dynamic, atmospheric, flat, dreamy, +2
    random_actionBOOLEANtrueβ€”
    random_backgroundBOOLEANtrueβ€”
    random_cameraBOOLEANtrueβ€”
    custom_positiveoptSTRINGβ€”
    custom_negativeoptSTRINGβ€”
    seedoptINT00–18446744073709550000β€”

    Outputs (2)

    NameTypeDescription
    promptsSTRINGβ€”
    negativeSTRINGβ€”