ComfyUI Node

OppaiOracle Tagger

A local anime tagger that skips the onnxruntime headache

By kinorax·Created 5 months ago·Updated about a month ago· 2
OppaiOracle Tagger
  • image
  • tags
  • rating
variantauto
sort_orderscore
threshold0.75
max_tags45
deviceauto

If you generate anime with an Illustrious- or NoobAI-family model, you already know the drill: the model speaks Danbooru tags, and the fastest way to get good tags for an existing image is a WD14-style tagger. The catch is that most taggers in ComfyUI lean on onnxruntime, and anyone who's spent an afternoon unpicking an onnxruntime/onnxruntime-gpu conflict knows that dependency is a one-way ticket to dependency hell. OppaiOracle Tagger is the pack's answer: the same idea, run as a pure PyTorch implementation with no onnxruntime anywhere in the stack.

It's a relatively new, niche model from a solo developer (grio43) who's been hand-cleaning a 6.2M-image dataset for it - think of it as a WD14 alternative with a rating output and a modern vision backbone, still finding its audience. If you're already running the pack for its metadata tools, this is a nice free addition rather than a reason to switch taggers.

How it works

The node loads a local safetensors bundle (a ViT-style classifier) from your models directory and runs inference entirely on the GPU/CPU with torch. No API calls, no key, nothing leaves your machine. It produces sigmoid probabilities per tag, then applies two knobs:

  • threshold (default 0.75) - only tags scoring at or above this make it out.
  • max_tags (default 45) - the ceiling on tags returned per image, selected by score before sorting.

sorted_order decides presentation only: score keeps the highest-confidence tags first, tag_id sorts by vocabulary order. And variant (auto prefers V1.1, then V1.0) plus device (auto/cuda/cpu) just pick which model bundle and where to run it.

It outputs two strings. tags is your comma-separated, prompt-ready tag list. rating is the Danbooru-style rating tag (rating:general through rating:explicit) picked from the model's rating vocabulary - genuinely useful if you batch-sort or want a quick content-level read on a folder of images, and something most WD14 wrappers don't hand you.

Getting the model files

This is the one step that trips everyone up: ComfyUI Manager installs the pack, not the model. You have to fetch the bundle yourself:

  • Download model.safetensors, config.json, preprocessing.json, and vocabulary.json from Grio43/OppaiOracle on Hugging Face.
  • Drop them in ComfyUI/models/oppai_oracle/V1.1 (or V1.0, or under wd14_tagger/oppai_oracle/...).

Run it with the bundle missing and the node raises an error that lists every search root it checked, which makes fixing the path straightforward.

The usual gotchas

Because it's a PyTorch implementation, the node sidesteps the onnxruntime mess by design - the author explicitly lists that as a feature, and it's a genuinely good call for environment stability. The tradeoff is first-run latency: the model has to load into memory, so the first classify per session is slow. Later runs hit the pack's runtime cache, and if you want to free that memory afterward, the pack's Release Memory node clears the tagger cache.

Two more practical notes. The thresholds are more conservative than WD14's defaults (0.75 vs. WD14's ~0.35), so expect tighter, higher-confidence tag lists - drop the threshold toward 0.5 if you feel like it's under-capturing. And because this targets the Danbooru-tag lineage, point it at anime art, not photos; if you tag a photo with it you'll get confident nonsense.

Installing the node

cd ComfyUI/custom_nodes
git clone https://github.com/kinorax/comfyui-info-prompt-toolkit.git
cd comfyui-info-prompt-toolkit
pip install -r requirements.txt

or search "Info-Prompt-Toolkit" in ComfyUI Manager, then restart. The tagger's own requirements (torch, Pillow, numpy) come from base ComfyUI; the pack's requirements.txt adds timm and friends, which the PixAI tagger in the same pack also uses. Wire the tags output into a Combine Prompts or straight into a positive prompt, and you're off.

CategoryInfo-Prompt-Toolkit/Prompt

Inputs (6)

NameTypeDefaultDescription
imageIMAGEInput image batch to classify with the local OppaiOracle tagger bundle.
variantCOMBOautoModel variant to load. auto prefers V1.1, then V1.0.
sort_orderCOMBOscoreOrder for selected tags. score keeps highest-confidence tags first; tag_id uses vocabulary order.
thresholdFLOAT0.750–1Only tags with this score or higher are considered.
max_tagsINT450–4096Maximum tags returned per image. Selection is score-based before sort_order is applied.
deviceCOMBOautoExecution device for the local OppaiOracle runtime.

Outputs (2)

NameTypeDescription
tagsSTRING
ratingSTRING