Nodes/RightEyeDisparity/Right Eye Image Node
ComfyUI Node

Right Eye Image Node

Make a flat photo pop in 3D — the right eye, generated locally

By KAVVATARE·Created about a year ago·Updated about a year ago· 3
Right Eye Image Node
  • image
  • depth_map
  • right_eye_image
  • modified_depthmap_right
  • right_no_fill_mask
fill_techniqueFill - Polylines Soft
divergence3.50
separation0.00
stereo_balance0.00
stereo_offset_exponent2
depth_blur_sigma0.0
depth_blur_edge_threshold40.0

VR headsets are cheap now, and 3D content is still scarce. This node is the other half of that equation: feed it a left-eye image plus a depth map, and it produces the matching right-eye image - no model download, no API key, no training run. It's pure image math, and it's surprisingly effective.

This is the still-image variant from the RightEyeDisparity pack, which also ships a video version (VideoRightEyeNode) that does the exact same thing across a batch of frames. If you only want to convert a handful of photos or a single frame, start here - it's the friendlier one to debug because you can actually eyeball the result.

What it actually does

The mechanism isn't AI at all. The node takes your depth map (white = near, black = far) and reprojects the left image's pixels horizontally, pushing them toward the right-eye position. More depth = bigger shift. That's why the pack needs zero model files - the "intelligence" is entirely in the depth map you hand it, which you generate upstream with MiDaS, Depth Anything, or anything else that outputs a grayscale distance map.

Under the hood it calls create_stereoimages() from ComfyStereo, which itself traces back to the old A1111 depthmap script. Proven code, and the pack's README is upfront about the debt.

There's a catch worth knowing before you even install: when you shift perspective to the right eye, you reveal background that was hidden behind foreground objects, and there's no pixel data there. Those gaps are the whole game.

Inputs and outputs that matter

Three required, three you'll actually touch:

  • image - your left-eye image.
  • depth_map - matching depth map. Same resolution ideally; the node resizes it if not.
  • fill_technique - how to patch the gaps revealed by the shift. Default is "Fill - Polylines Soft", and the README recommends keeping it there. The other nine options (Naive, Hybrid Edge, Reverse projection, etc.) are different ways of guessing what goes in the holes.

The optional sliders: divergence (default 3.5, range 0.05–15) is the 3D strength - higher means a stronger pop and bigger gaps to fill. separation shifts the whole view horizontally. stereo_balance tilts the effect toward one eye. depth_blur_sigma and depth_blur_edge_threshold blur the depth map at edges, which smooths the most obvious artifacts. Leave all of them alone on the first pass.

Three outputs:

  • right_eye_image - the result. Wire it into a Save Image or a side-by-side compositor with the original.
  • modified_depthmap_right - the depth map after blurring; useful if you're chaining this into other nodes.
  • right_no_fill_mask - the interesting one. It's a mask of the empty gap regions before filling. The community's favorite trick is to take this mask and route the result through an inpainting pass to genuinely invent the missing background instead of letting the fill guess. That's the difference between "decent parallax" and "wait, that's actually 3D."

Installing it

ComfyUI Manager (search "RightEyeDisparity") is the easy path. Otherwise:

cd ComfyUI/custom_nodes
git clone https://github.com/KAVVATARE/ComfyUI_RightEyeDisparity.git
cd ComfyUI_RightEyeDisparity
pip install -r requirements.txt

Restart ComfyUI. The dependency list is torch, numpy, Pillow, opencv-python, numba, and scipy. Numba is the heavy one and the most likely install headache; if it fails to import, the code prints a warning and falls back to plain Python - slower, but it still works. No model files to download, ever.

Common issues

  • Unnatural, cardboard-looking depth: divergence is too high or the depth map is sloppy. Drop divergence into the 2–5 band the README suggests and regenerate a cleaner depth map.
  • Out of memory: the node is efficient for what it is, but a full-res batch still adds up. Run it on the left frame at working resolution, then upscale the pair afterward.
  • Gaps that look smeared: that's the fill guessing wrong. Inpaint the masked regions instead, or try one of the other fill techniques - "Reverse projection with Post-fill" handles some edge cases better than the default.

It's a one-trick pack, but the trick is genuinely useful if you're building VR content from flat images. Give it a decent depth map, keep divergence modest, and remember the mask output exists for a reason.

Categorysd

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
depth_mapIMAGE
fill_techniqueCOMBOFill - Polylines Soft10 options: No fill, No fill - Reverse projection, Imperfect fill - Hybrid Edge, Fill - Naive, Fill - Naive interpolating, Fill - Polylines Soft, +4
divergenceoptFLOAT3.500.05–15
separationoptFLOAT0.00-5–5
stereo_balanceoptFLOAT0.00-0.95–0.95
stereo_offset_exponentoptFLOAT21–2
depth_blur_sigmaoptFLOAT0.00–10
depth_blur_edge_thresholdoptFLOAT40.00.1–100

Outputs (3)

NameTypeDescription
right_eye_imageIMAGE
modified_depthmap_rightIMAGE
right_no_fill_maskMASK