SHARP Predict Metric Depth
Real-world scale depth, both layers, plus raw points
- model
- image
- extrinsics
- intrinsics
- layer_0_metric_depth
- layer_1_metric_depth
- extrinsics_mdepth
- intrinsics_mdepth
- layer_0_points_raw
- layer_1_points_raw
The depth-estimation world has a well-worn distinction: relative depth (which things are nearer than which, no units attached) versus metric depth (actual distances in real-world units). For most creative work - ControlNet conditioning, a quick depth preview - relative is what you want, because forcing a model to nail real-world scale tends to soften the edges that make depth useful for conditioning in the first place. But metric depth earns its keep the moment something downstream actually needs distances: measurement, alignment across multiple views, or reconstructing geometry that has to agree with itself in physical units. That's exactly this node's job in the SHARP pack - it's the metric export, and it's the node the panorama-alignment pipeline (AlignDepthMaps, SharpPredictGaussiansFromMetricDepth) is built to consume.
How it works
Like every Predict node, SHARP produces two surface layers per pixel - a visible front and a hallucinated back/occluded surface. This node exposes both explicitly in metric units, and goes one step further than SharpPredictDepth: alongside the two depth maps, it also outputs the raw back-projected 3D points for each layer, before they've been turned into Gaussians. If you want to hand SHARP's geometry to something other than its own Gaussian decoder - a custom mesh pipeline, your own alignment code - this is the node that gives you the material to do it with.
The inputs and outputs that matter
- model / image (required).
- focal_length_mm (default 30) - ignored if
intrinsicsis supplied. - extrinsics (optional, pass-through to
extrinsics_mdepth). - intrinsics (optional) - overrides
focal_length_mm, and comes back out onintrinsics_mdepthrescaled to SHARP's internal 1536² working resolution. That rescale matters: if you're matching this depth against images or masks at a different resolution downstream, use the re-emittedintrinsics_mdepth, not whatever intrinsics you originally passed in, or things will misalign.
Outputs: layer_0_metric_depth / layer_1_metric_depth (the two-surface split, in real-world units), extrinsics_mdepth / intrinsics_mdepth (pass-through, with the intrinsics rescale noted above), and layer_0_points_raw / layer_1_points_raw - the actual 3D points before Gaussian decoding.
Installing it
Manager: search "Sharp," install highest (nightly if that build is flaky). Or Install via Git URL: https://github.com/PozzettiAndrea/ComfyUI-Sharp.git. Manual: clone into custom_nodes, pip install -r requirements.txt --upgrade, python install.py, restart. Model auto-downloads on first run.
Common issues
The intrinsics rescale is the thing that bites people who haven't hit it before: wire your original intrinsics into a downstream node that expects the 1536²-scaled version, and depth will land in the wrong place relative to your image even though nothing looks obviously broken at first glance. Use intrinsics_mdepth, always, once you're past this node.
Everything else here is the pack's usual baseline: this is a young pack (first released December 2025), 8GB VRAM cards have reported OOMs or the server silently hanging, and if you're chaining this into the panorama pipeline, keep your camera matrices consistent end to end - SharpRayToPlanarDepth and SharpPredictGaussiansFromMetricDepth both care deeply about which depth convention and which intrinsics you're actually passing.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | SHARP_MODEL_CONFIG | — | |
| image | IMAGE | — | |
| focal_length_mmopt | FLOAT | 30.00–500 | Focal length in mm (35mm equiv). Ignored if intrinsics provided. |
| extrinsicsopt | EXTRINSICS | Pass-through to extrinsics_mdepth output. | |
| intrinsicsopt | INTRINSICS | If provided, overrides focal_length_mm. Re-emitted on intrinsics_mdepth rescaled to 1536². |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| layer_0_metric_depth | IMAGE | — |
| layer_1_metric_depth | IMAGE | — |
| extrinsics_mdepth | EXTRINSICS | — |
| intrinsics_mdepth | INTRINSICS | — |
| layer_0_points_raw | IMAGE | — |
| layer_1_points_raw | IMAGE | — |