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

🎨 Auto Prompt Loader

Turn one TXT file into a thousand different anime prompts

By jluo-githubΒ·Created 7 months agoΒ·Updated 7 months agoΒ· 0
🎨 Auto Prompt Loader
    • prompt
    • negative
    • character_name
    • current_index
    • total_prompts
    β—„prompt_filesample_1girl_v1.txtβ–Ί
    β—„index0β–Ί
    β—„modesequentialβ–Ί
    β—„presetstandardβ–Ί
    β—„random_actiontrueβ–Ί
    β—„random_backgroundtrueβ–Ί
    β—„random_cameratrueβ–Ί
    β—„custom_positiveβ–Ί
    β—„custom_negativeβ–Ί
    β—„seed0β–Ί

    If you've spent an evening in ComfyUI hand-editing "1girl, long hair, park, golden hour" between queues, this node is the tedium-killer you were building yourself anyway. Auto Prompt Loader reads a character list from a plain TXT file and assembles a complete prompt from parts: quality tags, character tags, a random action, a random background, and a random camera effect. One click, and Miku is eating strawberry crepe on a beach instead of standing in an empty void for the fourth time.

    It's the workhorse of the comfyui-auto-anime-prompts pack, and it's built for Illustrious-XL - the SDXL fine-tune where Danbooru tags are the interface and masterpiece, best quality actually means something. If you're on a Flux or an Anima checkpoint, the preset tags will be inert at best; the node still works, but it's speaking a dialect those models don't fully understand.

    How it works

    The mechanism is dead simple, and it's all in the source. You keep one or more TXT files in the pack's prompts/ folder, each line tab-separated like this:

    hatsune miku,vocaloid,1girl,aqua eyes,blue hair,twintails	初音ζœͺζ₯
    hakurei reimu,touhou,1girl,brown hair,red eyes,hair bow	博丽灡撦
    

    The loader picks an entry, then builds: preset quality tags + character tags + random action + random background + random camera + your custom positive. The README advertises 21 actions and 8 camera effects; the shipped constants.py actually has 55+ actions, 14 backgrounds, and 6 camera effects. Trust the code, not the README - the extra actions are the good ones ("peace sign, winking, tilting head, looking at viewer", "eating strawberry crepe, puffy cheeks, cream on nose", and a few that are genuinely melancholy).

    The inputs that matter

    • prompt_file - dropdown of every .txt in the pack's prompts/ dir. The two samples (sample_1girl_v1.txt, 100 characters; style_names_v1.txt, 67 artist styles) ship with the repo.
    • mode - sequential walks the file with your index; random picks one at random. There's no wrap-around trick: sequential index wraps with index % total.
    • preset - the quality-tag style, from none to standard to dynamic, atmospheric, flat, dreamy, gothic, retro. Each preset ships a matching negative too, which is nicer than it sounds - pick gothic and you automatically get "bright, pastel, cheerful, sunshine" pushed into the negative.
    • random_action / random_background / random_camera - all default to on. Flip them off when you want a controlled shot and only the character to vary.
    • seed - drives Python's random module, so the same seed + same settings reproduces the same action/background/camera picks.

    The outputs are the point: prompt and negative wire straight into two CLIP Text Encode nodes feeding your KSampler. The other three outputs are quietly handy: character_name for a filename prefix or text display, and current_index / total_prompts so you can see where you are in the file.

    Install

    ComfyUI Manager: search "Auto Anime Prompt", install, restart. Or:

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

    That's the whole install. No requirements.txt, no model downloads, no API keys - it runs on the torch/numpy/Pillow ComfyUI already ships. Python 3.10+.

    Where people get burned

    Three things, in order of how much they'll cost you:

    1. The dropdown only shows files in the pack's prompts/ folder. Drop your own TXT in there and restart (or re-add the node) before it appears.
    2. The seed isn't a ComfyUI seed widget. It reseeds Python's global RNG on every run, so a fixed seed is stable - but it also means two nodes in one graph can clobber each other's randomness. Not a problem in the usual single-loader setup.
    3. It's a tiny, essentially unreviewed pack. One maintainer, one commit on the passport half, zero community threads about it that I could find. For a node this simple that's fine - read the source if you're paranoid, it's ~200 lines - but don't assume battle-tested behavior you haven't checked.

    Honest verdict: for one-off Illustrious generations with a little variety, this is the node I'd reach for. It's not a wildcard engine in the __word__ sense - it's a structured one, and it's refreshingly honest about what it does.

    Categoryprompt/anime

    Inputs (10)

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

    Outputs (5)

    NameTypeDescription
    promptSTRINGβ€”
    negativeSTRINGβ€”
    character_nameSTRINGβ€”
    current_indexINTβ€”
    total_promptsINTβ€”