wdsort is a command-line interface (CLI) tool designed to help users sort images into folders using the WaifuDiffusion model.
This program utilizes the model from Hugging Face - SmilingWolf/wd-v1-4-swinv2-tagger-v2 to categorize images based on their content.
- Image Sorting: Automatically sort images into designated folders based on their content.
- Easy to Use: Simple CLI commands for easy access to users of any skill level.
Before using wdsort, ensure you have the following:
- Python 3.7 or higher
- Required Python libraries (listed in
requirements.txt
)
-
Clone the repository:
git clone https://github.com/yourusername/wdsort.git
-
Navigate to project directory:
cd wdsort
-
Create virtual environment and activate:
python -m venv .venv && .venv\Scripts\Activate
-
Install requirements
pip install -r requirements.txt
-
Download model.onnx, selected_tags.csv, and config.json from Hugging Face.s
-
Place these files in model directory
-
To Scan by Folder
With a bias towards the first character identified. Otherwise, the first tag found.
python wdsort.py --folder "path/to/folder"
-
To Assess Tags of Single Image
Output all tags for a single image to console.
python wdsort.py --scan "path/to/image"
-
Sort By Specific Tag
Will sort by specified "tag" and any combination where that tag is used (e.g., eat and eating)
python wdsort.py --bytag "tag"
This is not the perfect solution for organizing images. I am new to programming in general, so there is still a lot of work to do. Primary credit goes to SmilingWolf for offering the model on HugggingFace.
If this program provides any legal issues to anybody, please let me know and I will take it down promptly.
[] Add more customized sorting criteria