Imgutils MLDanbooru Tagger
A WD14 alternative that speaks full Danbooru
- image
- tags
- json
WD14 is the tagger everyone defaults to, but it's not the only one, and it has a blind spot: it was trained on a filtered subset of Danbooru's tag vocabulary. Imgutils MLDanbooru Tagger runs ML-Danbooru instead, a tagger trained on the full Danbooru tag set - which means it recognizes more of the long-tail tags (rare artists, niche objects, the deep cuts) than WD14 reliably does. It's part of the xiaden/comfyui-imgutils pack wrapping the deepghs/imgutils library, and it's a genuinely different tool rather than a re-skin.
One honest difference to know up front: ML-Danbooru returns a flat list of general tags with confidence scores - no rating, no character section. WD14 splits output into rating/general/character; this node just gives you everything in one pile, sorted by confidence and truncated to the top 50. If your workflow keys on knowing "is this a character tag or a general tag," that split is what you lose.
Inputs are straightforward:
threshold(default 0.7) - the confidence cutoff for all tags. Lower it and you get more tags including noise; 0.7 is the sweet spot where ML-Danbooru tends to be confident.drop_overlap(default off) - removes redundant/overlapping tags (e.g., "blue hair" and "blue hair floating" when one implies the other). Costs a little recall, cleans up the string.
Outputs are tags (a comma-separated STRING ready to paste) and json (the full scored dict, which is what you want if you're feeding a dataset pipeline rather than a prompt). Both are flat.
Why you'd reach for it
- You're captioning for Illustrious/NoobAI training and WD14 keeps missing the tag you can see is obviously there - ML-Danbooru's wider vocabulary often catches it.
- You want a second opinion for noisy tags. Run WD14 and ML-Danbooru side by side, keep only tags both agree on above threshold, and the surviving caption is much cleaner than either alone.
- Danbooru-style prompting where long-tail vocabulary matters.
Install
Same pack install as the rest of imgutils:
cd ComfyUI/custom_nodes/
git clone https://github.com/xiaden/comfyui-imgutils.git
cd comfyui-imgutils
pip install -r requirements.txt
Requires ComfyUI 0.25.0+ (this pack uses the V3 node API). The ML-Danbooru model downloads from HuggingFace Hub on first use and caches to ~/.cache/huggingface/hub/, so give the first run time and don't expect it to work offline.
Common issues
- Fewer tags than WD14. Not a bug - ML-Danbooru is pickier and its scores cluster differently. Drop
thresholdto 0.5 and compare. - No rating/character split. By design, as above; if you need the sections, use the pack's WD14 node.
- First run slow. Model download, one-time.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image to tag. | |
| threshold | FLOAT | 0.700–1 | Confidence threshold for all tags. |
| drop_overlap | BOOLEAN | false | Remove overlapping/redundant tags. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| tags | STRING | — |
| json | STRING | — |