Image Tile Shuffle
A scrambled picture with a seed, and one sharp edge case
- images
- images
Cut a picture into a grid of equal tiles and put them back down in a shuffled order. That's the node. It's a puzzle look, a collage, and - more usefully than either - a way to build a reference image a model can't read as a coherent scene, which is a trick you'll see in img2img workflows when someone wants texture, palette and light without the composition.
What you control
images is the input, and again it's batch-consistent: every frame is cut the same way and shuffled with the same seed, so a sequence stays coherent instead of re-scrambling into noise at frame 2. That detail is the difference between this being usable on video and being a novelty.
max_tiles (2 to 64, even values) is how many pieces, and the grid is the squarest arrangement of that number - 4 gives 2×2, 12 gives 3×4. Note the phrasing: you choose a tile count, not a rows-and-columns pair, and the node picks the closest square layout.
seed fixes the arrangement. Same seed, same order; change it for a different arrangement of the same tiles. Any whole number works, and 0 is as good as any.
border_width and border_color add a coloured gap between tiles - 0 butts them together with no gap and keeps the output exactly the input's size, anything above that makes the image bigger, because the gaps are added between the tiles rather than cut into them. Hex colour, # optional, unreadable values fall back to white.
One output, images.
The edge case that will bite you
Rows and columns divide the picture exactly, so any leftover pixels on the right and bottom edges are dropped. With max_tiles 12 on a 1024×1024 image you get a 3×4 grid of 341×256 tiles and the last pixel column and row go in the bin - invisible, and fine. On an awkward size it's not invisible: 1000 wide into 3 columns drops about a third of a tile's worth off the right, and since the tiles are then laid back down at the same size, you get a subtly different aspect ratio and a shuffle that looks like it lost a strip.
Crop or resize to a size that divides evenly first. It's a two-second fix and it's the difference between the node looking broken and looking fine.
The other one is conceptual: this is not a jigsaw. Nothing is rotated, flipped or re-rendered, so a shuffled portrait is still perfectly recognisable as that portrait, just wrong. If you wanted something a model genuinely can't parse, that's the point - it's a reference, not a puzzle to solve.
Installing it
Part of WAS Node Suite v3 - MIT, WASasquatch, 468 nodes across image, mask, latent, text, file, sampling and video work:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git
Or ComfyUI Manager, searching WAS Node Suite v3 - the route the README recommends. Needs ComfyUI 0.14.0+ and Python 3.10+. The pack installs no Python packages and downloads nothing; it's all ComfyUI's own torch, which is why v3 could drop the OpenCV-and-friends pile that v2 installed. First launch after install (or after a pull) is a beat slower while it writes config.yaml and its folders under <ComfyUI user dir>/was-node-suite/. The tile nodes are in the extras feature group, enabled by default - if they're missing from your menu, look there before reinstalling anything.
Where it fits
Pair it with Image Tile Extract (Quadrants) when you want the pieces separately, or use it on its own as a perturbation step before an img2img pass to shake a composition loose while keeping its palette - low denoise, shuffled reference, and the model rebuilds structure over your scrambled colour and light. And for the collage look at a poster's scale, bump max_tiles to 16 or 24 with a small border and save it; it looks deliberate, which is more than most effect nodes manage.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The 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_tiles | INT | 42–64 | How 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. |
| seed | INT | 00–18446744073709550000 | Seed 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_width | INT | 00–100 | Gap 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_color | STRING | #FFFFFF | Colour 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)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | The reassembled pictures. Larger than the input when border_width is above 0, since the gaps are added between the tiles. |