ComfyUI Node: Z Depth

Class Name

ZDepthNode

Category
COCO Tools/Loaders
Author
Conor-Collins (Account age: 431days)
Extension
ComfyUI-CoCoTools
Latest Updated
2025-03-05
Github Stars
0.03K

How to Install ComfyUI-CoCoTools

Install this extension via the ComfyUI Manager by searching for ComfyUI-CoCoTools
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-CoCoTools in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Z Depth Description

Process depth information from EXR images for visualization and manipulation in image processing and AI art applications.

Z Depth:

The ZDepthNode is designed to process depth information from EXR images, which are commonly used in 3D graphics and visual effects to store high dynamic range data. This node's primary function is to load and normalize depth data from an EXR file, transforming it into a format that can be easily utilized in various image processing and AI art applications. By converting depth information into a normalized RGB format, the ZDepthNode allows you to visualize and manipulate depth data as a standard image, making it accessible for further artistic or analytical purposes. This capability is particularly beneficial for artists and developers working with 3D scenes, as it provides a straightforward way to integrate depth information into their workflows.

Z Depth Input Parameters:

exr_path

The exr_path parameter specifies the file path to the EXR image that contains the depth information you wish to process. This parameter is crucial as it directs the node to the correct file location, ensuring that the depth data is accurately loaded. The input must be a valid string representing the path to the EXR file, and it is required for the node to function. There are no default values for this parameter, as it must be explicitly provided by the user.

min_depth

The min_depth parameter defines the minimum depth value used for normalizing the depth data. This value sets the lower bound of the depth range, allowing you to control how the depth information is scaled. By adjusting this parameter, you can influence the contrast and detail of the resulting depth image. The default value is 0.0, but you can modify it to suit the specific depth range of your EXR file.

max_depth

The max_depth parameter specifies the maximum depth value for normalization, setting the upper bound of the depth range. This parameter works in conjunction with min_depth to determine how the depth data is scaled and normalized. Adjusting this value can help you achieve the desired level of detail and contrast in the depth image. The default value is 1.0, but it can be adjusted based on the depth characteristics of your EXR file.

Z Depth Output Parameters:

Normalized_Depth_Image

The Normalized_Depth_Image output is the result of processing the EXR depth data. It is an image tensor in RGB format, where the depth information has been normalized and scaled to fit within the 0-255 range. This output allows you to visualize and manipulate depth data as a standard image, making it easier to integrate into various artistic and analytical workflows. The normalized image provides a clear representation of depth, enabling you to apply further image processing techniques or use it as a component in AI art projects.

Z Depth Usage Tips:

  • Ensure that the exr_path is correctly specified and points to a valid EXR file containing depth information to avoid loading errors.
  • Adjust the min_depth and max_depth parameters to match the depth range of your specific EXR file, which can help enhance the contrast and detail in the resulting depth image.
  • Use the normalized depth image output in conjunction with other image processing nodes to create unique visual effects or to analyze depth information in your projects.

Z Depth Common Errors and Solutions:

Error loading EXR file with OpenEXR

  • Explanation: This error occurs when the node fails to load the EXR file, possibly due to an incorrect file path or a corrupted file.
  • Solution: Verify that the exr_path is correct and points to a valid EXR file. Ensure the file is not corrupted and is accessible from the specified location.

Expected channel 'Z.R' not found; cannot load depth image.

  • Explanation: This error indicates that the node could not find the expected depth channel in the EXR file, which is necessary for processing.
  • Solution: Check the EXR file to ensure it contains the correct depth channel, typically labeled as 'Z.R'. If the channel is missing, you may need to regenerate the EXR file with the appropriate depth information.

Z Depth Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-CoCoTools
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.