ComfyUI > Nodes > camera-comfyUI > DepthRenormalizer

ComfyUI Node: DepthRenormalizer

Class Name

DepthRenormalizer

Category
Camera/Depth
Author
Alexankharin (Account age: 2779days)
Extension
camera-comfyUI
Latest Updated
2025-12-26
Github Stars
0.03K

How to Install camera-comfyUI

Install this extension via the ComfyUI Manager by searching for camera-comfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter camera-comfyUI 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

DepthRenormalizer Description

Adjusts and standardizes depth data for consistent range, aiding in 3D tasks and visualization.

DepthRenormalizer:

The DepthRenormalizer node is designed to adjust and standardize depth data, ensuring that it is within a consistent and usable range for further processing or visualization. This node is particularly useful in scenarios where depth data may vary significantly due to different capture conditions or sensor inaccuracies. By renormalizing the depth values, it helps in maintaining uniformity across datasets, which is crucial for tasks such as 3D reconstruction, augmented reality, or any application that relies on accurate depth perception. The node achieves this by applying a normalization process that scales the depth values to a specified range, often between 0 and 1, making it easier to integrate with other systems or algorithms that require standardized input.

DepthRenormalizer Input Parameters:

depth_map

The depth_map parameter represents the input depth data that needs to be renormalized. This data is typically a 2D or 3D array where each value corresponds to a depth measurement at a specific point in the scene. The accuracy and range of this data can significantly impact the effectiveness of the renormalization process. There are no specific minimum or maximum values for this parameter, as it depends on the source of the depth data. However, it is crucial that the data is pre-processed to remove any invalid or extreme values that could skew the normalization process.

depth_mask

The depth_mask parameter is a binary mask that indicates which areas of the depth_map should be considered for renormalization. Values in the mask are typically 0 or 1, where 1 indicates that the corresponding depth value should be included in the normalization process. This parameter is essential for excluding areas with unreliable or irrelevant depth data, ensuring that the renormalization focuses only on valid measurements. The mask should be the same size as the depth_map to ensure proper alignment.

guidance_mask

The guidance_mask parameter serves as an auxiliary input that can guide the renormalization process. Similar to the depth_mask, it is a binary mask that highlights areas of interest or importance within the depth_map. This can be used to prioritize certain regions during normalization, ensuring that critical areas are accurately represented in the final output. The guidance mask should also match the dimensions of the depth_map.

use_inverse

The use_inverse parameter is a boolean flag that determines whether the inverse of the depth values should be used during renormalization. When set to true, the node will compute the inverse of each depth value before applying the normalization process. This can be useful in scenarios where the depth data is represented in a format where smaller values indicate greater depth, such as in certain types of depth sensors. The default value is typically false, meaning the node will use the original depth values unless specified otherwise.

DepthRenormalizer Output Parameters:

norm_depth

The norm_depth parameter is the primary output of the DepthRenormalizer node, representing the renormalized depth data. This output is a 2D or 3D array with the same dimensions as the input depth_map, but with values scaled to a consistent range, typically between 0 and 1. The renormalized depth data is crucial for ensuring compatibility with other systems or algorithms that require standardized input, and it can significantly enhance the accuracy and reliability of subsequent processing steps.

DepthRenormalizer Usage Tips:

  • Ensure that the depth_map is pre-processed to remove any invalid or extreme values that could affect the renormalization process.
  • Use the depth_mask to exclude areas with unreliable depth data, focusing the renormalization on valid measurements.
  • Consider using the guidance_mask to prioritize critical regions within the depth_map, ensuring accurate representation in the final output.
  • If your depth data is represented in a format where smaller values indicate greater depth, set the use_inverse parameter to true for accurate renormalization.

DepthRenormalizer Common Errors and Solutions:

ValueError: Expected ds to be 3D [T, H, W], got shape {ds.shape}

  • Explanation: This error occurs when the input depth_map does not have the expected dimensions, which should be a 3D array.
  • Solution: Ensure that your input depth_map is correctly formatted as a 3D array. If it is a 2D array, you may need to add an additional dimension to match the expected format.

Warning: No valid depth values for normalization.

  • Explanation: This warning indicates that the depth_mask does not contain any valid areas for renormalization, possibly due to all values being zero.
  • Solution: Check the depth_mask to ensure it correctly highlights the valid areas of the depth_map. Adjust the mask to include relevant regions for normalization.

DepthRenormalizer Related Nodes

Go back to the extension to check out more related nodes.
camera-comfyUI
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 Models, enabling artists to harness the latest AI tools to create incredible art.

DepthRenormalizer