Nodes/ComfyUI-DeepStereo/DeepStereo: Texture Transformer
ComfyUI Node

DeepStereo: Texture Transformer

Rotate, grid, invert, stretch

By SanDiegoDude·Created about a year ago·Updated about a year ago· 3
DeepStereo: Texture Transformer
  • image
  • transformed_texture
rotate_degrees0
rotation_fill_modetile
rotation_bg_color000000
grid_rows0
grid_cols0
invert_colorsfalse
target_width0
target_height0
match_input_dimensionsfalse

Last stop before the stereogram generator. Once you've made a texture - noise pattern or content-driven - you'll often want to tweak how it repeats or how it sits on the canvas. That's this node: rotation with three different fill behaviors, a grid repeat, color inversion, and stretching. None of it is glamorous, but rotation_fill_mode is the kind of detail that separates "this works" from "this looks wrong and I don't know why."

How it works

One required image input, then a pile of optional transforms that all apply in sequence:

  • rotate_degrees (0–359) - and here's the trap, rotation_fill_mode:
    • tile (default) - tiles the rotated image so there's no empty canvas; keeps it seamless-ish for stereograms.
    • black_fill - fills the uncovered corners with rotation_bg_color (hex, no #).
    • crop_to_fit - rotates and crops back to the original dimensions, no empty space but edges get cut.
    • Rotating a texture 90° with the wrong fill mode is how you end up with black wedges in your Magic Eye.
  • grid_rows / grid_cols (0–10, 0 = off) - tile the texture into a grid, useful when you want a deliberately repeated block pattern.
  • invert_colors - simple color inversion (the negative).
  • target_width / target_height - stretch to a target size (0 = no stretch). Note: this is a stretch, not aspect-preserving resize.
  • match_input_dimensions - override everything and just resize the output back to the input size, handy when an earlier transform changed dimensions and you want a fixed-size output for the generator.

One output: transformed_texture, ready to feed StereogramGenerator or to pass through ImageEffectsTransformer for a sharpen.

When to reach for it

Rotation is the honest use case - a texture that won't fuse sometimes just wants a different orientation so the pattern repeats align with the eye-lock direction. The grid mode is more of a creative toy: a 2x2 or 3x3 grid turns a small pattern into a structured wallpaper, which can be exactly the "repeated block" look some stereograms want. match_input_dimensions is the one to remember when you've chained a bunch of transforms and need a guaranteed canvas size going into the generator, since the stereogram output takes its dimensions from the depth map anyway.

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 PIL transforms, no models, no first-run downloads - you can iterate on rotation and grid settings as fast as you can queue.

CategoryDeepStereo/Texture

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
rotate_degreesoptINT00–359
rotation_fill_modeoptCOMBOtileHow to handle rotation: black_fill=fill with color, tile=tile rotated image, crop_to_fit=crop to original size
rotation_bg_coloroptSTRING000000Background hex color for black_fill mode (without #)
grid_rowsoptINT00–10
grid_colsoptINT00–10
invert_colorsoptBOOLEANfalse
target_widthoptINT00–4096Stretch to target width (0 = no stretch)
target_heightoptINT00–4096Stretch to target height (0 = no stretch)
match_input_dimensionsoptBOOLEANfalseResize output to match input dimensions (overrides target width/height)

Outputs (1)

NameTypeDescription
transformed_textureIMAGE