ComfyUI-PixAI-Tagger
ComfyUI custom nodes for image tagging with PixAI Tagger v1.0.
Nodes (2)
ComfyUI PixAI Tagger
A ComfyUI custom node for image tagging using PixAI Tagger v1.0.
This node supports batch image tagging and provides both a simple tagger interface and an advanced interface with separate category outputs.
Features
- Uses PixAI Tagger v1.0
- Batch image tagging
- Simple tagger node with a workflow similar to commonly used WD14 Tagger interfaces
- Advanced tagger node with separate outputs for each PixAI tag category
- Configurable category thresholds
- Underscore replacement
- Tag exclusion
- Optional model unloading after execution
- Model is downloaded automatically from Hugging Face on first use
Nodes
PixAI Tagger
A simple tagger designed for workflows that need a single combined tag list. This node is compatible with WD14 Tagger node and can replace or use with it.
Inputs
| Input | Description | Default |
| --------------------- | --------------------------------------- | ------- |
| images | Input image(s) | |
| model | Hugging Face model ID | pixai-labs/pixai-tagger-v1.0 |
| threshold | Threshold for general and style tags | 0.17 |
| character_threshold | Threshold for character tags | 0.27 |
| replace_underscore | Replace _ with spaces | False |
| trailing_comma | Add a trailing comma to the output | False |
| unload_model | Unload the model after execution | False |
| exclude_tags | Comma-separated list of tags to exclude | "" |
Output
all_tags— Combined general, character, and style tags
This node uses a shared threshold for general and style tags for a simpler workflow. The PixAI-recommended style threshold of
0.15is available in the Advanced node.
PixAI Tagger (Advanced)
Provides as-is outputs from PixAI Tagger, including 6 tag categories.
Inputs
| Input | Description | Default |
| --------------------- | --------------------------------------- | ------- |
| images | Input image(s) | |
| model | Hugging Face model ID | pixai-labs/pixai-tagger-v1.0 |
| character_threshold | Threshold for character tags | 0.27 |
| general_threshold | Threshold for general tags | 0.17 |
| style_threshold | Threshold for style tags | 0.15 |
| copyright_threshold | Threshold for copyright tags | 0.24 |
| meta_threshold | Threshold for meta tags | 0.17 |
| rating_threshold | Threshold for rating tags | 0.41 |
| replace_underscore | Replace _ with spaces | False |
| unload_model | Unload the model after execution | False |
| exclude_tags | Comma-separated list of tags to exclude | "" |
Outputs
character_tagsgeneral_tagsstyle_tagscopyright_tagsmeta_tagsrating_tags
The default category thresholds above follow the thresholds recommended by PixAI Tagger v1.0.
Installation
ComfyUI Registry / Manager
This node package is available through the ComfyUI Registry and can be installed from ComfyUI Manager.
- Open ComfyUI Manager.
- Search for
ComfyUI PixAI Tagger. - Install the package.
- Restart ComfyUI.
Manual Installation
Clone this repository into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/warwk/ComfyUI-PixAI-Tagger.git
Install the Python dependencies:
pip install -r requirements.txt
Or, if your environment is configured for Python packages through pyproject.toml:
pip install .
Restart ComfyUI after installation.
Do not install or replace PyTorch manually unless required by your ComfyUI environment. This node does not specify
torchortorchvisionas dependencies because ComfyUI normally manages its own PyTorch environment.
Model
The default model is:
pixai-labs/pixai-tagger-v1.0
The model is downloaded automatically from Hugging Face when the node is used for the first time.
The model is not included or redistributed with this repository.
Model page:
Example Workflow
A typical workflow can be:
Load Image
↓
PixAI Tagger
↓
all_tags
↓
Prompt / Text Processing
For workflows that need category-specific tags:
Load Image
↓
PixAI Tagger (Advanced)
├── character_tags
├── general_tags
├── style_tags
├── copyright_tags
├── meta_tags
└── rating_tags
Both nodes support batched IMAGE input.
Tag Processing
Tags are sorted by confidence score in descending order.
The following processing is applied:
- Tags below the selected threshold are removed.
- Tags specified in
exclude_tagsare removed. - Underscores can optionally be replaced with spaces.
- Parentheses are escaped for prompt-oriented workflows.
- Tags are joined with
,. - The Simple node can optionally append a trailing comma.
For example:
1girl, solo, long hair, looking at viewer
Excluding Tags
Multiple tags can be excluded by separating them with commas.
Example:
text, watermark, signature
Tag matching for exclusion is case-insensitive.
Requirements
The main Python dependencies are:
- Transformers
- timm
- Hugging Face Hub
- NumPy
- Pillow
See requirements.txt for the Python package dependencies.
License
This project is licensed under the MIT License.
See the LICENSE file for the complete license text.
Third-Party Software and Models
This project uses PixAI Tagger v1.0, which is licensed under the Apache License 2.0.
The PixAI Tagger model and its associated implementation are provided by PixAI Labs and are subject to their respective license terms.
PixAI Tagger v1.0:
- Repository: https://huggingface.co/pixai-labs/pixai-tagger-v1.0
- License: Apache-2.0
The PixAI Tagger model is downloaded from Hugging Face at runtime and is not bundled with this project.
This project is not affiliated with, endorsed by, or sponsored by PixAI Labs.
Credits
- PixAI Labs — PixAI Tagger v1.0
- Hugging Face — Model hosting and Transformers ecosystem
- ComfyUI — ComfyUI and custom node ecosystem
Disclaimer
This project is an independent community project.
PixAI Tagger, PixAI, and related trademarks belong to their respective owners.
Issues and Contributions
Bug reports, feature requests, and pull requests are welcome.
When reporting an issue, please include:
- ComfyUI version
- Python version
- Operating system
- GPU and VRAM
- Relevant error message or traceback
- Node settings used when the problem occurred