Nodes/WAS_Extras/Image Tile Shuffle
ComfyUI Node

Image Tile Shuffle

Scramble an image into tiles and reassemble it

By WASasquatch·Created 3 years ago·Updated 17 days ago· 43
Image Tile Shuffle
  • images
  • images
max_tiles4
seed0
border_width0
border_color#FFFFFF

This node cuts an image into a grid of tiles, shuffles their order, and reassembles them into a single scrambled image. Unlike this pack's other tiling node - Image Tile Extract, which always makes exactly four quadrants and hands each one back separately - this one gives you a configurable number of tiles and a single recombined output, deliberately jumbled.

How it works

max_tiles sets how many pieces the image gets split into (even numbers only, from 2 up to 64), and seed controls the shuffle order - same seed, same scramble pattern, which matters if you want a reproducible result rather than a different jumble every run. border_width and border_color add a colored gap between tiles in the reassembled image, useful for making the tile boundaries visually obvious rather than a seamless (if scrambled) grid.

Scrambling an image's spatial layout while keeping its actual color and texture content intact is the same underlying idea behind ControlNet's "Content Shuffle" preprocessor - feeding a model a shuffled version of an image to carry a loose color/style signal forward without any of the original structure. This node isn't that preprocessor, and the README doesn't specify a particular intended downstream use - but if you're looking for a reason to reach for a tile-shuffled image rather than the original, "strip structure, keep the rough palette" is the established pattern in the wider ecosystem, and this node is a plausible way to produce that kind of input by hand.

The inputs and outputs that matter

  • images (IMAGE) - the image(s) to tile and shuffle.
  • max_tiles (default 4, range 2–64, even numbers only) - total tile count. Higher values produce a finer, more thoroughly scrambled result; lower values keep larger chunks of original structure intact within each tile.
  • seed - controls shuffle order; pin it for a reproducible scramble.
  • border_width (default 0, 0–100) / border_color (default #FFFFFF) - optional visible gaps between tiles in the reassembled image.

Single output: images - one reassembled, shuffled image, not separate tile wires.

How to install it

Via ComfyUI Manager: search "WAS_Extras", install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/WAS_Extras

Restart ComfyUI. No extra dependencies.

Common issues & troubleshooting

Result looks like a fine-grained mess rather than a useful scramble. That's max_tiles set too high for what you're going for - more tiles means smaller, more thoroughly disconnected pieces. Drop it toward the low end (4-8) if you want the shuffle to still read as "the same image, rearranged" rather than pure noise.

Getting a different scramble every time you rerun. seed isn't pinned, or your workflow is set to randomize it between runs. Fix seed to a specific value if you need the same shuffle pattern reproducibly.

Expected four separate tile outputs instead of one image. That's Image Tile Extract (WASImageTileExtract) - this node always reassembles into a single output; it doesn't hand tiles back individually.

max_tiles won't accept an odd number. That's by design - the tooltip specifies even numbers only, and the step is locked to 2. Round to the nearest even value.

Categoryimage/transform

Inputs (5)

NameTypeDefaultDescription
imagesIMAGEInput images to tile and shuffle (NHWC).
max_tilesINT42–64Total number of tiles to split the image into (even numbers only).
seedINT00–18446744073709550000Random seed for tile shuffling order.
border_widthINT00–100Width of the border between tiles in pixels.
border_colorSTRING#FFFFFFHex color for tile borders (e.g. #FFFFFF).

Outputs (1)

NameTypeDescription
imagesIMAGE