PixAI Tagger From Path/URL
Tag any image from a file path or URL without dragging it into your graph
- tags
- general_tags
- character_tags
- ips
- general_json
- character_json
- ips_mapping_json
If you train anime LoRAs or just like poking at what a checkpoint "thinks" an image is, you've probably got a WD14 tagger parked in your graph. This node is the PixAI tagger - a newer, hungrier rival to WD14 - with one twist: instead of feeding it a ComfyUI IMAGE tensor, you hand it a file path or a URL and it tags that. No loading node, no image in the graph, no intermediate save. Paste in D:/images/sample.webp or https://..., hit run, and out comes a prompt-ready Danbooru-tag string.
Why bother when WD14 already works? The PixAI v0.9 model behind this (pixai-labs/pixai-tagger-v0.9) was trained on much more recent booru data than the aging WD14 corpus, so it knows tags and characters that WD14 flat-out doesn't - community chatter pegs it as noticeably better at newer material, and it goes further than plain taggers by separating character tags from which series they belong to. That's the ips output: detected IPs like genshin_impact. If you're building a dataset and want to sort crops by franchise, that alone beats gluing WD14 output together by hand.
How it works
This is a thin, honest wrapper. Both nodes in the pack call imgutils.tagging.get_pixai_tags from dghs-imgutils; PixAITaggerFromPath just passes your path or URL string straight through, and imgutils handles fetching and decoding. The name says "PixAI" and people assume an API - there isn't one, and there's no key. The v0.9 model runs locally as an ONNX model that downloads from Hugging Face on first use, so the first tag on a fresh install takes a while and costs you roughly a gigabyte of disk. The model itself was released as a .pth, and imgutils ships an ONNX conversion, which is why this whole thing works inside ComfyUI's Python without a GPU-heavy stack.
Outputs come back as plain STRINGs: tags (character and general combined), general_tags, character_tags, and ips - plus general_json, character_json, and ips_mapping_json if you want the confidence scores and the character-to-series mapping in structured form. Wire tags into a CLIP Text Encode for caption round-tripping, or save it next to an image while building training data.
Inputs worth touching
- image_path_or_url - the whole point. Local path or URL; leave it empty and the node throws on purpose.
- model_name - defaults to
v0.9; the tooltip says it accepts any Hugging Face repo ID, so you can swap tagger versions without a code change. - threshold_mode - keep it on
model defaultand trust imgutils' built-in thresholds. Flip tocustomonly when you're chasing false positives, thengeneral_threshold/character_threshold(defaults 0.35 / 0.5) take over. - max_general_tags / max_character_tags -
0means "keep everything the model returns," which is the sane default for training. Set them positive only to slim output down. - character_first (default on) puts character tags ahead of general ones in
tags;replace_underscoresswaps_for spaces,include_scoresappends confidence liketag:0.912.
Install
Easiest is ComfyUI Manager: search comfyui-pixai-v0.9-tagger, install, restart. Manager runs the pack's install.py, which matters - see the gotcha. Manual install:
cd ComfyUI/custom_nodes
git clone https://github.com/vjumpkung/comfyui-pixai-v0.9-tagger
cd comfyui-pixai-v0.9-tagger
python install.py
The gotcha that burns people
dghs-imgutils pins numpy<2 in its package metadata, and if pip honors that it downgrades ComfyUI's numpy - a classic way to brick an otherwise-fine install. That's why install.py installs imgutils with --no-deps and lists only the deps the PixAI code path actually needs in requirements.txt. So: never pip install dghs-imgutils bare in your ComfyUI environment, and don't skip install.py. Manual equivalent, if you insist:
pip install -r requirements.txt
pip install --no-deps "dghs-imgutils>=0.19.0"
Other real-world friction: the first run downloads the model and looks hung - it isn't, give it a minute. URLs behind hotlink protection or requiring auth will fail; for those, download the file and tag the local path instead. And if you have an image that's already in your graph as a tensor, the pack's sibling PixAITagger node is the better pick - this one shines for files on disk and direct URL drops. It's early days for this pack (barely starred), but the wrapper is small and the underlying model is the interesting part.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image_path_or_url | STRING | — | |
| model_name | STRING | v0.9 | PixAI model name or Hugging Face repository ID. |
| threshold_mode | COMBO | model default | 2 options: model default, custom |
| general_threshold | FLOAT | 0.350–1 | Used only when threshold_mode is custom. |
| character_threshold | FLOAT | 0.500–1 | Used only when threshold_mode is custom. |
| max_general_tags | INT | 00–4096 | 0 keeps every general tag returned by the model. |
| max_character_tags | INT | 00–1024 | 0 keeps every character tag returned by the model. |
| tag_separator | STRING | , | Separator for string outputs. Supports escaped \n and \t. |
| replace_underscores | BOOLEAN | false | — |
| include_scores | BOOLEAN | false | — |
| character_first | BOOLEAN | true | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| tags | STRING | — |
| general_tags | STRING | — |
| character_tags | STRING | — |
| ips | STRING | — |
| general_json | STRING | — |
| character_json | STRING | — |
| ips_mapping_json | STRING | — |