Load WD14 model (ONNX)
Load the WD14 tagger the light way (ONNX)
- ui_widget
- tagger
The other half of LF's WD14 loader pair. LF_LoadWD14Onnx is the onnxruntime backend for the Danbooru tagger - same tags, same model family, but built to run lean. Where the HF/timm loader (LF_LoadWD14Model) is the accuracy-first path for GPU boxes, this one is the CPU-friendly, low-VRAM option, which is why its defaults echo the classic TagGUI settings (min probability 0.4, max tags 30) that people have been using for years.
You'll use it exactly the way you'd expect from the sibling: load the tagger here, wire the tagger output into LF_CaptionImageWD14 next to an image, and out come booru tags for a training set or a prompt.
How it works
model_id defaults to SmilingWolf/wd-vit-large-tagger-v3 - the same repo as the HF loader, but this node pulls the ONNX export and runs it through onnxruntime instead of transformers+timm. It also accepts a local directory path pointing at a folder that contains model.onnx plus selected_tags.csv, which is handy if you've already got a downloaded copy and don't want to re-fetch.
The three settings are the TagGUI classics:
min_probability(default0.4) - the floor for keeping a tag. The 0.4 default is tuned to keep captions clean; 0.35–0.45 is the normal fiddling range.max_tags(default30) - tag ceiling per image.tags_to_exclude- comma-separated tags to always drop, with TagGUI-style escaped commas supported for tags that contain them.
Single output: tagger, carrying the ONNX session plus tag metadata and those defaults.
Installing it
One pack install covers everything in lf-nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/lucafoscili/lf-nodes
then restart ComfyUI or install via ComfyUI Manager ("LF Nodes"). The relevant dependency is onnxruntime; the model download (~1.3GB for vit-large) happens on first load and is cached afterward. If you've already downloaded the ONNX files elsewhere, point model_id at the local folder and skip the download entirely.
Which loader should you pick?
Both feed the same caption node, and the honest answer is that for most batch captioning the ONNX path is the one you'll actually leave installed - it's lighter, tolerates CPU inference, and the tag output is nearly identical. The HF/timm loader earns its keep when you want the extra bit of fidelity on a training set and have the VRAM. Either way, remember the first run isn't hung - it's downloading the model.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model_id | STRING | SmilingWolf/wd-vit-large-tagger-v3 | HuggingFace WD14 ONNX repo ID or local directory containing model.onnx and selected_tags.csv. |
| min_probability | FLOAT | 0.400–1 | Minimum probability for a tag to be kept (TagGUI default: 0.4). |
| max_tags | INT | 30 | Maximum number of tags to return (TagGUI default: 30). |
| tags_to_exclude | STRING | Tags to exclude (comma-separated, supports TagGUI-style escaped commas). | |
| ui_widgetopt | LF_CODE | [object Object] | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tagger | TAGGER | WD14 ONNX tagger object (session + tag metadata and defaults). |