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.
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.
The PiDiNetPreprocessor node accepts the following inputs:
Image: The primary input image that will be processed to extract soft-edge lines.
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.
Resolution: Specifies the resolution at which the edge detection is performed. A higher resolution may provide more detailed edges.
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.
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:
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.