anima-tagger-tagger 0.1.0

WD14-family ONNX image tagger used by anima-tagger.
Documentation

anima-tagger

Tag and caption editor for local Stable Diffusion LoRA datasets. Combines manual edits, an automatic WD14-family tagger, Qwen3-VL captioning, and Danbooru API fetches under one editing surface so the user doesn't have to think about provenance while curating.

Built primarily for ANIMA preview LoRA training, but the data model and export profiles are not ANIMA-specific.

日本語版 README

Features

  • One chip list, three sources. Manual tags, auto-tagger output, and Danbooru tags live in the same list — color-coded, but the user curates without thinking about provenance.
  • Negative-tag suppression that survives model swaps. Mark -foo once; re-running the tagger preserves the suppression even with a different model.
  • Per-folder configuration via anima-tagger.toml. Pick the tagger model, captioner, export profile and threshold per dataset.
  • Two output modes. export writes one <image>.txt per image (sd-scripts DreamBooth/LoRA caption-file mode); metadata writes a single meta.json (sd-scripts fine-tune mode).
  • Bilingual GUI. English / 日本語 toggle, defaults to host locale.
  • CLI for batch operations, GUI for curation.

Install

macOS (Apple Silicon) / Linux (x64 or arm64)

curl -fsSL https://raw.githubusercontent.com/fwaunstp/anima-tagger/main/install.sh | sh

Windows (x64)

irm https://raw.githubusercontent.com/fwaunstp/anima-tagger/main/install.ps1 | iex

Both installers download the latest GitHub release, verify SHA256, and place:

Platform CLI GUI
macOS ~/.local/bin/anima-tagger ~/Applications/anima-tagger.app
Linux ~/.local/bin/anima-tagger ~/.local/bin/anima-tagger-gui (AppImage)
Windows %USERPROFILE%\bin\anima-tagger.exe installed via MSI (UAC prompt)

Pin a specific version with --version v0.1.0 (or -Version v0.1.0 on PowerShell).

macOS first launch

The macOS bundle is not notarized. The installer clears the com.apple.quarantine attribute, but if Gatekeeper still blocks it, right-click the app in Finder → Open to confirm once.

Linux glibc requirement

The Linux release binaries link against the glibc shipped on Ubuntu 24.04 (glibc 2.39). They will not run on Ubuntu 22.04, Debian 12, or earlier — the prebuilt ONNX Runtime that the tagger / captioner depend on references __isoc23_* symbols introduced in glibc 2.38. Build from source on older distros, or upgrade.

Windows support caveat

The maintainer develops on macOS and Linux. Windows builds are produced by CI but not regularly exercised — please file an issue if anything breaks.

Build from source

Requires Rust 1.85+ (edition 2024). On Linux, install libwebkit2gtk-4.1-dev (or your distro's equivalent) for the GUI:

git clone https://github.com/fwaunstp/anima-tagger
cd anima-tagger
cargo build --release -p anima-tagger-cli
cargo build --release -p anima-tagger-gui

Quick start

  1. Launch anima-tagger-gui (or run the CLI directly — see below).

  2. Open folder… → pick a directory of images.

  3. (Optional) Config… → write anima-tagger.toml for the dataset. Sensible defaults apply if you skip this.

  4. Select images, then click Run tagger / Run captioner / Fetch booru. The first run downloads the relevant ONNX models into the HuggingFace cache (~/.cache/huggingface/hub).

  5. Curate: add manual tags, suppress unwanted auto/booru tags (× strikes them through), edit captions.

  6. Export to disk:

    anima-tagger export <dir>          # one .txt per image
    anima-tagger metadata <dir>        # single meta.json
    

Configuration overview

anima-tagger.toml lives in the dataset directory. Everything is optional — without it, defaults kick in. See crates/core/anima-tagger.toml.example for the annotated full schema. Highlights:

default_profile   = "anima"
default_tagger    = "wd-eva02-large-v3"
default_captioner = "qwen3-vl-4b"

[export.anima]
threshold = 0.35
shuffle = false
category_prefixes = { artist = "@" }

[tagger.wd-eva02-large-v3]
repo = "SmilingWolf/wd-eva02-large-tagger-v3"
input_size = 448
storage_threshold = 0.10

[captioner.qwen3-vl-4b]
repo = "onnx-community/Qwen3-4B-VL-ONNX"
subdir = "qwen3-vl-4b-instruct-onnx-vision-fp32-text-int4-cpu"
prompt = "Describe this image in detail."

CLI commands

anima-tagger tag <dir>      [--model NAME] [--threshold X] [--force]
anima-tagger caption <dir>  [--model NAME] [--force]
anima-tagger booru <dir>    [--source danbooru] [--force]
anima-tagger export <dir>   [--profile NAME] [--threshold X]
anima-tagger metadata <dir> [--profile NAME] [--threshold X] [--output PATH]
anima-tagger status <dir>
anima-tagger tokens <dir>

Documentation

License

Dual-licensed under either of:

at your option.