ComfyUI > Nodes > camera-comfyUI > CombineDepthsNode

ComfyUI Node: CombineDepthsNode

Class Name

CombineDepthsNode

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

CombineDepthsNode Description

Merges multiple depth maps into one using various modes for accurate depth estimation.

CombineDepthsNode:

The CombineDepthsNode is designed to merge multiple depth maps into a single cohesive depth representation. This node is particularly useful in scenarios where depth information from different sources or perspectives needs to be integrated to form a comprehensive understanding of a scene. By combining depth maps, you can achieve a more accurate and detailed depth estimation, which is crucial for applications such as 3D reconstruction, augmented reality, and computer vision tasks. The node offers various modes of combination, including averaging, source/destination overlay, soft merging with Gaussian blending, and distance-aware merging. These modes allow for flexibility in how depth maps are integrated, catering to different requirements and ensuring that the resulting depth map is both accurate and visually coherent.

CombineDepthsNode Input Parameters:

depthSRC

This parameter represents the source depth map that you want to combine with another depth map. It is a crucial input as it provides the initial depth information that will be merged. The depthSRC should be a tensor of shape [B, H, W], where B is the batch size, H is the height, and W is the width of the depth map. The accuracy and quality of this input directly affect the final combined depth map.

depthDST

The destination depth map is the second depth map that will be combined with the source depth map. Like depthSRC, it should also be a tensor of shape [B, H, W]. This parameter is essential for providing additional depth information that complements the source depth map, allowing for a more comprehensive depth representation.

maskSRC

This parameter is a mask associated with the source depth map, indicating which areas of the depth map are valid or should be considered during the combination process. It is a tensor of shape [B, H, W] and typically contains values between 0 and 1, where 1 indicates valid areas. The mask helps in selectively merging depth information, ensuring that only relevant parts of the depth map are used.

maskDST

Similar to maskSRC, this parameter is a mask for the destination depth map. It serves the same purpose of indicating valid areas within the destination depth map. The maskDST is crucial for ensuring that the combination process respects the integrity of the depth information from the destination map.

mode

The mode parameter determines the method used to combine the depth maps. It can take values such as "AVERAGE", "SRC", "DST", "SOFTMERGE", and "DISTANCE_AWARE". Each mode offers a different approach to merging the depth maps, allowing you to choose the most suitable method based on your specific needs. For example, "AVERAGE" computes the average of the depth maps, while "SOFTMERGE" uses a Gaussian blend for a smoother transition.

invert_mask

This boolean parameter indicates whether the masks should be inverted before the combination process. If set to true, the masks will be inverted, meaning areas marked as valid will be considered invalid and vice versa. This can be useful in scenarios where you want to exclude certain areas from the combination process.

softmerge_radius

This parameter is used when the "SOFTMERGE" mode is selected. It defines the radius of the Gaussian kernel used for blending the depth maps. A larger radius results in a smoother blend, while a smaller radius provides a sharper transition. The choice of radius can significantly impact the visual quality of the combined depth map.

CombineDepthsNode Output Parameters:

combined_depth

The combined_depth output is the resulting depth map after merging the source and destination depth maps. It is a tensor of shape [B, H, W, 1], where the additional dimension represents the combined depth information. This output provides a unified depth representation that can be used for further processing or visualization.

combined_m

This output is the combined mask that indicates the valid areas in the resulting depth map. It is a tensor of shape [B, H, W] and helps in understanding which parts of the combined depth map are reliable. The combined mask is essential for ensuring that subsequent processing steps only use valid depth information.

CombineDepthsNode Usage Tips:

  • When using the "SOFTMERGE" mode, experiment with different softmerge_radius values to achieve the desired level of blending between depth maps.
  • Use the invert_mask parameter to exclude specific areas from the combination process, which can be useful for focusing on particular regions of interest.

CombineDepthsNode Common Errors and Solutions:

Invalid shape for depth maps

  • Explanation: The depth maps provided do not have the expected shape [B, H, W].
  • Solution: Ensure that both depthSRC and depthDST are tensors with the correct shape before passing them to the node.

Mismatched mask and depth map dimensions

  • Explanation: The dimensions of the masks do not match those of the corresponding depth maps.
  • Solution: Verify that maskSRC and maskDST have the same dimensions as depthSRC and depthDST, respectively.

Unsupported mode value

  • Explanation: The mode parameter is set to a value that is not recognized by the node.
  • Solution: Use one of the supported mode values: "AVERAGE", "SRC", "DST", "SOFTMERGE", or "DISTANCE_AWARE".

CombineDepthsNode 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.