Danbooru Text Categorizer (Anima)
Turn one messy prompt into Anima's three blocks
- ARTIST_PROMPT
- CHARACTER_PROMPT
- BACKGROUND_PROMPT
- ALL_RAW_TAGS
Anima is the rare anime model that rewards organized prompts - the model card gives a specific tag order - and if you've ever pasted a 200-tag Danbooru prompt into it, you know "organization" is not what you had. DanbooruTextCategorizer (Anima) is the cleanup crew: it takes one blob of comma-separated booru tags, sorts each tag into a category, and reassembles them into the three prompt blocks Anima actually likes to read.
Why you'd reach for it
This is an Anima-specific node from the ComfyUI Seed Wildcard Pack, and it only makes sense in that context. Anima's own card recommends structuring a prompt as [character] [series] [artist] [general tags], and the community has found that keeping artist, character, and background material in their own sections behaves better than a shuffled soup. In practice, most people just say "give me something by X" with artist tags, and - per the whole Anima ecosystem vibe - artist tags are one of the most powerful levers the model has.
This node automates the split. Paste your jumbled tag list, get out:
ARTIST_PROMPT- just the artist tagsCHARACTER_PROMPT- character, copyright/series, species, body, face, hair, appearance, clothing, accessories, emotion, pose, action - everything that describes the subjectBACKGROUND_PROMPT- camera & composition, background, environmentALL_RAW_TAGS- the full original set, in case you want the unorganized version too
How it works
The node ships with a tag_category.json mapping roughly 37,000 tags to categories - that's the lookup table, no API, no network, all local. Execution is three steps.
First, a smart splitter breaks the text into tags while respecting parentheses: commas inside (1girl:1.2), (touhou (project)) don't split the tag. Escaped \( parens are left alone. Second, each tag is normalized and looked up in the category file. Tags like long_hair land in "hair", looking_at_viewer in "pose", 1girl in "person". Anything unknown falls into "uncategorized" - which is off by default, so unknown tags silently drop out of the organized outputs unless you flip that toggle.
Third, the outputs are built in a fixed category order per block, keeping your original tag text (weights, parens, all) intact. The block structure mirrors Anima's recommended ordering, which is the whole point: you feed CHARACTER_PROMPT and ARTIST_PROMPT into your positive prompt in the order that matches the model's training.
The inputs that matter
text- your multiline blob of tags. The default sample ((1girl:1.2), red eyes, touhou \(project\)) shows off the parser handling weights and escaped parens- The eighteen category toggles, all defaulting to on -
artist,character,copyright,person,species_traits,body,face,hair,appearance,clothing,accessory,state_emotion,pose,action,camera_composition,background,environment, anduncategorized(the only one off by default)
Flip off the categories you don't want in the output - say, drop clothing and accessory if you're doing character studies - and the node rebuilds the blocks without them.
The honest caveat
The categorizer is only as good as its 37k-tag table, and it's a snapshot - newer or niche tags will fall into "uncategorized" and vanish from the organized outputs unless you turn that toggle on. Also, this splits your prompt; it doesn't invent better tags. If your source text is already well-formed, this mostly rearranges furniture. Where it genuinely shines is taming prompts you pulled from a generation site or an LLM that emits one giant comma line.
Install
Part of the ComfyUI Seed Wildcard Pack - ComfyUI Manager (search Seed Wildcard) or:
cd ComfyUI/custom_nodes
git clone https://github.com/sinanzoo2nd/ComfyUI-Seed-Wildcard-Pack
then restart. The pack has no requirements.txt and no model downloads; the 37k-tag table ships inside the repo. You will, however, want the Anima checkpoint itself on disk, because the outputs only make sense feeding a prompt to Anima. And if you're not using Anima, this node is solving a problem you don't have.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | (1girl:1.2), red eyes, touhou \(project\) | — |
| artist | BOOLEAN | true | — |
| character | BOOLEAN | true | — |
| copyright | BOOLEAN | true | — |
| person | BOOLEAN | true | — |
| species_traits | BOOLEAN | true | — |
| body | BOOLEAN | true | — |
| face | BOOLEAN | true | — |
| hair | BOOLEAN | true | — |
| appearance | BOOLEAN | true | — |
| clothing | BOOLEAN | true | — |
| accessory | BOOLEAN | true | — |
| state_emotion | BOOLEAN | true | — |
| pose | BOOLEAN | true | — |
| action | BOOLEAN | true | — |
| camera_composition | BOOLEAN | true | — |
| background | BOOLEAN | true | — |
| environment | BOOLEAN | true | — |
| uncategorized | BOOLEAN | false | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| ARTIST_PROMPT | STRING | — |
| CHARACTER_PROMPT | STRING | — |
| BACKGROUND_PROMPT | STRING | — |
| ALL_RAW_TAGS | STRING | — |