DeepStereo: Procedural Texture Generator
The texture decides whether your Magic Eye fuses — this node builds it from your own image
- image
- texture
A plain Magic Eye is random dots. A nice one has a patterned texture, and the texture is what your eyes actually lock onto when the 3D resolves. RandomNoiseGenerator gives you abstract patterns; this node goes a step further and builds a texture from the content of the image itself - content-driven color dots plus a dither pass - so the texture has a visual relationship to the scene you're showing.
It's the ComfyUI translation of the author's standalone DeepStereo tool's texture methods, and it's the one texture node that understands "this came from a photo."
How it works
Required inputs: an image (the source you want the texture to draw from), max_megapixels (caps the output size, default 2 MP - bigger is slower, not better), and combination_mode - sequential or blend - which decides how the two texture methods combine.
Two methods are stacked under that:
- Color dots (
enable_color_dots, on by default).dot_density,dot_size, and adot_bg_color(hex, no#) control the dots. The interesting knob isdot_color_mode:content_pixel- dots sample actual pixels from your image.random_rgb- fully random colors.random_from_palette- random colors drawn from a palette derived from the image.transformed_hue(default) - image colors with a hue rotation viahue_shift_degrees, which keeps the pattern tied to the content while making it visually distinct.transformed_invert- image colors inverted.
- Glyph dither (
enable_glyph_dither, on by default).glyph_num_colors,glyph_size,glyph_style(random_dots,lines,circles,solid) anduse_quantized_colorbuild a dithered dot field.
When combination_mode is blend, blend_type (eight options: average, lighten, darken, multiply, screen, add, difference, overlay) and blend_opacity control how the two methods merge.
One output: texture, straight into StereogramGenerator's texture input.
Getting it to work
The pack's own advice is worth repeating: avoid blurry or overly complex patterns, keep pattern size consistent with your separation values. The transformed_hue default is a good starting point because it separates the pattern's colors from the scene's while keeping them related. If the fused image is noisy static, your pattern is too busy or too low-contrast - simplify the glyph_style and up the dot contrast. And keep max_megapixels modest; a 2 MP texture is already plenty and renders fast.
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). Pure procedural generation - no models, no first-run downloads, just PIL and numpy doing the work.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| max_megapixels | FLOAT | 2.00.1–10 | — |
| combination_mode | COMBO | blend | 2 options: sequential, blend |
| blend_typeopt | COMBO | average | 8 options: average, lighten, darken, multiply, screen, add, +2 |
| blend_opacityopt | FLOAT | 0.750–1 | — |
| enable_color_dotsopt | BOOLEAN | true | — |
| dot_densityopt | FLOAT | 0.700–1 | — |
| dot_sizeopt | INT | 501–200 | — |
| dot_bg_coloropt | STRING | 000000 | Background color as hex (without #) |
| dot_color_modeopt | COMBO | transformed_hue | 5 options: content_pixel, random_rgb, random_from_palette, transformed_hue, transformed_invert |
| hue_shift_degreesopt | FLOAT | 900–360 | — |
| enable_glyph_ditheropt | BOOLEAN | true | — |
| glyph_num_colorsopt | INT | 82–32 | — |
| glyph_sizeopt | INT | 102–50 | — |
| glyph_styleopt | COMBO | random_dots | 4 options: random_dots, lines, circles, solid |
| use_quantized_coloropt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| texture | IMAGE | — |