DeepStereo: Random Dot Stereogram
Random dots plus depth, no texture required
- depth_map
- rds_stereogram
The original Magic Eye images weren't textured - they were random dots. When you defocus and your eyes lock, a hidden 3D shape resolves out of what looks like TV static. This node does exactly that: a random-dot stereogram (RDS), built straight from a depth map with no texture input at all. It's the "classic effect" option the pack's README points you at, and honestly it's the most satisfying way to test that your depth map is any good.
The genre is a small niche even by diffusion-community standards - people have been asking for a Magic Eye generator since 2022 ("can someone get SD to do Magic Eye?") and a handful of node packs serve it. This is the dedicated one.
How it works
Feed it one depth_map and it lays down the classic constraint-copy algorithm. For each pixel column, it reads the depth, maps it to a pixel offset between min_separation and max_separation, and copies from x - separation. Where there's no source yet, it rolls a random colored dot with probability dot_density, or the background_color (a hex string, default #808080 gray). Because every repeat of the pattern shifts by the depth value, your eyes fuse the repeats and read the shift as height.
The inputs that actually shape the result:
min_separation/max_separation- the depth range in pixels. Wider = stronger pop but harder to fuse. They must satisfymin_separation < max_separation, or the node raises an error.dot_density(0.1–1, default 0.5) - how dense the dots are. Denser dots give more texture to lock onto.depth_layers(0–50, default 50) - quantizes depth into discrete bands.0means continuous depth; fewer layers gives that stepped "pixel relief" look.layer_smoothing(0–1, default 1) - smooths transitions between those bands with cosine interpolation. Turn it down for a deliberately chunky posterized effect.background_colorandrandom_seed(0 = random) round it out.
One output: rds_stereogram.
Getting it to work
If the shape pops inward instead of outward, invert the depth map upstream (DepthMapProcessor has an invert switch). If you can't fuse it at all, reduce max_separation - a big separation demands more eye divergence. And if the depth looks chunky where you want smooth, raise depth_layers or layer_smoothing. Keep in mind RDS is unforgiving: no texture means every pixel is doing depth duty, so a blurry depth map shows up immediately as mud.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/SanDiegoDude/ComfyUI-DeepStereo
cd ComfyUI-DeepStereo
pip install -r requirements.txt
Restart ComfyUI, or install via ComfyUI Manager (search ComfyUI-DeepStereo). No downloads beyond the pack itself - the only thing it needs from you is a depth map, which the pack's own MiDaSDepthEstimator is happy to provide.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| depth_map | IMAGE | — | |
| min_separation | INT | 3010–200 | — |
| max_separation | INT | 10020–300 | — |
| dot_density | FLOAT | 0.500.1–1 | — |
| depth_layers | INT | 500–50 | Number of distinct depth layers (0 for continuous) |
| layer_smoothing | FLOAT | 1.000–1 | Amount of smoothing between layers |
| background_coloropt | STRING | #808080 | Hex color for background |
| random_seedopt | INT | 00–999999 | 0 for random seed |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| rds_stereogram | IMAGE | — |