SHARP Predict (Depth + Gaussian Attrs)
The raw gaussian data, before anything gets saved
- model
- image
- extrinsics
- intrinsics
- mask
- metric_depth
- extrinsics_mdepth
- intrinsics_mdepth
- first_layer_depth_refined
- first_layer_gaussian_attrs
- second_layer_depth_refined
- second_layer_gaussian_attrs
- extrinsics
- intrinsics
SharpPredict runs the whole pipeline and writes a .ply in one step. This node is what you reach for when you want to get in between those steps - inspect, mask, or otherwise touch the raw Gaussians before you commit them to a file. It hands back everything SHARP produces except the actual save: depth for both layers, full per-Gaussian attribute tensors for both layers, and the camera matrices - nothing gets written to disk until you pass its output on to SharpImageAttrsToPLY yourself.
How it works
Same two-layer prediction as every other Predict node (visible front surface, hallucinated back surface), but instead of decoding straight to a saved PLY, it exposes each layer's Gaussian attributes as a MULTIBAND_IMAGE - the packed tensor format SharpImageAttrsToPLY expects (position, scale, rotation, color, opacity, all as channels).
The genuinely useful extra here is the optional mask input. Wire in a mask and any pixel under 0.5 has its Gaussian opacity zeroed on both layer outputs - which effectively removes those Gaussians from anything downstream that respects opacity, without you having to touch the tensor data by hand. It auto-resizes to SHARP's 768² Gaussian grid via nearest interpolation, so odd aspect ratios won't error, though the edges of an oddly-shaped mask can come out a little blocky. One deliberate exception: metric_depth is left unmasked even when you use this - the node's own tooltip explains that's intentional, so a downstream LSMR-based depth merge (the kind of thing AlignDepthMaps/ProjectDepthToPanorama do) still has full depth data regardless of what you filtered out of the Gaussians.
The inputs and outputs that matter
- model / image (required).
- focal_length_mm (default 30), extrinsics / intrinsics (optional, pass-through and re-emitted - typically from
SamplePanorama/SharpPanoramaCubeSplitif you're chainingAlignDepthMapsafterward). - mask (optional) - cull Gaussians below 0.5 mask value, as above.
Outputs: metric_depth (unmasked, see above), extrinsics_mdepth / intrinsics_mdepth, first_layer_depth_refined / first_layer_gaussian_attrs, second_layer_depth_refined / second_layer_gaussian_attrs, and a plain extrinsics / intrinsics pass-through.
Installing it
Manager: search "Sharp," install highest (nightly if flaky). 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
This node is not an output node - nothing gets saved until you route first_layer_gaussian_attrs or second_layer_gaussian_attrs into SharpImageAttrsToPLY. Forget that step and your graph runs cleanly, uses the GPU, produces nothing on disk, and gives you no error - it just looks like nothing happened. That's the workflow working as designed, not a bug, but it trips people who are used to SharpPredict writing a file automatically.
Beyond that, this is a young pack (December 2025), and if you're masking out background Gaussians before a panorama merge, remember the mask only touches the two gaussian-attrs outputs - if you're also relying on metric_depth for alignment further down the pipeline, it's coming through unfiltered by design.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | SHARP_MODEL_CONFIG | — | |
| image | IMAGE | — | |
| focal_length_mmopt | FLOAT | 30.00–500 | Focal length in mm (35mm equiv). 0 = 30mm. Ignored if intrinsics provided. |
| extrinsicsopt | EXTRINSICS | Pass-through (e.g. from SamplePanorama / SharpPanoramaCubeSplit). Re-emitted on the extrinsics output so downstream nodes (AlignDepthMaps) can wire them. | |
| intrinsicsopt | INTRINSICS | Pass-through. If provided, overrides focal_length_mm. Re-emitted on the intrinsics output. | |
| maskopt | MASK | Optional per-pixel mask. Pixels with mask < 0.5 have their gaussian opacity set to 0 in both layer attrs outputs — effectively dropping those gaussians from any downstream renderer / PLY exporter that respects opacity. Shape [B, H, W] or [H, W]; auto-resized to the 768² gaussian grid via nearest interpolation. The metric_depth output is left unmasked (useful for downstream LSMR-merge regardless of the gaussian filter). |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| metric_depth | IMAGE | — |
| extrinsics_mdepth | EXTRINSICS | — |
| intrinsics_mdepth | INTRINSICS | — |
| first_layer_depth_refined | IMAGE | — |
| first_layer_gaussian_attrs | MULTIBAND_IMAGE | — |
| second_layer_depth_refined | IMAGE | — |
| second_layer_gaussian_attrs | MULTIBAND_IMAGE | — |
| extrinsics | EXTRINSICS | — |
| intrinsics | INTRINSICS | — |