DeepStereo: Texture Transformer
Rotate, grid, invert, stretch
- image
- transformed_texture
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 withrotation_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.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| rotate_degreesopt | INT | 00–359 | — |
| rotation_fill_modeopt | COMBO | tile | How to handle rotation: black_fill=fill with color, tile=tile rotated image, crop_to_fit=crop to original size |
| rotation_bg_coloropt | STRING | 000000 | Background hex color for black_fill mode (without #) |
| grid_rowsopt | INT | 00–10 | — |
| grid_colsopt | INT | 00–10 | — |
| invert_colorsopt | BOOLEAN | false | — |
| target_widthopt | INT | 00–4096 | Stretch to target width (0 = no stretch) |
| target_heightopt | INT | 00–4096 | Stretch to target height (0 = no stretch) |
| match_input_dimensionsopt | BOOLEAN | false | Resize output to match input dimensions (overrides target width/height) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| transformed_texture | IMAGE | — |