ComfyUI Node

Preview Gaussian

See your gaussians without leaving the graph

By yichengup·Created 9 months ago·Updated 9 months ago· 15
Preview Gaussian
  • gaussians
  • extrinsics
  • intrinsics
  • video_path
  • save_ply_path
ply_path
preview_width512

See your gaussians without leaving the graph

ComfyUI finally does 3D. Apple's SHARP model, wrapped up as ComfyUI-Sharp, turns a single photo into a gaussian splatting point cloud in under a second, and the community has rightly latched onto it - it's the closest thing to "make this image 3D" the ecosystem has. The awkward part is what you do with the result. A GAUSSIANS_3D object lives in memory, a .ply file sits on disk, but neither shows you anything until you drag it into some external viewer.

Preview Gaussian fixes that. It's an interactive gsplat.js 3D viewer that lives right inside the node. Feed it a PLY path or a gaussians object, run the graph, and you get an orbitable, zoomable view of the splat in the ComfyUI UI. And it records: point the camera somewhere nice, hit Start Record, and it writes an MP4 to ComfyUI's output folder. That's the whole pitch, and it's a genuinely useful one.

It comes from a small pack, ComfyUI-gaussian_preview, which is a focused extraction of the preview feature from ComfyUI-GeometryPack with recording bolted on. Everything renders in your browser through the bundled gsplat.js bundle - WebGL in an iframe, no Python-side rendering, no VRAM cost from the preview itself.

How it works

The node hands the PLY file to an iframe that loads a bundled gsplat.js viewer. The viewer fetches the file, loads it with PLYLoader, and draws it in WebGL. The nice bit is camera setup: if you feed it the 4x4 extrinsics and 3x3 intrinsics that SHARP Predict produces, it reconstructs the original camera - correct initial view, correct focal length and FOV - instead of dumping you at a default angle where the subject is a speck.

Recording uses canvas.captureStream(30) plus the MediaRecorder API, trying H.264 MP4 mime types first. The recorded blob gets shipped back to the node, which writes it to ComfyUI's output directory as gaussian-recording-*.mp4.

The inputs that matter

  • ply_path (STRING) - path to any gaussian splatting PLY. Wire it from a string node, or skip it and feed gaussians instead.
  • gaussians (GAUSSIANS_3D) - straight from SHARP Predict. If you pass this, the node converts it to a PLY first, which is why ComfyUI-Sharp needs to be installed.
  • extrinsics / intrinsics - optional, but they give the preview a correct initial view. Skip them and you'll be orbiting blindly to find your subject.
  • preview_width (INT, 256–4096, default 512) - the one you'll actually touch. It sizes the node window and directly sets recording resolution, so 512 is fine for a quick look and 1920+ is what you want before hitting record.

Two outputs: video_path (STRING) - path to the latest recorded MP4 - and save_ply_path (STRING) - the PLY file the node used or wrote.

Where people get burned

  • video_path is empty until you record. The node just scans the output folder for the newest gaussian-recording-*.mp4. Nothing recorded, empty string. If a downstream node feeds on that, it gets a blank path - wire the video output only after you've recorded, or handle the empty string yourself.
  • Recording needs the right browser. MediaRecorder with H.264 MP4 support. Chrome, Firefox, Edge and Safari work; if no MP4 mime type is supported, the recorder bails.
  • Feeding a gaussians object requires ComfyUI-Sharp. The conversion imports sharp.utils.gaussians.save_ply from your sibling ComfyUI-Sharp folder. Not installed, and you get an import error in the console and an empty result. Passing a plain ply_path avoids this entirely.
  • Big previews cost you. Above 1920px wide the browser render starts to chug, and long recordings eat memory. Keep preview_width modest for casual inspection.

Install

Easiest via ComfyUI Manager: search "ComfyUI-gaussian_preview" and hit install, or clone it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-gaussian_preview

Then restart ComfyUI. No pip dependencies, no model downloads - the gsplat.js viewer ships in the repo. The only thing you need alongside it is ComfyUI-Sharp, and only if you want to preview GAUSSIANS_3D objects straight from SHARP Predict. Previewing an existing .ply needs nothing but the pack itself.

Categorygaussian_preview

Inputs (5)

NameTypeDefaultDescription
ply_pathoptSTRINGPath to a Gaussian Splatting PLY file (alternative to gaussians input)
gaussiansoptGAUSSIANS_3DGaussians3D object from SHARP Predict (alternative to ply_path input)
extrinsicsoptEXTRINSICS4x4 camera extrinsics matrix for initial view
intrinsicsoptINTRINSICS3x3 camera intrinsics matrix for FOV
preview_widthoptINT512256–4096Preview window width in pixels (affects recording resolution)

Outputs (2)

NameTypeDescription
video_pathSTRING
save_ply_pathSTRING