Orion4D Depth Anaglyph
Turn any image into real 3D with a depth map
- image
- depth_map
- anaglyph
- side_by_side
- left_view
- right_view
- processed_depth
You've got a folder of AI images and a pair of red/cyan glasses gathering dust in a drawer. Orion4D Depth Anaglyph is the node that finally puts those two together: feed it an image plus its depth map and it renders a genuine stereoscopic output - the classic anaglyph, a side-by-side pair, and isolated left/right views. It's a small, focused post-processor, and if "3D picture you can view without a headset" is a thing you want, it's the cleanest way to get there inside ComfyUI.
Where it sits in the workflow
The node does exactly one job and it's the second half of the pipeline. It doesn't estimate depth itself - you bring the depth map. The KB's depth-estimation essay calls this the stereo/VR application of depth maps: split a monocular image into left-eye and right-eye views by offsetting pixels according to how far away each region is. So the wiring is boring and reliable:
[ source image ] ──► [ Depth Anything V2 / Marigold ] ──► [ Orion4D Depth Anaglyph ]
Depth Anything V2 is the default depth source and works great; Marigold gives you cleaner maps for weird/synthetic images. Any of them work, and the node even accepts hand-edited maps. There's a reason the pack advertises compatibility rather than its own estimator - the depth half of this problem is already solved well elsewhere.
How it actually works
The math is straightforward and it's all plain PyTorch - no models, no GPU downloads. It takes your depth map, normalizes it, then applies your shaping knobs in order: depth_invert, near_clip/far_clip (remap the range), depth_contrast, depth_gamma, then depth_blur to soften harsh edges. From there it computes a per-pixel parallax shift as (depth - convergence) * strength, warps the image horizontally for each eye with grid_sample, and blends the two warped views into an anaglyph. The default optimized_dubois_red_cyan mode uses the Dubois matrix, which is the gold standard for color fidelity and ghosting - the plain red/cyan modes bleed more.
The inputs that actually matter
Three knobs get you 90% of the way:
- strength (default 24) - the 3D depth. Crank it for drama, dial it back for comfort. This is the one you'll tune constantly.
- convergence (default 0.5) - where the scene sits relative to the screen plane. Adjust it to put your main subject "on" the glass instead of floating.
- depth_invert - flip it if the relief looks backwards (near becomes far). The README's honest note: if it still looks wrong after inverting, use
swap_eyes.
Past those, depth_blur (default 3) smooths jagged depth edges that cause visual noise, anaglyph_mode switches between Dubois / color / half-color / gray in red-cyan or red-blue, and padding_mode handles what happens at image borders when the warp exposes nothing - border is the recommended pick. It outputs five things: anaglyph, side_by_side, left_view, right_view, and processed_depth, so you can grab the pair for a VR headset or stereoscope instead of the red/cyan render if you want.
Installing it
ComfyUI Manager, search Orion4D_anaglyph (or "Orion4D Depth Anaglyph"), install, restart. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/Orion4D_anaglyph
# then restart ComfyUI
Here's the rare case where the README's "no dependencies" line is actually true - I checked the source, and it imports only torch, aiohttp, and ComfyUI's own PromptServer. No model files, no extra pip packages. It also ships a small built-in preset manager (JSON + JS UI) with a few saved configs like Soft and Strong Depth Dubois, so you can save the settings you like per image type.
Where people get burned
Anaglyphs are old tech and the failure modes are all comfort-related. Eye strain? Lower strength, nudge convergence, raise depth_blur. Edge stretching at the sides? That's the inherent limit of 2D-to-3D reprojection - the warp reveals areas the camera never saw, and no node can invent them. Keep padding_mode on border, drop depth_contrast, and use a higher-precision depth map (Depth Anything V3 Large, or Marigold) if it's bad. And remember the honest constraint: this is a still-image effect. It won't do temporally stable video depth like DepthCrafter, and the occlusion gaps it exposes are yours to inpaint if they bother you. For the niche, though - one image, one render, three cheap glasses in the drawer - it does exactly what it says.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| depth_map | IMAGE | — | |
| strength | FLOAT | 24.0-256–256 | — |
| convergence | FLOAT | 0.500–1 | — |
| shift_mode | COMBO | 3 options: symmetric, left_static, right_static | |
| depth_invert | BOOLEAN | false | — |
| depth_blur | INT | 30–101 | — |
| depth_gamma | FLOAT | 1.000.1–5 | — |
| depth_contrast | FLOAT | 1.000.1–5 | — |
| near_clip | FLOAT | 0.000–1 | — |
| far_clip | FLOAT | 1.000–1 | — |
| anaglyph_mode | COMBO | 7 options: optimized_dubois_red_cyan, color_red_cyan, half_color_red_cyan, gray_red_cyan, color_red_blue, half_color_red_blue, +1 | |
| sbs_layout | COMBO | 2 options: left_right, right_left | |
| swap_eyes | BOOLEAN | false | — |
| padding_mode | COMBO | 3 options: border, reflection, zeros | |
| interpolation | COMBO | 3 options: bilinear, bicubic, nearest |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| anaglyph | IMAGE | — |
| side_by_side | IMAGE | — |
| left_view | IMAGE | — |
| right_view | IMAGE | — |
| processed_depth | IMAGE | — |