Models · Classification

WD Tagger v3

SmilingWolf's WD v3 taggers: tag anime-style images with 10 861 Danbooru tags (general, character, rating), on ViT, ConvNeXt and EVA-02 backbones. Apache-2.0 weights.

stable Fork of huggingface/pytorch-image-models@0df212b · backends: portable, kernels

Checkpoint

Paper 2024 Added in 0.2.0 Evaluated with 0.2.0

Portable, RTX 5060 Ti 16 GB 4.01 ms 448x448, fp16
vs the faster original 1.4× original fp16: 5.78 ms
Peak memory 235 MiB original: 231 MiB
Accuracy vs original fp32 −0.10 kernels tag_f1, COCO val2017 (first 500 images) (100.00 original)

Use it

pip install fastforks

Lean install with only what this model needs: pip install "fastforks-core[timm]"

from fastforks import classification

model = classification.load("wd-vit-tagger-v3")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.logits
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench wd-vit-tagger-v3

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

Input: synthetic, 448x448

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32fp32 19.00.30×426 MiB/442 MiB2.50.24
Original fp16.half() on 1 modules, fp16 inputsfp16 5.78–231 MiB/242 MiB2.30.32
Portable fp32fp32not measured ––––
Portablefp16 4.011.4×235 MiB/242 MiB2.30.09
Kernelsfp16 4.061.4×234 MiB/284 MiB2.50.06
Portable + torch.compile 5.331.1×282 MiB/302 MiB10 (build)–
TensorRT fp16fp16 3.321.7×204 MiBenginenot comparable19 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-13 to 2026-11-16. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14Originalfp3259.6 2,463 MiB process–448x448
Portablefp1652.5 2,438 MiB processmatches448x448
Portablefp3258.9 2,438 MiB processmatches448x448
Kernelsfp16not implemented–448x448

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use allowed

Code
Apache-2.0
Weights
Apache-2.0 source
Training data

Our reading of the licences, not legal advice.

Weights

wd-vit-tagger-v3.safetensors 378 MB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download wd-vit-tagger-v3).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

ImageNet-1k val

5000 random images, top-1 / top-5 %

Rundtypetop-1 % ↑top-5 % ↑imagesms / image
Original fp32not measured
Original fp16not measured
Portable fp32fp320.080.36 5000 16.7
Portablenot measured
Kernelsnot measured

The original code was not run on this dataset, so the table cannot show the distance to it.

fastforks: the model's own resize / crop on the GPU; original: the library's pretrained loader and its PIL eval transform. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks 6f0a70e1, 2026-11-17.

COCO val2017 (first 500 images)

tag F1 at 0.35 vs the original fp32 / top-1 agreement %

Rundtypetag_f1 ↑top1_agree ↑Δ tag_f1 vs fp32 originalimagesms / image
Original fp32fp32100.00100.00 reference 500 19.2
Original fp16fp1699.9599.80 −0.05 500 5.86
Portable fp32not measured
Portablefp1699.9199.80 −0.09 500 3.97
Kernelsfp1699.9099.20 −0.10 500 4.07

fastforks: the model's own resize / crop on the GPU; original: the library's pretrained loader and its PIL eval transform. Taggers have no public benchmark with their tag set, so the original fp32 is the reference: tag F1 = F1 of the tags at probability 0.35 of our output against the tags of the original fp32, micro-averaged over the images; top-1 agreement = share of images with the same most likely tag. The original fp16 row shows the difference of the original itself in half precision. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-16; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 33b2432c, 2026-11-16.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 1.5e-05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.015 and p99 <= 0.052 (absolute error of the output logits).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.000015 not recorded
GPU default dtypes, mean |diff|≤ 0.015 0.00717
GPU default dtypes, p99 |diff|≤ 0.052 0.02504

Recorded for wd-vit-tagger-v3 on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-13, with these kernels: cudnn_haccfvm_convfvm_extrafvm_mbfvm_r3

Details

SmilingWolf's WD v3 anime image taggers: timm ViT / ConvNeXt / EVA-02 trained on Danbooru, 10 861 tags (multi-label).

