ImageGridDecompose
Slice a grid image back into individual frames
- images
- IMAGE
ImageGridDecompose is the mirror of ImageGridCompose: it takes a grid image and cuts it into x_dim × x_dim tiles, returning the tiles as a batch of images. Compose packs, this unpacks. It's also what the pack's KSampler (RAVE) calls internally after every denoising step to pull a gridded latent back into separate frames - so even if you never wire it up yourself, you're using it every time you run the sampler.
How it works
The node walks the grid in row-major order and crops out each cell, computing the tile size from x_dim and the total dimensions. The math handles the padding too: it subtracts the inter-cell borders before dividing, so tiles come back at their original size. That means pad_grid and x_dim must match whatever produced the grid - compose with padding, decompose with padding, or the crop boundaries drift and you get misaligned frames.
The random + rs pair is where the round-trip magic lives. If ImageGridCompose shuffled a batch with random=True and seed rs, then decomposing that grid with the same random=True and same rs restores the original order. The shuffle is a permutation, and applying the same one on the way out undoes it - so compose → decompose is lossless. Leave random off and you just get the plain row-major tiles.
Inputs and output
- images - the grid
IMAGE. - x_dim (2–8, default 3) - cells per side; must match the compose that built the grid.
- pad_grid - must match too, or tiles come back misaligned.
- random + rs - used to un-shuffle, only meaningful if the source was a shuffled compose.
Output is an IMAGE batch, one tile per cell. If the original batch didn't fill the last grid, you'll get black tiles back where the empty cells were - crop or trim them.
Installing it
Part of the ComfyUI-RAVE pack, found in the RAVE/Image menu. No dependencies beyond what ComfyUI ships and no model files. Install via ComfyUI Manager (search "ComfyUI-RAVE") or:
cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-RAVE
then restart. If you're only here to split a contact sheet, this (or the latent version) is all you need from the pack.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| x_dim | INT | 32–8 | — |
| pad_grid | BOOLEAN | false | — |
| random | BOOLEAN | false | — |
| rs | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |