Anaglyph for ComfyUI

่ฉณ็ดฐ

ใƒ•ใ‚กใ‚คใƒซใ‚’ใƒ€ใ‚ฆใƒณใƒญใƒผใƒ‰ (1)

ใƒขใƒ‡ใƒซ่ชฌๆ˜Ž

https://github.com/orion4d/Orion4D_anaglyph

๐ŸŽญ Orion4D Anaglyph for ComfyUI

Orion4D Anaglyph Workflow

Orion4D Anaglyph is a high-performance custom node designed to transform 2D images into stereoscopic (3D) renders via a depth map. It offers total control over parallax, convergence, and depth processing to ensure optimal visual comfort.


๐Ÿš€ Key Features

  • Total Compatibility: Works seamlessly with Depth Anything (V2/V3), Marigold, ZoeDepth, MiDaS, or even hand-edited maps.

  • Various Rendering Modes: Supports Red/Cyan (Dubois, Color, Gray) and Red/Blue modes.

  • Multiple Outputs: Generates the final anaglyph, Side-by-Side (SBS) format, isolated left/right views, and the processed depth map.

  • Preset Manager: Integrated JS interface to save, load, and update your favorite settings on the fly.

  • Native Processing: Optimized PyTorch implementation for maximum speed and cross-platform compatibility.


๐Ÿ›  Installation

Copy the Orion4D_anaglyph folder into your custom nodes directory:

ComfyUI/custom_nodes/Orion4D_anaglyph

Requirements

No additional Python dependencies are required beyond a standard ComfyUI installation.

This custom node uses only modules already available in ComfyUI:

  • torch

  • aiohttp

  • ComfyUI PromptServer

  • Python standard library modules

Folder Structure

Orion4D_anaglyph/
โ”œโ”€โ”€ orion4d_anaglyph.py    # Core logic
โ”œโ”€โ”€ preset_manager.py      # JSON management
โ”œโ”€โ”€ web/                   # User Interface (JS)
โ””โ”€โ”€ presets/               # Your saved configurations

โš™๏ธ Configuration Parameters

ParameterDescriptionRecommended Valuestrength3D effect intensity (parallax).16 to 32convergenceFocal point where the image appears to sit on the screen plane.0.5shift_modeOffset method (symmetric, left_static, right_static).symmetricdepth_blurSmoothes edges to reduce visual artifacts.5 to 9depth_invertInverts depth if the relief appears backwards.Per source


๐Ÿ”„ Workflow

  • Drag and drop orion4d_anaglyph_workflow.png onto the comfy canvas

  • The node is best placed immediately after a depth estimator:


๐ŸŽจ Available Anaglyph Modes

  • Optimized Dubois (Red/Cyan): The gold standard for color fidelity and ghosting reduction.

  • Color / Half-Color: Preserves more of the original vibrancy at the cost of potential color fringing.

  • Gray: Ideal for maximum depth clarity without chromatic distraction.


๐Ÿ†˜ Troubleshooting & Tips

๐Ÿ‘๏ธ Eye Strain?

  • Reduce the strength value.

  • Adjust convergence to place the main subject on the screen plane.

  • Increase depth_blur.

๐Ÿ”€ Inverted 3D Effect?

  1. Enable depth_invert.

  2. If the issue persists, use the swap_eyes option.

๐Ÿ–ผ๏ธ Edge Stretching (Warping)

This is a standard limitation of 2D-to-3D reprojection. To minimize it:

  • Use padding_mode: border.

  • Reduce depth_contrast.

  • Use a higher-precision depth map (e.g., Depth Anything V3 Large).


๐ŸŒŸ Support the Project

If you find this tool useful, feel free to leave a โญ on GitHub!

Developed with โค๏ธ for the ComfyUI community by Orion4D

Buy Me A Coffee


ใ“ใฎใƒขใƒ‡ใƒซใง็”Ÿๆˆใ•ใ‚ŒใŸ็”ปๅƒ