Nodes/ComfyUI-Tagger/PixAI Tagger
ComfyUI Node

PixAI Tagger

The one that tells you which franchise the image is from

By sln77·Created 6 months ago·Updated 4 days ago· 6
PixAI Tagger
  • image
  • tags_string
  • character_tags
  • copyright_tags
  • general_tags
  • artist-style_tags
  • meta_tags
  • rating_tags
model_file
config_file
threshold_modecustom
general_threshold0.17
character_threshold0.27
copyright_threshold0.24
style_threshold0.15
meta_threshold0.17
rating_threshold0.41
sort_by_confidencetrue
character_firstfalse
include_styletrue
include_metafalse
include_ratingfalse
replace_underscorefalse
exclude_tags

Every tagger will tell you the character in the image. PixAI Tagger is the one that also tells you what they're from. Its party trick is a dedicated IP output: detect a character, look it up in a mapping file, and emit the franchise it belongs to. Find a random anime image and you get hatsune_miku and vocaloid without having to know either. That's the differentiator, and it's a genuinely useful one when you're trying to reverse-engineer someone's prompt from a screenshot.

It's PixAI Labs' own model (pixai-tagger-v0.9), a 13k-tag vocabulary that slots into the WD14 lineage rather than competing with the new heavyweight taggers. The code builds the encoder from SmilingWolf's wd-eva02-large-tagger-v3 repo via timm and loads PixAI's trained weights onto it - so this is effectively a WD14-family backbone with PixAI's head and vocab on top. Community reports call it faster than the typical tagger, which tracks: the eva02-large encoder at 448x448 is a known, well-optimized workhorse.

The two-threshold design

This is the node's real quirk, and it's worth understanding before you touch anything. PixAI doesn't use one cutoff - it uses two:

  • general_threshold (0.3) - deliberately low, so it grabs a fat list of general tags (poses, clothing, backgrounds).
  • character_threshold (0.85) - deliberately high, so only confident character detections make it through.

That asymmetry is the feature. General tags are cheap and plentiful, so it errs toward more of them; character tags are load-bearing (they name the person), so it errs toward precision. The default balance is good - leave general_threshold where it is and only nudge character_threshold down if the model keeps missing characters you can plainly see.

The remaining inputs are the pack's usual shapes: image, the three file paths (model_file, tags_file, char_map_file), replace_underscore, and exclude_tags. Outputs are tags_string (everything combined - wire this into a positive prompt or a captioning pass), plus character_tags, general_tags, and the distinctive ip_tags.

Installing it

Same pack install as the rest of the family - ComfyUI Manager (search "ComfyUI-Tagger") or:

cd ComfyUI/custom_nodes
git clone https://github.com/sln77/ComfyUI-Tagger
# restart ComfyUI

Then grab three files from pixai-labs/pixai-tagger-v0.9: model_v0.9.pth, tags_v0.9_13k.json, and char_ip_map.json. Any path works; the defaults assume the pack's models/ folder.

One genuine gotcha here, and it's the pack's dirtiest secret: the code imports timm, but the pack never declares it as a dependency. The pyproject.toml lists numpy, onnxruntime, Pillow, and torch - not timm. If you installed through ComfyUI Manager you'll probably be fine (ComfyUI's environment frequently already has it), but if PixAI Tagger throws an import error right after install, that's your culprit:

pip install timm

Also note this is the pack's only PyTorch-.pth tagger, so it wants to run on GPU (cuda if available, CPU otherwise) - same caveat as the others: fine for one-off tagging, slow for bulk.

The honest take

As a pure tagger it's a solid WD14 cousin, but 13k tags means it has thinner coverage of rare and obscure tags than Camie's 70k vocabulary. Where it wins is the IP mapping - nothing else in this pack gives you series identification as an output, and that alone justifies keeping it installed. Two taggers on one image, PixAI for the franchise and Camie for the deep general coverage, merged through a Tag Combiner, is a genuinely better setup than any single model on its own.

CategoryImage/Tagger

Inputs (17)

NameTypeDefaultDescription
imageIMAGEInput image batch to analyze and tag.
model_fileSTRINGAbsolute or relative path to the 'model.safetensors' weights file.
config_fileSTRINGAbsolute or relative path to the 'config.json' file containing model parameters and tag lists.
threshold_modeCOMBOcustom'custom' uses flat category thresholds defined below. 'optimal_calibrated' applies individual per-tag thresholds pre-calibrated across all 30,877 tags in config.json.
general_thresholdFLOAT0.170–1Confidence threshold for general visual content (clothes, body, background). Recommended: 0.17.
character_thresholdFLOAT0.270–1Confidence threshold for specific named characters. Recommended: 0.27.
copyright_thresholdFLOAT0.240–1Confidence threshold for anime/game franchises and original series. Recommended: 0.24.
style_thresholdFLOAT0.150–1Confidence threshold for specific artist/illustrator styles (Danbooru artist tags). Lower to <0.08 for generic AI images or non-famous artist styles.
meta_thresholdFLOAT0.170–1Confidence threshold for metadata tags (resolution, medium, scans). Recommended: 0.17.
rating_thresholdFLOAT0.410–1Confidence threshold for age ratings (general, sensitive, questionable, explicit). Recommended: 0.41.
sort_by_confidenceBOOLEANtrueWhen True, tags are ordered from highest confidence score to lowest. When False, Danbooru dataset frequency order is kept.
character_firstBOOLEANfalseWhen True, character and copyright tags appear first in 'tags_string'. When False, general tags come first.
include_styleBOOLEANtrueWhether to append detected artist/style tags to 'tags_string'.
include_metaBOOLEANfalseWhether to append metadata tags to 'tags_string'.
include_ratingBOOLEANfalseWhether to append safety ratings to 'tags_string'.
replace_underscoreBOOLEANfalseReplaces underscores with spaces in tag names ('blue_eyes' -> 'blue eyes').
exclude_tagsSTRINGComma-separated list of tags to exclude. Matches both spaces and underscores.

Outputs (7)

NameTypeDescription
tags_stringSTRING
character_tagsSTRING
copyright_tagsSTRING
general_tagsSTRING
artist-style_tagsSTRING
meta_tagsSTRING
rating_tagsSTRING