Tooling for training the fwaun model family. Two command groups under one binary:
dataset— a 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.model— diffusion-checkpoint utilities over safetensors files: task-vectormerge-diff, LoRA extraction (extract-lora), and INT8+ConvRot quantization (quant-int8) and back to bf16 (dequant), and a header inspector (info). Pure-Rust/CPU, available in every build.
Built primarily for ANIMA preview and Krea 2 LoRA training, but the data model and export profiles are not ANIMA-specific.
The dataset commands are designed around the input formats consumed by
kohya-ss/musubi-tuner and kohya-ss/sd-scripts, and the
model commands around ComfyUI. Use with other trainers or inference
stacks is not tested.
- 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
-fooonce; re-running the tagger preserves the suppression even with a different model. - Dataset-wide tags in one line.
common_tagsinfwaun-tools.tomlapplies the trigger word and its-hair_coloursuppressions to every image without touching a single sidecar — including images added later. Any image can opt out individually. - Curation-only organizational tags. A positive manual tag starting
with an underscore (
_foo) is kept in the data and counted for tag-group sorting but never exported — so you can mark "reviewed, none of these" distinctly from "not yet reviewed". - Tag groups + Kanban view. Declare mutually-exclusive tag sets
(e.g. costume variants) in
fwaun-tools.toml; the GUI shows one column per tag with drag-and-drop to switch. - Full-size preview. Double-click a thumbnail to check the image at screen resolution, ← / → to step through the filtered list, Esc to close — or hand it to your usual viewer with the right-click menu's Open in default app / Show in folder.
- Per-folder configuration via
fwaun-tools.toml. Pick the tagger model, captioner, export profile and threshold per dataset. - Four output modes.
exportwrites one text file per image (sd-scripts DreamBooth/LoRA caption-file mode — tags by default,--content captionfor natural-language models like Qwen Image/Flux that weren't trained on danbooru tags, or--content tags+caption/caption+tagsto put both blocks in one file for hybrid models like MOSS Image;--extpicks the output extension, e.g.--ext tags.txt, so several kinds can coexist in one folder without overwriting each other);metadatawrites a singlemeta.json(sd-scripts fine-tune mode). - Fast re-opening. The GUI's Reload button re-scans the open folder and only regenerates thumbnails for images that actually changed, so picking up a CLI run or a handful of new files is instant instead of a full rebuild. Across sessions, an on-disk thumbnail cache (bounded and clearable from the config modal's App tab) does the same job.
- Bilingual GUI. English / 日本語 toggle, defaults to host locale.
- CLI for batch operations, GUI for curation. The GUI also has a
Model tools tab (Dataset / Model tools mode switch) that front-ends
the
merge-diff/extract-lora/quant-int8/dequant/infocheckpoint utilities for people who'd rather not use the CLI.
curl -fsSL https://raw.githubusercontent.com/fwaunstp/fwaun-tools/main/install.sh | shirm https://raw.githubusercontent.com/fwaunstp/fwaun-tools/main/install.ps1 | iexBoth installers download the latest GitHub release, verify SHA256, and drop both binaries side-by-side:
| Platform | CLI | GUI |
|---|---|---|
| macOS | ~/.local/bin/fwaun-tools |
~/.local/bin/fwaun-tools-gui |
| Linux | ~/.local/bin/fwaun-tools |
~/.local/bin/fwaun-tools-gui |
| Windows | %USERPROFILE%\bin\fwaun-tools.exe |
%USERPROFILE%\bin\fwaun-tools-gui.exe |
Pin a specific version with --version v0.2.1 (or -Version v0.2.1 on
PowerShell).
By default both binaries are installed, except on a headless Linux host
(no $DISPLAY / $WAYLAND_DISPLAY), where only the CLI is installed — the GUI
needs a display to run. Override the selection with --both / --cli-only /
--gui-only:
# CLI only (e.g. a training box you only SSH into)
curl -fsSL https://raw.githubusercontent.com/fwaunstp/fwaun-tools/main/install.sh | sh -s -- --cli-only
# force both even on a headless host (you'll use a remote / forwarded display)
curl -fsSL https://raw.githubusercontent.com/fwaunstp/fwaun-tools/main/install.sh | sh -s -- --bothThe GUI is a single self-contained binary (built with egui) —
no .app, no AppImage, no MSI. On Linux it depends on the standard
X11 / Wayland system libraries that ship with every desktop
distribution, but no extra runtime install is required.
On macOS the binary is not notarized. The installer clears the
com.apple.quarantine attribute, but if Gatekeeper still blocks it
when launched from Finder, run it from Terminal once
(~/.local/bin/fwaun-tools-gui).
The Linux release binaries are full builds (see Build variants),
so they 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 local tagger / captioner depend on references
__isoc23_* symbols introduced in glibc 2.38. Upgrade, or install the
light CLI from source — it links no ONNX Runtime and has no glibc floor,
so it runs on those older distros:
cargo install --git https://github.com/fwaunstp/fwaun-tools fwaun-tools-clicargo install builds the default light variant (needs a Rust toolchain;
no prebuilt light binaries are published — see Build variants).
The install.sh script prints this same hint if it detects an older glibc.
The maintainer develops on macOS and Linux. Windows builds are produced by CI but not regularly exercised — please file an issue if anything breaks.
Requires Rust 1.88+ (edition 2024). On Linux, install standard X11 /
Wayland dev headers (libx11-dev, libxcb1-dev, libxkbcommon-dev,
libwayland-dev, libgl1-mesa-dev, or your distro's equivalents) for
the GUI:
git clone https://github.com/fwaunstp/fwaun-tools
cd fwaun-tools
# light build (default) — no local ONNX inference, runs anywhere
cargo build --release -p fwaun-tools-cli
cargo build --release -p fwaun-tools-gui
# full build — adds the local WD14 tagger + Qwen3-VL captioner (glibc 2.38+)
cargo build --release -p fwaun-tools-cli --features full
cargo build --release -p fwaun-tools-gui --features fullTwo build flavors, selected with the full cargo feature:
| light (default) | full (--features full) |
|
|---|---|---|
Local WD14 tagger (tag) |
✗ | ✓ |
| Local Qwen3-VL captioner | ✗ | ✓ |
OpenAI-compatible captioner (caption) |
✓ | ✓ |
| booru / export / metadata / tag / manual editing / tag groups | ✓ | ✓ |
| ONNX Runtime linked | no | yes |
| Linux glibc floor | none (runs on old distros) | 2.38+ |
| Approx. CLI size | ~11 MB | ~35 MB |
The published release binaries are full. A light binary drops the two local ONNX models (WD14 tagging, Qwen3-VL captioning) but keeps everything else — including captioning via any OpenAI-compatible endpoint (llama.cpp, Ollama, LM Studio, vLLM, …). Running a local-ONNX-only command in a light build fails fast with a message telling you to install the full build. Use light when you caption over an API and/or need to run on an older-glibc host.
-
Launch
fwaun-tools-gui(or run the CLI directly — see below). -
Open folder… → pick a directory of images.
-
(Optional) Config… → write
fwaun-tools.tomlfor the dataset. Sensible defaults apply if you skip this. -
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). SetHF_HOMEto relocate the cache, orHF_ENDPOINT(e.g.