ComfyUI > Nodes > ComfyUI-CoCoTools > Z Normalize

ComfyUI Node: Z Normalize

Class Name

ZNormalizeNode

Category
COCO Tools/Processing
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 Normalize Description

Depth image normalization for enhanced depth perception and consistency in computer vision and AI art applications.

Z Normalize:

The ZNormalizeNode is designed to process and normalize depth images, which are often used in computer vision and AI art applications to represent the distance of surfaces from a viewpoint. This node takes an input image tensor and adjusts its depth values to fit within a specified range, effectively enhancing the image's depth perception. By normalizing the depth values, the node ensures that the image data is consistent and suitable for further processing or visualization. This normalization process is crucial for maintaining the integrity of depth information, especially when combining or comparing images from different sources. The node's ability to handle depth images makes it a valuable tool for artists and developers working with 3D data or depth-based effects.

Z Normalize Input Parameters:

image

The image parameter is the input tensor representing the depth image that you want to normalize. This tensor should be in the format [B,H,W,C], where B is the batch size, H is the height, W is the width, and C is the number of channels. The image parameter is crucial as it provides the raw depth data that will be processed by the node.

min_depth

The min_depth parameter specifies the minimum depth value for normalization. It defines the lower bound of the depth range that the input image will be scaled to. The default value is 0.0, with a minimum of -10000.0 and a maximum of 10000.0. Adjusting this parameter allows you to control the starting point of the normalized depth range, which can be useful for emphasizing certain depth features in the image.

max_depth

The max_depth parameter sets the maximum depth value for normalization, establishing the upper bound of the depth range for the input image. The default value is 1.0, with a minimum of -10000.0 and a maximum of 10000.0. This parameter is essential for defining the endpoint of the normalized depth range, enabling you to highlight specific depth details by expanding or contracting the range.

Z Normalize Output Parameters:

normalized_depth_image

The normalized_depth_image is the output tensor that results from the normalization process. It retains the original format [B,H,W,C] and contains depth values that have been scaled to fit within the specified range of 0 to 1. This output is crucial for ensuring that the depth information is consistent and ready for further processing or visualization. The normalization process also includes a step to repeat single-channel images across RGB channels, ensuring compatibility with various image processing tools.

Z Normalize Usage Tips:

  • Ensure that the input image tensor is correctly formatted in [B,H,W,C] to avoid errors during processing.
  • Adjust the min_depth and max_depth parameters to focus on specific depth ranges, which can enhance the visibility of certain features in the depth image.
  • Use the node in conjunction with other image processing nodes to create complex visual effects or to prepare depth data for machine learning models.

Z Normalize Common Errors and Solutions:

Error normalizing depth image: <error_message>

  • Explanation: This error occurs when there is an issue with the input image tensor, such as incorrect formatting or incompatible data types.
  • Solution: Verify that the input image tensor is in the correct format [B,H,W,C] and that the data types are compatible with the node's requirements. Additionally, ensure that the min_depth and max_depth values are set within the acceptable range.

Z Normalize 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.