Skip to content
Node packVerifiedExternal
Open source

ComfyUI-WD14-Tagger

A ComfyUI extension allowing for the interrogation of booru tags from images.

Maintainer@pythongosssssBgrade

Package profile

Status
Verified
Publisher
@pythongosssss
Source
GitHub
Stars
1.3K

README

ComfyUI WD 1.4 Tagger

A ComfyUI extension allowing the interrogation of booru tags from images.

Based on SmilingWolf/wd-v1-4-tags and toriato/stable-diffusion-webui-wd14-tagger
All models created by SmilingWolf

Installation

  1. git clone https://github.com/pythongosssss/ComfyUI-WD14-Tagger into the custom_nodes folder
    • e.g. custom_nodes\ComfyUI-WD14-Tagger
  2. Open a Command Prompt/Terminal/etc
  3. Change to the custom_nodes\ComfyUI-WD14-Tagger folder you just created
    • e.g. cd C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-WD14-Tagger or wherever you have it installed
  4. Install python packages
    • Windows Standalone installation (embedded python):
      ../../../python_embeded/python.exe -s -m pip install -r requirements.txt
    • Manual/non-Windows installation
      pip install -r requirements.txt

Usage

Add the node via image -> WD14Tagger|pysssss
image
Models are automatically downloaded at runtime if missing.
image
Supports tagging and outputting multiple batched inputs.

  • model: The interrogation model to use. You can try them out here WaifuDiffusion v1.4 Tags. The newest model (as of writing) is MOAT and the most popular is ConvNextV2.
  • threshold: The score for the tag to be considered valid
  • character_threshold: The score for the character tag to be considered valid
  • exclude_tags A comma separated list of tags that should not be included in the results

Quick interrogation of images is also available on any node that is displaying an image, e.g. a LoadImage, SaveImage, PreviewImage node.
Simply right click on the node (or if displaying multiple images, on the image you want to interrogate) and select WD14 Tagger from the menu
image

Settings used for this are in the settings section of pysssss.json.

Offline Use

Simplest way is to use it online, interrogate an image, and the model will be downloaded and cached, however if you want to manually download the models:

  • Create a models folder (in same folder as the wd14tagger.py)
  • Use URLs for models from the list in pysssss.json
  • Download model.onnx and name it with the model name e.g. wd-v1-4-convnext-tagger-v2.onnx
  • Download selected_tags.csv and name it with the model name e.g. wd-v1-4-convnext-tagger-v2.csv

Requirements

onnxruntime (recommended, interrogation is still fast on CPU, included in requirements.txt)
or onnxruntime-gpu (allows use of GPU, many people have issues with this, if you try I can't provide support for this)

Changelog

  • 2023-05-14 - Moved to own repo, add downloading models, support multiple inputs

Nodes in this pack

1 node
  • WD14Tagger|pysssss

Related resources

38 connections
Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V2.0Used byComfyUI Image Workflows — V16Used byComfyUI Image Workflows — V17Used byComfyUI Image Workflows — V9.0Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V3.0 Cnet Seed VR2Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — v1.2Used byWan 2.2 Fast Img2Video + Auto-Captioning (Low VRAM Friendly) — v1.0Used byimg2caption — v6.0Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — v4.0.1 InpaintUsed byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — v1.0Used byKrea 2 Moodboard + Identity Edit - ComfyUI Nodes (+ Forge Neo) — v1.3 — Rednode Studio 1.6.4Used byelpideus Qwen Image Edit 2509 + Upscaling + Face Restoration + Hand Restoration — v1.0.0Used byA Simple Anima Workflow — v1.0Used byComfyUI Image Workflows — V14Used byIllustrious/ Pony/ SDXL SFW & NSFW Pro Grade Workflow (Low and high VRAM) — v1.0Used byComfyUI Image Workflows — V19Used byCappy's SwarmUI Comfy WorkflowsUsed byImage to Pixel StyleUsed byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — v2.ohUsed byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V4.1.4 seed var enhanceUsed byComfyUI Image Workflows — V18Used bycomfyui 单人自动化工作流 — v1.1Used byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — V3.0 Pro GradeUsed byWorkflow for Flux.1-dev ControlNet UpscalerUsed byComfyUI Image Workflows — V7.0Used byAnima Style Explorer & Prompt Workflow | Style Blending & Automated Artist Prompting — Workflow_v3.7.1Used bySynariAI / OFMTech / MarlAI - OFM Tech 2.0 — v1.0Used byEasy Danbooru Tagger for ComfyUI with Clothing & Pose Separation (Image Captioning) — v1.0Used byAnima Style Explorer & Prompt Workflow | Style Blending & Automated Artist Prompting — Workflow-v2.5Used bySDXL LoRA trainer - auto set up, only need image folderUsed byUltra UpscalerUsed byFlux Kontext workflow - detailers, IPAdapter, upscale, all optional — v1.0Used byAnima Style Explorer & Prompt Workflow | Style Blending & Automated Artist Prompting — Workflow-v2.0Used byAnima Style Explorer & Prompt Workflow | Style Blending & Automated Artist Prompting — workflow-Thinking-v2.0Used byEasy Danbooru Tagger for ComfyUI with Clothing & Pose Separation (Image Captioning) — v2.0Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — v2.1 CNETUsed byComfyUI Image Workflows — V10Used byComfyUI Image Workflows — V12

Sources

3 sources
GitHubSourceVersion 9e0a6e700299182fc05c58b62e7ad9f72182a78b
github.com/pythongosssss/ComfyUI-WD14-Tagger

Verified Oct 19

Source excerpts

1 excerpt

Source context: Repo pythongosssss/ComfyUI-WD14-Tagger