Input / output
Input: one RGB image. Output: ImageNet-1k class logits.
Input size
fixed 448x448: the input is resized (short side 448) and centre-cropped to it; tested up to 448x448 (248 MiB allocated)
Outputs
logits
Checkpoint
arch="vit_base_patch16_224", model_args="{'img_size': 448, 'class_token': False, 'global_pool': 'avg', 'fc_norm': False, 'act_layer': 'gelu_tanh'}"
CUDA kernels
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
  • fvm_convfused convolutions for image classifiers
  • fvm_extrafused transformer row operations (rotary split, SwiGLU with LayerNorm)
  • fvm_mbfused MBConv blocks (MobileNet and EfficientNet families)
  • fvm_r3further fused classifier blocks
Apple (MPS)
fp32, fp16

Limitations

  • An image with an alpha channel is not composited on white first, as the reference script does: pass RGB.
  • Kernels allocate as much as portable (673 vs 669 MB) but reserve 806 vs 684 MB (graph / kernel workspace blocks); both are below the float32 original (1299 / 1324 MB).
Full reference, generated from the repository

SmilingWolf's WD v3 taggers: tag anime-style images with 10 861 Danbooru tags (general, character, rating), on ViT, ConvNeXt and EVA-02 backbones. Apache-2.0 weights.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
wd-vit-tagger-v3synthetic (448x448)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
19.0
5.78
4.01
4.06
5.33
3.32
426 / 442
231 / 242
235 / 242
234 / 284
282 / 302
421 / 446
wd-convnext-tagger-v3synthetic (448x448)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
15.3
9.60
5.59
4.46
4.45
3.10
481 / 516
259 / 292
260 / 292
238 / 276
380 / 392
521 / 548
wd-vit-large-tagger-v3synthetic (448x448)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
76.8
19.9
12.9
12.6
13.3
11.2
1287 / 1302
662 / 682
669 / 682
667 / 724
713 / 742
1266 / 1290
wd-eva02-large-tagger-v3synthetic (448x448)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
84.4
26.6
18.3
14.1
15.7
12.4
1299 / 1324
668 / 684
669 / 684
673 / 806
714 / 724
1280 / 1306
Details
  • Original code: https://github.com/huggingface/pytorch-image-models at 0df212b369a5
  • Code licence: Apache-2.0 (permissive); files:
  • Weights licence: Apache-2.0
  • Licence evidence: https://huggingface.co/SmilingWolf/wd-vit-tagger-v3/blob/7f6b584d0bd3f55c4531f14ba3d4761b2bccdc0f/README.md
  • Training data: Danbooru (anime illustrations with community tags; WD taggers: image ids up to 7 220 105)
  • Kernel libraries: cudnn_hacc, fvm_conv, fvm_extra, fvm_mb, fvm_r3
  • Variants: wd-vit-tagger-v3, wd-convnext-tagger-v3, wd-vit-large-tagger-v3, wd-eva02-large-tagger-v3
  • Outputs: logits; label_set: wd-tagger-v3; probs: sigmoid
  • Input size: fixed 448x448: the input is resized (short side 448) and centre-cropped to it
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): wd-vit-tagger-v3 448x448 (0.2 GiB peak allocated, 0.3 reserved); wd-convnext-tagger-v3 448x448 (0.3 GiB peak allocated, 0.4 reserved); wd-vit-large-tagger-v3 448x448 (0.7 GiB peak allocated, 0.7 reserved); wd-eva02-large-tagger-v3 448x448 (0.7 GiB peak allocated, 0.9 reserved)
  • wd-vit-tagger-v3 448x448, first call: portable + torch.compile 10 s (cold Inductor cache), TensorRT fp16 19 s (ONNX + engine).
  • wd-convnext-tagger-v3 448x448, first call: portable + torch.compile 12 s (cold Inductor cache), TensorRT fp16 40 s (ONNX + engine).
  • wd-vit-large-tagger-v3 448x448, first call: portable + torch.compile 14 s (cold Inductor cache), TensorRT fp16 36 s (ONNX + engine).
  • wd-eva02-large-tagger-v3 448x448, first call: portable + torch.compile 22 s (cold Inductor cache), TensorRT fp16 40 s (ONNX + engine).
  • wd-vit-tagger-v3 original 448x448: .half() on 1 modules, fp16 inputs
  • wd-convnext-tagger-v3 original 448x448: .half() on 1 modules, fp16 inputs
  • wd-vit-large-tagger-v3 original 448x448: .half() on 1 modules, fp16 inputs
  • wd-eva02-large-tagger-v3 original 448x448: .half() on 1 modules, fp16 inputs
  • wd-vit-tagger-v3 load / first call: original 2.33 s / 0.318 s (448x448), portable 2.25 s / 0.088 s (448x448), kernels 2.47 s / 0.06 s (448x448)
  • wd-convnext-tagger-v3 load / first call: original 2.92 s / 0.484 s (448x448), portable 2.34 s / 0.236 s (448x448), kernels 2.5 s / 0.066 s (448x448)
  • wd-vit-large-tagger-v3 load / first call: original 4.74 s / 0.439 s (448x448), portable 5.56 s / 0.108 s (448x448), kernels 4.5 s / 0.07 s (448x448)
  • wd-eva02-large-tagger-v3 load / first call: original 4.82 s / 0.352 s (448x448), portable 4.58 s / 0.147 s (448x448), kernels 4.22 s / 0.079 s (448x448)
  • Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5

