Pixel Perfect Depth (Save Video Depth)
Get your depth video off the canvas and onto disk
- images
- ppd_depth
The depth-map side of this pack gives you a depth_video image batch and a raw ppd_depth payload, but neither one is a file you can show anyone. PPDVideoDepthSave is the terminal node that turns them into actual videos: an H.264 .mp4 of your source clip, an H.264 .mp4 of the depth visualization, and optionally a raw .npz of the float depth values. It's the "save" in "Pixel Perfect Depth (Save Video Depth)", and it's the simplest node in the family - no models, no inference, just encoding. Wire it after PPDVideoDepthMap, set a prefix, hit run.
How it works
The node takes three things: the original images, the ppd_depth payload (for the raw float values), and a filename_prefix (default ppd_video/PPVD). It writes into ComfyUI's output folder using folder_paths.get_save_image_path, so you get the same counter-based naming and subfolder behavior as the built-in save nodes. Video encoding is done with imageio + libx264 at CRF 18, which is a solid quality-vs-size choice - good enough that you don't need a separate re-encode pass for most purposes.
What it writes:
- Source video (
*_src.mp4) - your input frames re-encoded, handy for keeping the matched pair together. - Depth visualization (
*_vis.mp4) - the depth map rendered as a video, inferno-colormapped by default, or grayscale if you flipgrayscaleon. - Raw depths (
*_depths.npz) - the uncompressed float32 depth tensor as a compressed.npzarray. This is the file you want if you're doing anything scientific or loading depths into Blender/a game engine where the visualization colors would just be in the way. Off by default.
Inputs
images+ppd_depth- the frame batch and depth payload fromPPDVideoDepthMap. They must match; the node takes both the visual frames and the depth tensor from the payload.fps- 24 default, 1–120. Set it to your source clip's real frame rate; the encode uses it directly. If your depth video comes out at the wrong speed, this is why.save_source_video(on),save_depth_video(on) - toggle which of the two encodes you want. The depth video is the whole point; the source copy is a convenience, so turn it off if you're already saving the clip elsewhere.grayscale- off = inferno colormap, on = plain grayscale depth. The colormap looks dramatic and reads well for sharing; grayscale is what you'd feed back into a pipeline.save_npz- off by default; on when you need the raw values.debug- verbose logging, same idea as on the video-depth node. Flip it if encoding fails silently.
There are no outputs - it's an output node, and it reports the written files into the UI's files list.
Install and gotchas
Same one-pack story, nothing extra for this node itself (the video models live in the upstream PPDVideoDepthMap):
cd ComfyUI/custom_nodes
git clone https://github.com/Apache0ne/ComfyUI-pixel-perfect-depth
cd ComfyUI-pixel-perfect-depth
pip install -r requirements.txt
Restart (Manager users: search ComfyUI-pixel-perfect-depth). The video weights under ComfyUI/models/ComfyUI-pixel-perfect-depth/Video/ (model.safetensors + ppvd.pth, ~6 GB combined) are required upstream, but this save node itself runs with zero model load - it's pure post-processing, so it's instant and nearly free on VRAM.
Two practical notes. First, the fps default of 24 only makes sense if your source is 24 fps; set it to your actual frame rate or the resulting depth video runs at the wrong speed - the most common "this looks wrong" with this node. Second, because it encodes with imageio/libx264, a missing or broken ffmpeg install is the classic silent failure; if nothing appears in your output folder, check that ffmpeg is available in your environment (ComfyUI bundles one in most installs) and flip debug on to see what the encoder says. It's a boring node in the best way - feed it the payload, pick your exports, done.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| ppd_depth | PPD_DEPTH | — | |
| filename_prefix | STRING | ppd_video/PPVD | — |
| fpsopt | FLOAT | 241–120 | — |
| save_source_videoopt | BOOLEAN | true | — |
| save_depth_videoopt | BOOLEAN | true | — |
| grayscaleopt | BOOLEAN | false | — |
| save_npzopt | BOOLEAN | false | — |
| debugopt | BOOLEAN | false | — |
Outputs (0)
No outputs