Two simple nodes for stereoscopic image generation. Nodes: Stereo Image Node - a basic port from the Automatic1111 stereo script in thygate/stable-diffusion-webui-depthmap-script, LazyStereo - a naïve stereo image generator
A port of the stereoscopic script used in thygate/stable-diffusion-webui-depthmap-script Most of the credit goes to them, and most of the rest to some LLMs.
https://github.com/user-attachments/assets/b76e6243-557b-454b-9baa-1aac2a7eb22a
Added some new functionality such as edge and direction aware blur of the depth map. I've also managed to add some additional interpolation and stereo distortion methods. By 'I', I mean I tortured ChatGPT for hours.
To activate the adaptive blurring, set 'depth_blur_sigma' (the amount of blur applied) to a value greater than 0.
The mask output is imperfect and only provides useful output for the 'No fill' options.
| Method | Description | |------------------------|-------------| | 'No fill' | Simple depth shift with no gap filling. | | 'No fill - Reverse projection' | Works backward to assign pixel values but leaves gaps. | | 'Imperfect fill - Hybrid Edge' | Mixes 'Polylines' and 'Reverse projection' for better results. | | 'Fill - Naive' | Fills gaps with nearest pixel, causing stretching. | | 'Fill - Naive interpolating' | Uses interpolation to smooth out gaps. | | 'Fill - Polylines Soft' | Uses polylines with soft edges to maintain structure. | | 'Fill - Polylines Sharp' | Like 'soft' but with sharper transitions. | | 'Fill - Post-fill' | 'No fill' with edge-aware interpolation and blending. | | 'Fill - Reverse projection with Post-fill' | 'Reverse projection' with directional interpolation and blurring. | | 'Fill - Hybrid Edge with fill' | Enhanced version of 'Hybrid Edge' with adaptive smoothing. |
'No fill'
'No fill - Reverse projection'
'Imperfect fill - Hybrid Edge'
'Fill - Naive'
'Fill - Naive interpolating'
'Fill - Polylines Soft'
'Fill - Polylines Sharp'
'Fill - Post-fill'
'Fill - Reverse projection with Post-fill'
'Fill - Hybrid Edge with fill'
Use ComfyUI-Manager
To install the these nodes, clone this repository and add it to custom_nodes folder in your ComfyUI nodes directory:
git clone https://github.com/Dobidop/ComfyStereo.git
pip install -r requirements.txt
Image
Video