Measured

fastforks: the model's own resize / crop on the GPU; original: the library's pretrained loader and its PIL eval transform. Taggers have no public benchmark with their tag set, so the original fp32 is the reference: tag F1 = F1 of the tags at probability 0.35 of our output against the tags of the original fp32, micro-averaged over the images; top-1 agreement = share of images with the same most likely tag. The original fp16 row shows the difference of the original itself in half precision. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
wd-vit-tagger-v3ImageNet-1k val, 5000 random images, top-1 / top-5 %0.08 / 0.36
wd-vit-tagger-v3COCO val2017 (first 500 images), tag F1 at 0.35 vs the original fp32 / top-1 agreement %100.00 / 100.0099.95 / 99.8099.91 / 99.8099.90 / 99.20
wd-convnext-tagger-v3ImageNet-1k val, 5000 random images, top-1 / top-5 %0.10 / 0.40
wd-convnext-tagger-v3COCO val2017 (first 500 images), tag F1 at 0.35 vs the original fp32 / top-1 agreement %100.00 / 100.0099.92 / 99.8099.90 / 99.6099.88 / 99.80
wd-vit-large-tagger-v3ImageNet-1k val, 5000 random images, top-1 / top-5 %0.06 / 0.34
wd-vit-large-tagger-v3COCO val2017 (first 500 images), tag F1 at 0.35 vs the original fp32 / top-1 agreement %100.00 / 100.0099.93 / 99.8099.87 / 99.4099.88 / 99.80
wd-eva02-large-tagger-v3ImageNet-1k val, 5000 random images, top-1 / top-5 %0.08 / 0.36
wd-eva02-large-tagger-v3COCO val2017 (first 500 images), tag F1 at 0.35 vs the original fp32 / top-1 agreement %100.00 / 100.0099.93 / 99.8099.84 / 99.8099.84 / 99.40

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 33b2432c, 2026-11-16; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 6f0a70e1, 2026-11-17; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 33b2432c, 2026-11-16.

Parity

CPU, float32: max |diff| <= 1.5e-05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.015 and p99 <= 0.052 (absolute error of the output logits).

variantkernels error vs original, mean / p99GPU, torchkernels used
wd-vit-tagger-v30.00717 / 0.02504RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
wd-convnext-tagger-v30.01015 / 0.0344RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
wd-vit-large-tagger-v30.00643 / 0.02243RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
wd-eva02-large-tagger-v30.00947 / 0.03264RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120

Limitations

  • An image with an alpha channel is not composited on white first, as the reference script does: pass RGB.
  • Kernels allocate as much as portable (673 vs 669 MB) but reserve 806 vs 684 MB (graph / kernel workspace blocks); both are below the float32 original (1299 / 1324 MB).

Example output

One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).

Input

Top 5

  1. general 99%
  2. no_humans 94%
  3. photorealistic 93%
  4. cat 89%
  5. realistic 87%
Chelsea the cat, input
Input · 100%

Input: Chelsea the cat, Stéfan van der Walt (CC0).