ComfyUI Node

PixAI Tagger

An anime tagger that splits general, character, and IP tags

By kinorax·Created 5 months ago·Updated about a month ago· 2
PixAI Tagger
  • image
  • general
  • character
  • ip
variantauto
sort_orderscore
threshold_general0.25
threshold_character0.85
max_tags_general45
max_tags_character10
deviceauto

Most anime taggers in ComfyUI are WD14 ports, and they have a weakness: they hand you one flat list of tags. PixAI Tagger v0.9, wrapped here as IPT-PixAITagger2, is different - it classifies each image into three separate outputs: general (the ordinary Danbooru-style descriptors), character (which specific characters are present), and ip (the tags meant for IP-Adapter-style reference matching). If you work on fan art, character consistency, or any workflow where "is this a recognizable character" matters more than "what's in the frame," that split is genuinely useful.

It also runs as a pure PyTorch implementation - no onnxruntime, no extra inference runtime to fight with. That's a deliberate design choice the author repeats across the pack's taggers, and it's the main reason to prefer this over a WD14 wrapper if you value environment stability over raw tagger fame.

How it works

The node loads the local v0.9 bundle (an EVA02-large vision backbone plus a tagging head) from your models folder and runs it with torch. It produces per-tag sigmoid scores, then applies separate gates for each category:

  • threshold_general (default 0.25) and max_tags_general (default 45) control the general list.
  • threshold_character (default 0.85) and max_tags_character (default 10) control the character list - note the much higher default threshold, because character tags are a precision game.

sort_order (score or tag_id) only affects the final ordering of the general tags; character and IP outputs always stay in score order. variant currently resolves to v0.9 no matter what, and device picks auto/cuda/cpu.

The three outputs - general, character, ip - are each comma-separated, prompt-ready strings. The ip output comes from a bundled character-to-IP mapping (char_ip_map.json), which is the differentiator: IP tags describe the character in a way designed to pair with reference-image conditioning, not just text prompting.

Getting the model files

Manager installs the node, not the model - you place this bundle yourself. Download model_v0.9.pth, tags_v0.9_13k.json, and char_ip_map.json from pixai-labs/pixai-tagger-v0.9 on Hugging Face and put them in ComfyUI/models/pixai_tagger (or pixai_tagger/v0.9, or wd14_tagger/pixai/pixai-labs_pixai-tagger-v0.9). Run without them and the node errors out, listing every directory it searched - that message is your friend when the path is wrong.

The practical notes

First-run is slow: the EVA02-large backbone is a chunk of weights and has to load into memory, but later calls hit the pack's runtime cache. Want that VRAM back between workflow passes? The pack's Release Memory node clears the tagger cache explicitly.

Second, thresholds. The 0.25 general default is lower than most WD14 defaults, meaning you'll get more (and noisier) general tags - that's PixAI's own tuning, not a bug. If the lists feel chatty, nudge the threshold up toward 0.4. And like every Danbooru-lineage tagger, point it at anime art; it'll confidently mislabel a photo.

Third, timm - the pack's requirements.txt declares timm>=1.0.17, which this tagger needs. If you get an import error about timm, that's your culprit; a pip install timm fixes it.

Installing

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. Wire general into a Combine Prompts for the prompt, and - if your workflow uses IP-Adapter-style conditioning - keep ip around as its own string. The pack keeps the older PixAI node around as "PixAI Tagger (Deprecated)" for existing graphs, so don't be surprised to see both in the node list.

CategoryInfo-Prompt-Toolkit/Prompt

Inputs (8)

NameTypeDefaultDescription
imageIMAGEInput image batch to classify with the local PixAI tagger bundle.
variantCOMBOautoModel variant to load. auto currently resolves to v0.9.
sort_orderCOMBOscoreOrder for selected general tags. score keeps highest-confidence tags first; tag_id uses vocabulary order. Character and IP outputs keep their existing score order.
threshold_generalFLOAT0.250–1Only general tags with this score or higher are considered.
threshold_characterFLOAT0.850–1Only character tags with this score or higher are considered.
max_tags_generalINT450–2048Maximum general tags returned per image. Selection is score-based before sort_order is applied.
max_tags_characterINT100–2048Maximum character tags returned per image. Character and IP outputs keep their existing score order.
deviceCOMBOautoExecution device for the local PixAI tagger runtime.

Outputs (3)

NameTypeDescription
generalSTRING
characterSTRING
ipSTRING