SHARP Refined Depth from Gaussians
Render a saved PLY back into depth maps
- extrinsics
- intrinsics
- depth_maps
- valid_mask
- extrinsics
- intrinsics
Once you've generated Gaussians - from SharpPredict or the panorama pipeline - this node lets you go back the other direction: render depth maps from the saved point cloud, using whichever camera views you specify. It's the "check your work" step. Splat the Gaussians through a camera and see what depth comes back out; compare that against what you started with, or use it as a refined depth source for a further pass.
How it works
It reads ply_path, which can be either a single .ply (for a batch size of 1) or a folder containing one .ply per face for a batch - and the node's own tooltip is explicit that the folder's file count has to match the number of cameras in extrinsics. From there it rasterizes each camera's view through the Gaussian scene and produces a depth map plus a validity mask marking which pixels actually had a Gaussian land on them, at a configurable output resolution.
The inputs and outputs that matter
- ply_path (required, STRING) - from
SharpPredict,SharpPredictForeground,SharpImageAttrsToPLY, orSharpPredictGaussiansFromMetricDepth. - extrinsics (required) -
[N, 4, 4]world-to-camera matrices, typically the same ones you originally used to generate the Gaussians (fromSamplePanoramaorSharpPanoramaCubeSplit), so the re-rendered depth is a meaningful comparison. - intrinsics (required) -
[N, 3, 3]or[N, 4, 4]pixel-space; only the 3×3 K matrix is used, any extra row or column is ignored. - out_size (default 1536, range 256–2048) - output resolution per face, matching SHARP's native working resolution by default.
Outputs: depth_maps (the re-rendered result), valid_mask (MASK - where a Gaussian actually covered that pixel), extrinsics / intrinsics (pass-through).
Installing it
Manager: search "Sharp," install highest (nightly if that build misbehaves). Or Manager → Git URL: https://github.com/PozzettiAndrea/ComfyUI-Sharp.git. Manual: clone, pip install -r requirements.txt --upgrade, python install.py, restart.
Common issues
The one hard requirement is documented directly in the node's tooltip: if ply_path points at a folder, the number of .ply files in it must match the batch size (N) of extrinsics, or the run breaks. Keep your PLY folder and your camera batch built together, from the same generation pass.
valid_mask gaps aren't necessarily a bug - they mark real holes in your Gaussian coverage: angles the original photo(s) genuinely never captured, so there's nothing there to render. That's expected, and it's exactly the kind of thing this node is useful for catching before you commit further downstream - if the mask shows large gaps where you expected solid coverage, that's a sign your original capture (or panorama overlap) missed something, not that this node did anything wrong. And as with everything else in the render-back-and-compare part of this pack, keep the camera set consistent - comparing depth re-rendered from a different set of views than you generated with won't tell you much about how good the reconstruction actually is.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| ply_path | STRING | From SharpPredict.ply_path. Single .ply (for batch_size=1) OR a folder with one .ply per face (for batch). Folder file count must match extrinsics N. | |
| extrinsics | EXTRINSICS | [N, 4, 4] world-to-camera per face. Same matrix you passed to SharpPredict — typically from SamplePanorama or SharpPanoramaCubeSplit. | |
| intrinsics | INTRINSICS | [N, 3, 3] (or [N, 4, 4]) pixel-space intrinsics per face. The 3x3 K is used; any extra row/col is ignored. | |
| out_size | INT | 1536256–2048 | Output depth-map resolution per face (square). 1536 matches SHARP's internal resolution. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| depth_maps | IMAGE | — |
| valid_mask | MASK | — |
| extrinsics | EXTRINSICS | — |
| intrinsics | INTRINSICS | — |