ComfyUI > Nodes > ComfyUI-CoCoTools_IO > Z Normalize

ComfyUI Node: Z Normalize

Class Name

ZNormalizeNode

Category
COCO Tools/Processing
Author
Conor-Collins (Account age: 522days)
Extension
ComfyUI-CoCoTools_IO
Latest Updated
2025-05-30
Github Stars
0.04K

How to Install ComfyUI-CoCoTools_IO

Install this extension via the ComfyUI Manager by searching for ComfyUI-CoCoTools_IO
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-CoCoTools_IO 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 computer vision and AI art applications, ensuring consistent and comparable depth values.

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, typically between a minimum and maximum depth value. By normalizing these values, the node ensures that the depth information is consistent and comparable across different images or scenes. This is particularly useful in scenarios where depth data needs to be visualized or further processed, as it standardizes the data, making it easier to work with. The node also includes functionality to handle single-channel images by expanding them to three channels, which is common in RGB image processing. Overall, the ZNormalizeNode is a valuable tool for artists and developers working with depth data, providing a straightforward method to normalize and prepare images for further analysis or creative manipulation.

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 function of this parameter is to provide the raw depth data that will be processed by the node. The impact of this parameter on the node's execution is significant, as it determines the initial depth values that will be normalized. There are no specific minimum, maximum, or default values for this parameter, as it depends on the input image you provide.

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 function of this parameter is to set the starting point for the normalization process, ensuring that any depth values below this threshold are adjusted to fit within the desired range. The minimum value for this parameter is -10000.0, the maximum value is 10000.0, and the default value is 0.0. Adjusting this parameter can significantly affect the resulting normalized image, as it influences how the depth values are scaled.

max_depth

The max_depth parameter specifies the maximum depth value for normalization. It defines the upper bound of the depth range that the input image will be scaled to. The function of this parameter is to set the endpoint for the normalization process, ensuring that any depth values above this threshold are adjusted to fit within the desired range. The minimum value for this parameter is -10000.0, the maximum value is 10000.0, and the default value is 1.0. Like the min_depth parameter, adjusting this value can significantly impact the normalized image, as it determines the scaling of the depth values.

Z Normalize Output Parameters:

normalized_depth_image

The normalized_depth_image is the output parameter that provides the normalized depth image tensor. This tensor is in the same format as the input [B,H,W,C], but with depth values adjusted to fit within the specified range of 0 to 1. The importance of this output lies in its standardized depth values, which are now consistent and comparable across different images or scenes. This makes it easier to visualize, analyze, or further process the depth data in various applications. The output is particularly useful for AI artists and developers who need to work with depth information in a normalized and consistent manner.

Z Normalize Usage Tips:

  • Ensure that the input image tensor is in the correct format [B,H,W,C] to avoid errors during processing.
  • Adjust the min_depth and max_depth parameters to match the expected range of your depth data for optimal normalization results.
  • If working with single-channel depth images, the node will automatically expand them to three channels, making them compatible with RGB processing workflows.

Z Normalize Common Errors and Solutions:

Error normalizing depth image: <error_message>

  • Explanation: This error occurs when there is an issue during the normalization process, possibly due to incorrect input format or invalid parameter values.
  • Solution: Verify that the input image tensor is in the correct format [B,H,W,C] and that the min_depth and max_depth parameters are set within the valid range. Double-check the input data for any anomalies that might cause the error.

Z Normalize Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-CoCoTools_IO
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.