Depth Pro
Metric depth in meters, with the focal length handed to you
- depth_pro_model
- image
- metric_depth
- focal_list
- focal_avg
- focal_str
This is the node the whole pack exists for. Depth Pro (the node) runs Apple's Depth Pro model on your image and hands you two things at once: a metric depth map where every pixel is a real distance in meters, and an estimate of the focal length of the virtual camera that took the shot. Most depth preprocessors you've used - MiDaS, Depth Anything, ZoeDepth - give you relative depth, "this is closer than that." This one gives you numbers you can build a 3D projection from.
Why would you want that? Two jobs, mostly. The first is 3D parallax and projection work: a metric map plus a focal length is everything you need to place a virtual camera and push pixels back along the Z axis. The most famous real-world pairing is camenduru's "Depth Pro with Depth Flow" workflow, which feeds this node's output straight into parallax animation. The second job is the honest one: Depth Pro's metric output is genuinely better for downstream geometry than the soft, relative maps most ControlNet preprocessors spit out - it's one of the eight models in the community's big ComfyUI depth shootout. Just remember the oldest lesson in this corner of the ecosystem: metric depth is not what a ControlNet wants. If that's your destination, run the output through this pack's Metric Depth to Relative node first.
How it works
The model itself is a ViT-Large DINOv2 backbone wrapped in a decoder, vendored straight from Apple's ml-depth-pro repo, so there's no separate install step. Internally it resizes your image to 1536×1536, predicts depth plus a field-of-view, then derives the focal length from that FOV and rescales the depth back to your original resolution. Apple's headline claim is "less than a second" per image; on a normal consumer GPU in ComfyUI budget a few seconds per frame. Fast enough that batch animation is realistic.
It processes each frame of a batch independently, which is exactly what you want for video or multi-image runs - each frame gets its own depth and its own focal estimate, because a moving camera's lens doesn't change but its distance-to-subject does.
Inputs and outputs that matter
- depth_pro_model - the
DEPTH_PRO_MODELfrom the "(Down)Load Depth Pro model" node. Not optional. - image - any
IMAGE. Throw a whole batch at it; it loops. - focal_px (optional FLOAT) - a real focal override, in pixels. The subtle bit: any value of 1 or less is silently treated as "no override", so the model estimates from its own FOV head. If you force a focal above 1, the depth gets rescaled to match it - that's the trick for getting scale-consistent depth across frames.
Outputs:
- metric_depth (IMAGE) - raw depth in meters, duplicated to three channels so it previews like a normal image. Don't panic when it looks mostly black with blown-out whites: raw meters run from fractions to the hundreds, so it's garbage to eyeball and exactly right for math.
- focal_list (LIST) - one focal per frame.
- focal_avg (FLOAT) and focal_str (STRING) - the mean focal, as a number and a
"1234.56"-style string. Feedfocal_avginto Focal PX to MM and you get the lens focal length in millimeters for your 3D camera.
Install
ComfyUI Manager → Custom Nodes Manager → search "ComfyUI-Depth-Pro" → Install, then restart ComfyUI. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-Depth-Pro
Then restart and let Manager (or pip install -r requirements.txt) pull the two real dependencies: timm>=0.9.16 and numpy<2. The model itself auto-downloads to ComfyUI/models/depth/ml-depth-pro/ the first time you run the load node - no manual download needed.
Troubleshooting
vit_large_patch14_dinov2errors - the classic. Your timm is stale; the README says 0.9.16 and 1.0.9 are tested. Update timm and restart.- Depth preview looks wrong - expected. It's raw metric depth, not a 0–1 map. Run it through Metric Depth to Relative if you want something to look at or feed a ControlNet.
- Far objects at hundreds of meters - also expected. That's what metric depth means, and it's precisely why a plain metric map won't condition a ControlNet well.
Where people get burned: they plug metric depth straight into a depth ControlNet and wonder why it barely responds. Don't. That's the ZoeDepth lesson all over again - the conversion node exists for a reason.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| depth_pro_model | DEPTH_PRO_MODEL | — | |
| image | IMAGE | — | |
| focal_pxopt | FLOAT | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| metric_depth | IMAGE | — |
| focal_list | LIST | — |
| focal_avg | FLOAT | — |
| focal_str | STRING | — |