ComfyUI Node

Y7 SBS (Video)

Turn any 2D video into a side-by-side 3D clip (without it flickering to death)

By yushan777·Created about a year ago·Updated 2 months ago· 47
Y7 SBS (Video)
  • frames
  • depth_maps
  • IMAGE
methodmesh_warping
depth_scale30
mode
output_typesbs
depth_blur_strength7
temporal_smoothing0.20
batch_size32

The 30-second pitch

Y7 SBS (Video) is the sibling of the image node in the same tiny ComfyUI-Y7-SBS-2Dto3D pack. Same methods, same layouts, same dependence on depth maps you bring yourself - but running it at video framerate is where the hard stuff lives. Left to its own devices, per-frame stereo depth jitters like a dying fluorescent light, and a long clip will eat your VRAM for breakfast. This node exists to do the stereo shifting consistently and bounded, so the end result is a side-by-side 3D clip you can drop on a Quest or Vision Pro.

How it works

You feed it two IMAGE batches - frames and their matching depth_maps - and it runs the same grid_sampling / mesh_warping pixel shift as the image node on every frame. The two additions are what make it video-shaped:

  • temporal_smoothing (0.0–0.5, default 0.2) - instead of trusting each frame's depth map raw, the node keeps the previous frame's disparity around and blends with torch.lerp. Higher values = more consistent depth perception between frames, but the stereo response lags when the scene changes fast. Set it to 0 and every frame is handled independently, which will flicker if your depth maps flicker.
  • batch_size (default 32, up to 256) - how many frames it processes at once. Lower = less memory, a bit slower. Under the hood the node streams results into a numpy memmap temp file on disk rather than holding the whole clip in GPU RAM, so a thousand-frame render stays within memory. It also processes in fp16 on GPU, and resets its temporal state cleanly between runs.

Everything else is the image node's vocabulary: depth_scale (default 30, 1–100) controls pop, depth_blur_strength (default 7, odd 3–33 - even values get bumped up one) smooths depth transitions, mode flips between parallel and cross-eyed, and output_type picks sbs (side-by-side, double width), top-bottom, or anaglyph.

Output: an IMAGE batch with the same number of frames, each now a stereo pair. Critical gotcha: this is not an output node and it writes no video file. You rebuild the actual file yourself - the pack's example workflow chains VHS_LoadVideo (Video Helper Suite) → DepthAnything_V2 per frame → this node → VHS_VideoCombine to mux the final mp4. Frames in, frames out, then you close the loop.

Installing it

One install gets you both nodes in this pack: ComfyUI Manager → Custom Nodes Manager → search Y7 or Y7 SBS → install → restart. Manual:

cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/yushan777/ComfyUI-Y7-SBS-2Dto3D comfyui-y7-sbs-2dto3d
pip install -r requirements.txt

requirements.txt is just torch - no models bundled. Your real dependencies are upstream: Kijai's ComfyUI-DepthAnythingV2 (README recommends the vitl_fp16 model, ~671MB) for per-frame depth, and Video Helper Suite for loading/combining video.

Troubleshooting

  • Flickering stereo: fix your depth maps, not this node. Frame-by-frame image-model depth is inherently unstable - the depth KB's standing advice is that a video-native model like DepthCrafter removes the flicker at the cost of VRAM and resolution. temporal_smoothing dampens the symptom; it can't invent stable depth.
  • Frames and depth_maps out of sync: the node expects one depth map per frame in matching order. Resolution differences are resized automatically; count mismatches are not forgiven.
  • OOM on a long clip: drop batch_size - the memmap streaming keeps even long renders within reach.
  • No audio, no file: expected - it emits frames. Run VHS_VideoCombine and remux audio separately if you want the soundtrack.
  • Even depth_blur_strength: gets quietly incremented to an odd value, so 8 behaves like 9. Don't panic, it's normal.
CategoryY7 SBS

Inputs (9)

NameTypeDefaultDescription
framesIMAGESequence of video frames to convert to side-by-side 3D
depth_mapsIMAGESequence of depth maps corresponding to each frame
methodCOMBOmesh_warpingSelect the 3D rendering method: - mesh_warping: produces smoother, more natural depth with curved distortion - grid_sampling: faster, simpler pixel shifting for a classic stereo effect
depth_scaleINT301–100Controls the strength of the 3D effect - higher values create more pronounced depth
modeCOMBOParallel: For parallel viewing (left eye sees left image). Cross-eyed: For cross-eyed viewing (left eye sees right image)
output_typeCOMBOsbsChoose output format: - sbs: Side-by-side stereoscopic image (left/right) for 3D viewing - top-bottom: Over-under stereoscopic image (left eye on top, right eye on bottom) - anaglyph: Red-cyan anaglyph for viewing with red-cyan 3D glasses
depth_blur_strengthINT73–33Controls how much to blur the depth map transitions. Higher values create smoother depth transitions but may lose detail. 3-15. Odd values only.
temporal_smoothingFLOAT0.200–0.5Smoothing between frames (0=none, higher values=more smoothing)
batch_sizeINT321–256Number of frames to process at once. Lower values use less memory but may be slower.

Outputs (1)

NameTypeDescription
IMAGEIMAGE