comfyui_controlnet_aux

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

Available Nodes

Zoe-DepthMapPreprocessor

Zoe Depth Map Preprocessor Node Documentation

Overview

The Zoe Depth Map Preprocessor is a node designed for generating depth maps from input images within the ComfyUI interface, which enhances the functionality of the ControlNet auxiliary preprocessors. It is part of the "Normal and Depth Estimators" category in the ControlNet Preprocessors. This node is particularly useful for creating depth hints in workflows that require depth information to improve texture, lighting, and three-dimensional perception in generated images.

Functionality

The Zoe Depth Map Preprocessor utilizes a model called ZoeDetector, which is tasked with detecting and generating depth maps from images. Depth maps are grayscale images where the shade of gray represents the distance of surfaces of scene objects from a viewpoint, allowing for depth hints in further image processing tasks.

Inputs

  • Image: The primary input to the node is an image from which the depth map is to be generated. The image is processed by the ZoeDetector model to create a depth representation.
  • Resolution: This input setting defines the resolution of the output depth map. The default resolution is set to 512, providing a balanced resolution suitable for most tasks.

Outputs

  • Image: The node outputs a single image, which is the depth map. The resulting image is a grayscale depiction of the input image, emphasizing the depth characteristics of the scene.

Usage in ComfyUI Workflows

In ComfyUI workflows, the Zoe Depth Map Preprocessor can be leveraged in various scenarios:

  1. Enhancing Image Generation: By providing depth maps, this node aids in generating more realistic images with pronounced depth perception.

  2. Improving ControlNet Outputs: The depth map can be used as a hint for ControlNet, which may require depth information to apply realistic transformations or effects on images.

  3. Augmenting 3D Visual Effects: In workflows involving 3D visual effects or simulations, depth maps serve as foundational data to create compelling and spatially accurate visuals.

To incorporate the Zoe Depth Map Preprocessor in a workflow:

  • Connect an image node as an input.
  • Set the desired resolution for the depth output.
  • Use the depth map in subsequent nodes to improve the quality and realism of the image transformation.

Special Features and Considerations

  • Pretrained Model: The node relies on a pretrained model, ZoeDetector, ensuring accurate and efficient depth map generation.

  • Resolution Configurability: Users can adjust the resolution according to their needs, offering flexibility between processing speed and detail quality.

  • Device Compatibility: The node adapts to the available device (CPU or GPU) managed by ComfyUI, optimizing processing speed appropriately.

  • Memory Management: The model used is automatically unloaded from memory after processing, ensuring optimal resource usage and preventing memory leaks.

Overall, the Zoe Depth Map Preprocessor is a valuable asset for users aiming to incorporate detailed depth cues in their image processing and generation workflows through ComfyUI with ControlNet.