ComfyUI Node

Load Booru Tagger

Load the tagger once, tag a hundred images without waiting

By nestflow·Created about a year ago·Updated about a month ago· 5
Load Booru Tagger
    • tagger_model
    • tagger_info
    • threshold
    • character_threshold
    model_namewd-v1-4-moat-tagger-v2
    replace_underscoretrue

    This is the half of the pack that does the slow work once so the Booru Tagger node can stay fast forever after. Load Booru Tagger is a loader in the same spirit as Load Checkpoint or Load LoRA: pick a model from a dropdown, and it hands you the loaded model plus its metadata over custom wire types.

    Why does that split matter? The pack is a modernized fork of pythongosssss's WD14 tagger, and the original reloaded the ONNX model on every single inference. Tag a batch of fifty images and you'd watch it drag a several-hundred-MB model into memory fifty times. This pack separates loading from inference, so you pay the load cost exactly once per workflow run and then every image after is just a forward pass.

    How it works

    Load Booru Tagger checks whether the selected model's files already exist in ComfyUI/models/booru_tagger/. If they're missing, it downloads them from HuggingFace on first use - the ONNX model, its tag metadata file, and any extra preprocess file the model family needs. If you're upgrading from an old v1.x install, it even migrates legacy flat files from ComfyUI/models/wd14_tagger into the new nested layout so you don't re-download. Then it builds an onnxruntime inference session (CUDA first, CPU fallback - TensorRT is deliberately excluded because it crashes without the full SDK) and parses the tag metadata into a table with a category per tag.

    The inputs

    Just two, and one is a dropdown.

    • model_name - the tagger to use, roughly two dozen options across the model families: the SmilingWolf WD series (v1.4 and v3), Pixai Tagger v0.9 (13,461 tags), Camie Tagger v2 (a chunky 70,527 tags), CL Tagger v1 (42,163) and v2 (~106,000+ tags), and the AnimeTimm dbv4-full models (12,476 tags). The default, wd-v1-4-moat-tagger-v2, is the sensible starting point - un-gated, MIT-licensed, and well-trodden.
    • replace_underscore (default on) - turns long_hair into long hair so the output reads like a prompt instead of a database key. Leave it on unless you're captioning a dataset and want raw tags.

    Outputs

    • tagger_model and tagger_info - the two custom-type ports that plug straight into the Booru Tagger node's inputs. That's the connection that matters.
    • threshold and character_threshold - FLOAT outputs carrying the per-model defaults from the pack's models.json. You can ignore them (the inference node has its own defaults) or wire them if you want to tune one model without touching another.

    Install

    ComfyUI Manager: search "Booru Tagger". Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/nestflow/ComfyUI-Booru-Tagger
    

    Then install onnxruntime (or onnxruntime-gpu) and pandas. Model files download automatically on first load.

    Where people get burned

    First load of a new model is a download - a big one for Camie or CL v2 - and it happens inside this node, so give it time and watch the console. If you hit a 401, you picked a gated model: CL Tagger v2 and the AnimeTimm family require accepting the license on their HuggingFace page and then authenticating, either huggingface-cli login once or by setting HF_TOKEN in your environment. If downloads fail entirely, the pack honors an HF_ENDPOINT mirror/proxy for regions where huggingface.co is slow or blocked. And one more thing: this is a Node v3 pack, so it needs a recent ComfyUI - on an older build the nodes won't show up at all, and no amount of model fiddling fixes that.

    CategoryBooruTagger

    Inputs (2)

    NameTypeDefaultDescription
    model_nameCOMBOwd-v1-4-moat-tagger-v223 options: wd-eva02-large-tagger-v3, wd-vit-large-tagger-v3, wd-vit-tagger-v3, wd-swinv2-tagger-v3, wd-convnext-tagger-v3, camie-tagger-v2, +17
    replace_underscoreBOOLEANtrue

    Outputs (4)

    NameTypeDescription
    tagger_modelTAGGER_MODEL
    tagger_infoTAGGER_INFO
    thresholdFLOAT
    character_thresholdFLOAT