Nodes/ComfyUI-animetimm/Anime TIMM Classifier
ComfyUI Node

Anime TIMM Classifier

The anime auto-tagger that skips the WD14 model hunt

By MakkiShizu·Created 8 months ago·Updated 8 months ago· 10
Anime TIMM Classifier
  • image
  • tags
  • confidence_scores
  • raw_output
  • general_tags
  • character_tags
  • artist_tags
  • rating_tags
threshold0.35
model_repoanimetimm/caformer_s36.dbv4-full
include_generaltrue
include_charactertrue
include_artistfalse
include_ratingtrue
replace_underscoretrue
use_custom_thresholdfalse

If you've ever wanted to caption a folder of anime images for LoRA training, or reverse-engineer a prompt from a piece of art you like, you know the drill: download a WD14 tagger, hunt down the right model weights, wire up the helper nodes. The Anime TIMM Classifier cuts that down to one node. Drop an image in, get a comma-separated Danbooru tag string out, and it handles downloading its own model on first run. No separate weight files, no extra moving parts.

It's worth knowing what this actually is before you use it. This is a multi-label image classifier, not a captioning LLM. It runs one of the TIMM models from the animetimm Hugging Face org - the "dbv4" tagger family that the community knows as a modern alternative to WD14 - and asks it "which of these ~7,000 Danbooru tags are in this picture?" That's the same vocabulary your Illustrious or NoobAI checkpoint was trained on, so the output plugs straight into a prompt or a training caption without translation.

How it works

Under the hood it's straightforward: the node pulls pytorch_model.bin, config.json, a preprocess.json, and a selected_tags.csv from the model repo, caches them in ComfyUI/models/animetimm, then runs the image through the TIMM model's sigmoid confidence layer. Every tag with a score over its threshold survives. The selected_tags.csv also carries each tag's category - 0 for general, 4 for character, 1 for artist, 9 for rating - which is how the node can hand you artist tags and rating tags separately from the "what's in the frame" tags.

The inputs that matter:

  • image - the one thing you must feed it. Batches work; it'll tag every frame in a batch with a progress bar.
  • model_repo - 20 model choices, defaulting to animetimm/caformer_s36.dbv4-full, which is a solid accuracy/speed middle ground. Want max accuracy? eva02_large_patch14_448.dbv4-full tops the ranklist but eats VRAM. Want speed? The mobilenetv3/mobilenetv4 entries are tiny and fast.
  • threshold (default 0.35) - and here's the trap. Unless you flip use_custom_threshold on, your number isn't the only gate. The node uses max(your threshold, best_threshold) per tag, where best_threshold is a per-tag value baked into selected_tags.csv. That's a feature - those per-tag thresholds are tuned so rare-but-meaningful tags don't get drowned out - but it means raising the slider won't always do what you expect. If you want your number to be the only number, enable use_custom_threshold.
  • The include_* toggles - general and character are on by default, artist is off (it's off because artist tags are noisy and, thanks to how Danbooru tags work, aggressively steer style when you put them in a prompt). Rating is on.
  • replace_underscore (default True) - turns long_hair into long hair. Leave it on unless you're captioning for a workflow that wants raw booru syntax.

Outputs

Seven outputs, but you'll mostly use tags - the comma-joined string that goes straight into a text encode or a caption file. confidence_scores is a float list parallel to those tags if you want to sort or filter programmatically. raw_output gives you the categorized breakdown (general: 1girl: 0.98), and general_tags, character_tags, artist_tags, rating_tags hand you each category as its own string. The tags also surface in the node's UI display, so you can just read them.

Install

ComfyUI Manager: search "ComfyUI-animetimm" and install. Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/MakkiShizu/ComfyUI-animetimm
cd ComfyUI-animetimm

Then install the Python deps into ComfyUI's environment. On the Windows portable build:

..\..\..\python_embeded\python.exe -m pip install -r requirements.txt

Otherwise pip install -r requirements.txt in your active venv. The requirements (timm>=1.0.16, dghs-imgutils, pandas, huggingface_hub) are chunky - expect a real install, not a blink. Restart ComfyUI and the node appears under the AnimeTimm category.

Troubleshooting

The big one: first run downloads the model, and that can take a while - the bigger repos are hundreds of MB. It's cached after that. If the download fails (the README notes the official repos can require logging in and accepting terms), the node automatically falls back to a backup repo, Makki2104/animetimm, so most people never have to do anything. If you keep hitting gated-repo errors, huggingface-cli login with an account that's accepted the repo terms usually fixes it.

One honest caveat: this is a niche pack from a small maintainer, not a marquee name like the WD14 tagger nodes - you won't find much community discussion of it. But the dbv4 models underneath are well-regarded and the node is a thin wrapper around them. For training captions or quick prompt reversal on anime, it's the one I'd reach for.

CategoryAnimeTimm

Inputs (9)

NameTypeDefaultDescription
imageIMAGEInput image for tag prediction
thresholdFLOAT0.350–1Threshold for tag prediction confidence
model_repoCOMBOanimetimm/caformer_s36.dbv4-fullModel to use for tag prediction
include_generalBOOLEANtrueInclude general tags in output
include_characterBOOLEANtrueInclude character tags in output
include_artistBOOLEANfalseInclude artist tags in output
include_ratingBOOLEANtrueInclude rating tags in output
replace_underscoreBOOLEANtrueReplace the underscore (_) in tags.
use_custom_thresholdBOOLEANfalseUse the custom threshold instead of best threshold from selected_tags.csv

Outputs (7)

NameTypeDescription
tagsSTRING
confidence_scoresFLOAT
raw_outputSTRING
general_tagsSTRING
character_tagsSTRING
artist_tagsSTRING
rating_tagsSTRING