Prompt Generator (Arctenox's Essentials)
Random prompts that don't come out sounding like a slot machine
- prompt
- debug_info
If you've ever let a random prompt generator run wild, you know what it hands you: a pile of unrelated tags that the model dutifully renders into a trainwreck. The Prompt Generator (Arctenox's Essentials) takes the opposite approach. Instead of rolling a handful of dice, it starts from the tags you give it and walks the co-occurrence graph - the same data that says "if an image has 1girl, it probably also has long hair." Give it blue_eyes and it finds things that actually appear with blue eyes, then keeps branching from those. The result reads like a real booru tag list, which is exactly what tag-based anime models (Illustrious, Pony, NoobAI) want to see.
This node is squarely aimed at that world. It's built around Danbooru-style tag categories - general, artist, character, copyright, species, meta - and it ships its own copy of the data in data/danbooru_tags.csv (about 32,000 tags) with co-occurrence counts. On first run it loads that into memory once and reuses it. If the CSV is missing, the pack's autocomplete server pulls it from HuggingFace (newtextdoc1111/danbooru-tag-csv) automatically. E621 data isn't bundled - the source dropdown can ask for it, but unless you've downloaded it through the pack's API, it silently falls back to Danbooru. Worth knowing before you select "e621" and expect furry tags.
Here's what you actually set:
- seed_tags - your starting points, comma-separated. Leave it blank and it picks a random high-count character tag for you.
- filter_tags - exclusions, one per line or comma-separated. Spaces and underscores are treated the same, and lines starting with
#are comments. This is your "never give mesolo" box. - tag_count - how many tags to generate (default 20).
- variability - 0.0 is "always pick the most co-occurring," 1.0 is heavily randomised. Start at 0.5.
- rating -
safe,nsfw, orall. This is a real filter, not a suggestion. - min_post_count - ignore tags with fewer posts than this; higher means more common, safer tags.
- seed -
-1for a new prompt every run, any fixed number for reproducible output.
The output is a single prompt STRING you wire straight into a CLIP Text Encode node (or into this pack's CLIP Text Encode [Prompt Gen], which appends it for you). There's also a debug_info string showing which seeds and sources were used - handy when you're wondering why a prompt came out the way it did.
Under the hood it does the sensible things you'd hope for: sorts tags into a natural prompt order (character → subject → general → quality), optionally prepends quality tags like masterpiece, best_quality, strips artist and copyright tags by default (so you don't accidentally bake arknights or an artist credit into your prompt), and escapes parentheses so booru tags like (smile) don't get parsed as SD weight syntax.
One honest caveat: add_quality_tags defaults to true, and quality tags are a dying art. They matter on Illustrious and its descendants; on Pony you want score_9-style tags instead, and on LLM-encoded models like Flux they do essentially nothing. If you're generating for a non-booru model, turn quality tags off and keep seed_tags meaningful. The node won't stop you, and it won't tell you.
Install. It's one node in the Arctenox's Essentials pack: ComfyUI Manager → search "Arctenox's Essentials", or:
cd ComfyUI/custom_nodes/
git clone https://github.com/Arctenox/Arctenoxs-Essentials_ComfyUI
Restart ComfyUI. The only real dependencies are torch, numpy, and optionally psutil - nothing heavy, and no model downloads. If you see "No tag data loaded" in the output, the CSV didn't make it into data/; check the console for download errors and let the API retry.
Fair warning: the README labels the whole pack deprecated - the author is folding it into a remastered pack. The generator works today, but don't plan your entire workflow around updates.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| seed_tags | STRING | Comma-separated or one-per-line starting tags. The generator will find tags that naturally co-occur with these. Leave blank for a fully random starting point. | |
| filter_tags | STRING | Tags to EXCLUDE from generated output. Enter one per line or comma-separate them. Spaces and underscores are treated the same. Lines starting with # are treated as comments and ignored. Example: male_focus solo monochrome | |
| tag_count | INT | 201–80 | How many tags to generate (excluding prepend/append/quality). |
| source | COMBO | all | Which tag database to pull from. |
| rating | COMBO | safe | safe = exclude explicit/questionable tags nsfw = exclude safe-only tags all = no rating filter |
| variability | FLOAT | 0.500–1 | 0.0 = always pick the most co-occurring (predictable) 1.0 = heavily randomised selection (surprising) |
| min_post_count | INT | 5001–100000 | Ignore tags with fewer posts than this. Higher = more common tags only. |
| add_quality_tags | BOOLEAN | true | Prepend quality tags like 'masterpiece, best_quality'. |
| quality_tag_count | INT | 31–8 | — |
| seed | INT | 0-1–18446744073709550000 | -1 = random every run. 0+ = reproducible. |
| exclude_artist_tags | BOOLEAN | true | Strip artist tags (category 1) from the generated output. Useful when seed_tags come from Raffle unfiltered data which may include artist credits you don't want in the prompt. |
| exclude_copyright_tags | BOOLEAN | true | Strip copyright/series tags (category 3) from the generated output. e.g. 'arknights', 'genshin_impact', 'fate/grand_order'. |
| prepend_textopt | STRING | Text placed at the very start of the prompt (before quality tags). | |
| append_textopt | STRING | Text placed at the very end of the prompt. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| debug_info | STRING | — |