π¨ Auto Prompt Loader
Turn one TXT file into a thousand different anime prompts
- prompt
- negative
- character_name
- current_index
- total_prompts
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.txtin the pack'sprompts/dir. The two samples (sample_1girl_v1.txt, 100 characters;style_names_v1.txt, 67 artist styles) ship with the repo.mode-sequentialwalks the file with yourindex;randompicks one at random. There's no wrap-around trick: sequential index wraps withindex % total.preset- the quality-tag style, fromnonetostandardtodynamic,atmospheric,flat,dreamy,gothic,retro. Each preset ships a matching negative too, which is nicer than it sounds - pickgothicand 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'srandommodule, 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:
- 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. - 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.
- 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.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_file | COMBO | sample_1girl_v1.txt | 2 options: sample_1girl_v1.txt, style_names_v1.txt |
| index | INT | 00β99999 | β |
| mode | COMBO | sequential | 2 options: sequential, random |
| preset | COMBO | standard | 8 options: none, standard, dynamic, atmospheric, flat, dreamy, +2 |
| random_action | BOOLEAN | true | β |
| random_background | BOOLEAN | true | β |
| random_camera | BOOLEAN | true | β |
| custom_positiveopt | STRING | β | |
| custom_negativeopt | STRING | β | |
| seedopt | INT | 00β18446744073709550000 | β |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | β |
| negative | STRING | β |
| character_name | STRING | β |
| current_index | INT | β |
| total_prompts | INT | β |