Standalone Danbooru-style tag search using WD Tagger
- Python 86.3%
- PowerShell 13.7%
| .gitignore | ||
| danbooru_search.py | ||
| README.md | ||
| requirements.txt | ||
| setup.ps1 | ||
Danbooru Tag Search
Standalone Danbooru-style tag search using WD Tagger v3. All in memory — no cache, no database.
Setup
.\setup.ps1
.\.venv\Scripts\Activate.ps1
Usage
# Copy matches to destination
python danbooru_search.py search /path/to/images \
--tag solo_focus --threshold 0.5 --dest /path/to/output
# Multiple tags (AND — all must match)
python danbooru_search.py search /path/to/images \
--tag 1girl abs --threshold 0.5 --dest /path/to/output
# Multiple tags (OR — any match)
python danbooru_search.py search /path/to/images \
--tag 1girl solo_focus --any --threshold 0.5 --dest /path/to/output
# Move instead of copy
python danbooru_search.py search /path/to/images \
--tag solo_focus --threshold 0.5 --dest /path/to/output --move
# Dry run (preview)
python danbooru_search.py search /path/to/images \
--tag solo_focus --threshold 0.5 --dest /path/to/output --dry-run
Options
| Flag | Description | Default |
|---|---|---|
--tag, -t |
Tag(s) to search for (repeatable) | required |
--threshold |
Minimum tag confidence score | 0.5 |
--dest, -d |
Output directory | required |
--any |
OR logic (any tag matches), default is AND (all must match) | False |
--move |
Move instead of copy | False |
--dry-run |
Preview without copying/moving | False |
Notes
- Uses
p1atdev/wd-swinv2-tagger-v3-hf(WD Tagger v3, SwinV2-based, trained on Danbooru) - All tagging is done in-memory — no SQLite cache, no disk persistence
- Model is lazy-loaded on first use