ComfyUI > Nodes > ComfyUI-SAM3DObjects > SAM3D Depth Estimate

ComfyUI Node: SAM3D Depth Estimate

Class Name

SAM3D_DepthEstimate

Category
SAM3DObjects
Author
PozzettiAndrea (Account age: 0days)
Extension
ComfyUI-SAM3DObjects
Latest Updated
2026-03-21
Github Stars
0.17K

How to Install ComfyUI-SAM3DObjects

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

SAM3D Depth Estimate Description

SAM3D_DepthEstimate generates depth maps from RGB images, optimizing VRAM and outputting 3D data.

SAM3D Depth Estimate:

The SAM3D_DepthEstimate node is designed to perform depth estimation using the MoGe model, which is a specialized tool for generating depth maps from RGB images. This node operates independently from the sparse structure generation process, allowing it to unload the depth model after execution, which is particularly beneficial for users with memory-constrained GPUs. By estimating depth separately, it optimizes VRAM usage and enhances performance efficiency. The node outputs a 3D point cloud, camera intrinsics, and a depth visualization mask, which are essential for further 3D processing and visualization tasks. This functionality is crucial for AI artists and developers who need to integrate depth information into their 3D modeling and rendering workflows, providing a seamless bridge between 2D images and 3D representations.

SAM3D Depth Estimate Input Parameters:

depth_model

The depth_model parameter specifies the depth estimation model to be used, which is loaded from the LoadSAM3DModel. This model is crucial as it determines the accuracy and quality of the depth estimation process. The choice of model can significantly impact the results, with different models offering varying levels of detail and performance. There are no explicit minimum, maximum, or default values provided, but selecting a model that aligns with your specific requirements and computational resources is essential for optimal results.

image

The image parameter is the input RGB image on which depth estimation will be performed. This image should be in a compatible format and resolution to ensure accurate depth mapping. The quality and characteristics of the input image, such as lighting and texture, can affect the depth estimation outcome. There are no specific constraints on the image size, but higher resolution images may provide more detailed depth maps at the cost of increased computational load.

SAM3D Depth Estimate Output Parameters:

intrinsics

The intrinsics output provides the camera intrinsics matrix, which is a 3x3 matrix essential for understanding the camera's internal parameters. This matrix is crucial for accurately interpreting the 3D point cloud and aligning it with the original image, enabling precise 3D reconstructions and transformations.

pointmap

The pointmap output is a tensor representing the 3D point cloud in an HxWx3 format. This point cloud is a spatial representation of the depth information extracted from the input image, and it can be used for various 3D processing tasks, such as generating 3D models or visualizations. The pointmap is a key component for further 3D analysis and integration into other systems.

pointcloud_ply

The pointcloud_ply output is a string that provides the path to a PLY file containing the point cloud data. This file format is widely used for storing 3D data and can be easily imported into various 3D modeling and visualization software, allowing users to view and manipulate the depth information in a 3D environment.

depth_mask

The depth_mask output is a depth visualization mask, normalized between 0 and 1. This mask provides a visual representation of the depth information, highlighting the relative distances of objects within the image. It is useful for quickly assessing the depth estimation results and can be used in conjunction with other visualization tools to enhance the understanding of the 3D scene.

SAM3D Depth Estimate Usage Tips:

  • Ensure that the input image is of high quality and appropriate resolution to achieve the best depth estimation results.
  • Choose a depth model that aligns with your specific needs and computational resources to optimize performance and accuracy.
  • Utilize the intrinsics output to accurately align the 3D point cloud with the original image for precise 3D reconstructions.
  • Use the pointcloud_ply output to import the point cloud into 3D modeling software for further analysis and visualization.

SAM3D Depth Estimate Common Errors and Solutions:

MoGe dtype changed

  • Explanation: This error occurs when there is a change in the data type of the MoGe model, which requires reloading the model.
  • Solution: Ensure that the data type remains consistent across executions, or allow the node to reload the model when a change is detected.

Model not loaded

  • Explanation: This error indicates that the MoGe model has not been successfully loaded, possibly due to incorrect file paths or missing files.
  • Solution: Verify that the model file path is correct and that the necessary files are present in the specified directory.

Invalid image format

  • Explanation: This error occurs when the input image is not in a compatible format or resolution for depth estimation.
  • Solution: Ensure that the input image is in a supported format (e.g., RGB) and of appropriate resolution for the model being used.

SAM3D Depth Estimate Related Nodes

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