Nodes/WAS Node Suite v3/Image Tile Shuffle
ComfyUI Node Runs on cloud

Image Tile Shuffle

Scramble an image into tiles and reassemble it

By WASasquatch·Created 3 years ago·Updated 3 days ago· 1,832
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.

CategoryWAS Suite/Image/Transform

Inputs (5)

NameTypeDefaultDescription
imagesIMAGEThe pictures to cut up. Every frame of a batch is cut the same way and shuffled with the same seed, so a sequence stays consistent.
max_tilesINT42–64How many tiles the picture is cut into. The grid is the squarest arrangement of that many: 4 gives 2 by 2, 12 gives 3 by 4. Rows and columns divide the picture exactly, so any leftover pixels on the right and bottom edges are dropped.
seedINT00–18446744073709550000Seed for the shuffle. The same seed always produces the same tile order; change it to get a different arrangement of the same tiles. Any whole number; `0` is as good a seed as any.
border_widthINT00–100Gap in pixels drawn between neighbouring tiles, in border_color. 0 butts the tiles together with no gap, which keeps the output the same size as the input.
border_colorSTRING#FFFFFFColour of the gap between tiles, as a hex string such as #FFFFFF for white or #000000 for black. The leading # is optional, and an unreadable value falls back to white.

Outputs (1)

NameTypeDescription
imagesIMAGEThe reassembled pictures. Larger than the input when border_width is above 0, since the gaps are added between the tiles.