comfyui_controlnet_aux

2888
By tstandley
Updated about 1 month ago
View on GitHub →See Common Issues →

Available Nodes

PiDiNetPreprocessor

PiDiNetPreprocessor Node Documentation

Overview

The PiDiNetPreprocessor node is part of the ComfyUI ControlNet Auxiliary Preprocessors. It is designed to extract soft-edge lines from images, which can be used as hint images for various image processing tasks. This preprocessor leverages the PiDiNet, a deep learning model specialized in detecting and refining edges in an image to produce clear, soft-edge line representations.

Functionality

This node is categorized under the "ControlNet Preprocessors/Line Extractors" menu in ComfyUI. It is particularly useful for creating line-based annotations from images, which can then be employed to guide other processes in ComfyUI or related applications.

Inputs

The PiDiNetPreprocessor node accepts the following inputs:

  1. Image: The primary input image that will be processed to extract soft-edge lines.

  2. Safe Mode: A toggle option to enable or disable safety features of the edge extraction process. This can help prevent artifacts or over-processing in certain images.

    • Options: "enable" or "disable"
  3. Resolution: Specifies the resolution at which the edge detection is performed. A higher resolution may provide more detailed edges.

Outputs

The output from the PiDiNetPreprocessor node is an image that contains the soft-edge line representation derived from the input image. These lines can be used as hints in ControlNet or related workflows within the ComfyUI ecosystem.

Usage in ComfyUI Workflows

In a typical ComfyUI workflow, the PiDiNetPreprocessor node can be used to preprocess an image before feeding it into another process that requires line-based hints, such as line art generation or control-based transformations. By providing a detailed and accurate line extraction, it allows downstream nodes and processes to leverage these extracted features effectively.

For example:

  1. Import your image into ComfyUI.
  2. Add the PiDiNetPreprocessor node to the workflow.
  3. Connect the image output from the PiDiNetPreprocessor to other processing nodes or directly to ControlNet for customized transformations.

Special Features or Considerations

  • Efficient Edge Extraction: The PiDiNet model is optimized for edge extraction, providing a balance between performance and accuracy.
  • Customizable Resolution: Users can adjust the resolution setting to tailor the level of detail captured by the edge detector.
  • Safety Features: The "Safe Mode" toggle allows users to control the extent of edge refinement, potentially reducing unwanted noise in the line output.

The PiDiNetPreprocessor node is a versatile tool within ComfyUI for artists and developers looking to incorporate precise line extraction into their workflows, enhancing processes that rely on edge detection and line hints.