← See All Custom Node Packs

ComfyUI-WD14-Tagger

1196

Run ComfyUI Easily with InstaSD

Skip the complex setup and run ComfyUI online. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

Available Nodes

WD14Tagger|pysssss

ComfyUI WD14 Tagger Node Documentation

Overview

The WD14 Tagger node, part of the ComfyUI ecosystem, provides functionality for automated image interrogation to identify and output descriptive tags, known as "booru tags." This node serves as an extension to ComfyUI and leverages pre-trained models to extract relevant tags from the input images, following the methodology established by the SmilingWolf/wd-v1-4-tags project. It is particularly useful in contexts where image categorization is required, such as in managing image databases or preparing datasets for machine learning.

What This Node Does

The WD14 Tagger node processes input images to generate descriptive tags that characterize the content within the images. By utilizing pre-trained machine learning models, the node identifies and outputs relevant terms that can be used for image sorting, search, or indexing purposes.

The node supports multiple batch inputs, allowing it to process several images at a time. It downloads necessary models during runtime if they are not already available, making it seamless to use without prior preparation.

Inputs

  • Image: The primary input for the WD14 Tagger node is an image file. The image serves as the subject for which tags will be generated.

  • Model: The node requires a specification of the interrogation model to utilize. Available models can be chosen, with popular choices including ConvNextV2 and MOAT.

  • Threshold: A numerical input that determines the minimum score a tag must achieve to be considered valid. This is a float value between 0 and 1.

  • Character Threshold: Similar to the threshold, this is a score criterion specifically for character tags, dictating their validity.

  • Replace Underscore: A boolean input that specifies whether underscores in tags should be replaced with spaces for readability.

  • Trailing Comma: A boolean input to determine if tags should end with a comma.

  • Exclude Tags: A string input of comma-separated tags that should be deliberately excluded from the results.

Outputs

  • Tags List (STRING): The node outputs an array/list of valid tags as a single string. Each tag adds useful descriptive information to the image and aids in indexing and categorization tasks.

Use in ComfyUI Workflows

In a typical ComfyUI workflow, the WD14 Tagger node can serve multiple purposes:

  1. Image Indexing: By obtaining descriptive tags for images, this node can help in organizing and categorizing large image datasets.

  2. Search Optimization: The generated tags can be used to improve search functionality within image repositories or archives by allowing for tag-based search operations.

  3. Data Annotation: For machine learning applications, this node automates part of the image annotation process, providing initial tags that can be refined or expanded by human annotators.

  4. Batch Processing: The node makes efficient use of ComfyUI's batching capabilities to tag multiple images simultaneously, saving time during large-scale data processing tasks.

Special Features and Considerations

  • Model Management: Models are managed automatically; the node will download them as needed, ensuring that the latest and most suitable model is used. However, users can manually download and set up models if they have specific requirements or constraints.

  • Configurations: The node can be configured via a pysssss.json settings file, allowing for customization of default options and behaviors.

  • Offline Use: Though it defaults to online use for model downloads, the node can also be configured for offline operation by pre-downloading required models and setting them up manually.

  • GPU Support: While the node performs efficiently on CPU via onnxruntime, it supports GPU acceleration through onnxruntime-gpu for users who require and can support such configurations.

Overall, the WD14 Tagger node is a powerful tool within ComfyUI for leveraging machine learning to automate the tedious task of image tag generation, boosting productivity and accuracy in workflows involving large image datasets.

Want to try ComfyUI-WD14-Tagger without installing anything? Run ComfyUI online on InstaSD's cloud GPUs — no setup required.