Skip to content

beta-260526: Add timm-based WD tagger and trigger_word UI

Choose a tag to compare

@LingyeSoul LingyeSoul released this 26 May 12:12
Replace ONNX Runtime tagger with a timm/PyTorch backend and add a new trigger_word setting across API, frontend and service. Key changes:

- WD tagger: switch docs/comments and dependencies from onnxruntime-gpu to timm (pyproject + uv.lock), add wandb dependency and constrain httptools.<newline>
- API & service: add trigger_word parameter to TagRequest, settings, and save/load flows (webui/api/tagger.py, webui/services/wd_tagger_service.py). Update config schema to expose test_prompt/test_negative_prompt.
- Frontend: expose trigger_word in i18n (en/cn), DatasetBrowser UI and initial state, and include trigger_word in tag requests.
- Tests: update WD tagger unit tests to remove ONNX dependence, use a torchvision/timm-compatible preprocessing stub, and assert trigger_word is saved/loaded.
- Windows scripts: add portable Node.js download/use logic to setup-win.bat and ensure build-webui-win.bat uses portable node if system node missing; add tools/ and wandb to .gitignore.
- Accelerator & logging: robustly handle WANDB_ENABLED when no API key, warn instead of crashing, and adjust tensorboard/wandb logic when logging_dir is unset.
- Misc: remove temporary static_token_count override from sample_images (training.py), drop static_token_count from config_service ignored groups, and update lockfile (uv.lock) to reflect dependency changes and other package additions (timm, wandb, opentelemetry, platformdirs, sentry-sdk).

These changes remove reliance on ONNX/CUDA runtime (avoiding CUDA 12 cuBLAS issues), add a simple trigger-word feature for tagging, improve Windows frontend build robustness, and make wandb usage safer when not configured.