codex/improve-comfyui-node-compatibility
BSS WD14 Batch Tagger
Automatic image tagging using WD14 models with batch processing for ComfyUI.
Features
- 4 WD14 v3 Models: ViT, SwinV2, EVA02, ConvNeXT
- Auto Download: Models download automatically from Hugging Face
- GPU Support: CUDA acceleration for faster processing
- Batch Processing: Process multiple images from folders
- Format Support: JPG, JPEG, PNG, WEBP
- Custom Tags: Add/remove tags as needed
- ComfyUI IMAGE Compatibility: Uses native tensor image format for modern ComfyUI builds
Installation
Via ComfyUI Manager
- Open ComfyUI Manager
- Go to Registry tab
- Search for "BSS WD14 Batch Tagger"
- Click Install
- Restart ComfyUI
Manual Installation
cd ComfyUI/custom_nodes/
git clone https://github.com/BlackSnowSkill/wd14_batch_tagger.git
cd wd14_batch_tagger
pip install -r requirements.txt
Usage
Nodes
BSS Load Images from Folder 📂
- Loads images from a folder for batch processing
BSS WD14 Batch Tagger 🌿
- Tags images using WD14 models
- Saves tags to .txt files
Basic Workflow
- Use BSS Load Images from Folder to load your images
- Connect to BSS WD14 Batch Tagger for each image
- Set output folder for tag files
- Run the workflow
Settings
- Model: Choose WD14 model (auto-downloads if needed)
- Threshold: Tag confidence (0.35 default)
- Character Threshold: Separate threshold for character tags (WD category 4)
- GPU: Enable for faster processing
- Prepend/Exclude: Add custom tags or remove unwanted ones
ComfyUI Compatibility
- Tested against current ComfyUI custom node API style (
NODE_CLASS_MAPPINGS,INPUT_TYPES,RETURN_TYPES). - Uses ComfyUI-native
IMAGEtensors (float32, range0..1) in the loader node output. - Tagger node accepts both tensor images (ComfyUI-native) and numpy arrays for backward compatibility.
Models
- WD ViT Tagger v3: Fast, good quality (default)
- WD SwinV2 Tagger v3: Balanced speed/quality
- WD EVA02 Large Tagger v3: Best accuracy
- WD ConvNeXT Tagger v3: Modern architecture
Models download automatically on first use.
Requirements
- Python 3.8+
- ComfyUI
- CUDA GPU (optional)
Troubleshooting
onnxruntime Not Available Error
If you see "onnxruntime is not available", fix it:
Step 1: Remove conflicting packages
pip uninstall onnxruntime onnxruntime-gpu -y
Step 2: Install correct version
pip install 'onnxruntime>=1.18.0,<2.0.0'
Step 3: Verify installation
python -c "import onnxruntime; print(onnxruntime.__version__)"
Or reinstall the entire node:
cd ComfyUI/custom_nodes/wd14_batch_tagger
pip install -r requirements.txt --upgrade --force-reinstall
Note: Make sure you're using the correct Python environment (ComfyUI's venv).
Support
License
MIT License - see LICENSE file for details.
Author: Blacksnowskill
Languages
Python
100%