Classify Tags
Sorting Your Anime Prompt Into Nine Piles
- characters
- clothes
- body
- expression
- pose
- background
- objects
- nsfw
- others
If you prompt anime SDXL models - Illustrious, NoobAI, WAI, Pony - you know the drill: your prompt is a flat comma soup of Danbooru tags, and the model parses it all as one bag of tokens. 1boy, serafuku, sitting, smile, classroom is technically five separate facts, but nothing in the workflow is telling you that. Classify Tags is the node that does. Feed it a tag prompt and it sorts every tag into one of nine semantic buckets - characters, clothes, body, expression, pose, background, objects, nsfw, others - and hands you each bucket as its own string.
That single text input is the whole interface. Wire a prompt string into it (it's forceInput, so it wants an upstream string, not a typed widget), and you get nine STRING outputs back, each a comma-joined list of that bucket's tags, in input order, duplicates dropped. Weighted syntax like (cat:1.2) gets stripped to cat, underscores become spaces, and a tag that belongs in several buckets gets resolved by a fixed priority (characters beat nsfw beat clothes, and so on down to others).
Don't expect an LLM under the hood - this is a dictionary job, and it's fast and offline. The lookup runs against the Danbooru wiki tag-group mapping that ships in the pack's resources/tag_groups.json (built from HF wiki dumps), with the pack's static tag tables as fallback and a couple of suffix heuristics for stragglers (* hair → body, * eyes → expression). Subject tags like 1boy, solo, 2girls are treated as characters. The honest caveat: the wiki mapping covers a lot but not everything - the docstring puts it at roughly 45% of the co-occurrence vocabulary. Anything it can't place lands in others, so don't read others as "weird tags", read it as "not in the book yet."
Why would you bother? Three reasons. Auditing a prompt you've been fighting with - a glance at the nsfw or pose outputs tells you what's actually in there. Splitting a prompt so you can swap categories independently (lock the characters and background buckets, regenerate just the pose). And feeding buckets downstream: this is the natural front-end for its sibling Consistency Guard, or for an LLM node that wants its prompt pre-sorted. If you're hand-writing one-off prompts, you'll reach for it rarely. If you're automating anime workflows, it's quietly indispensable.
Installing it
Classify Tags ships in alchemine/comfyui-alchemine-pack, so installing the pack gets you this node:
cd ComfyUI/custom_nodes
git clone https://github.com/alchemine/comfyui-alchemine-pack
cd comfyui-alchemine-pack && pip install -r requirements.txt
Then restart ComfyUI. Easier still: ComfyUI Manager → install custom nodes → search ComfyUI-Alchemine-Pack. Good news on the dependency front - requirements.txt is a single line (python-dotenv), so nothing heavy is getting dragged in. You'll find the node as Classify Tags under AlcheminePack/Prompt.
Where people get caught
The README doesn't mention this node at all - Classify Tags and Consistency Guard landed in the pack's v2.2.0 and the README table never caught up, so if a workflow errors about a missing "ClassifyTags", it's a version thing, not a broken install; pull the latest commit. And if your others bucket is full of tags that obviously have a category, that's coverage, not a bug - the wiki groups just don't list every variant, and the suffix heuristics are deliberately conservative. Cheap to check: run a known tag through and see which bucket it lands in. It's deterministic, so what you see is what the model's tag universe thinks it is.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| characters | STRING | — |
| clothes | STRING | — |
| body | STRING | — |
| expression | STRING | — |
| pose | STRING | — |
| background | STRING | — |
| objects | STRING | — |
| nsfw | STRING | — |
| others | STRING | — |