🪠️ WWAA Image Grid from Index
Grid your video frames by index, not by batch order
- images
- grid_image
- computed_rows
- computed_columns
Most grid nodes in ComfyUI just tile whatever batch comes in, in order. WWAA Image Grid from Index is different: you hand it a comma-separated list of frame indices and it picks exactly those frames out of a sequence, figures out a near-square grid that fits them, and lays them out. The classic use is video - you load a clip's frames, type 0,3,6,9,12,15, and get a six-panel storyboard in one go instead of eyeballing a timeline.
How it works
It's surprisingly thoughtful for a utility node. Your indices string gets parsed, de-duplicated, and sorted (so 6,3,6 becomes 3,6), then the node picks the grid dimensions - square-ish, with a couple of passes to avoid empty corner cells. Each cell is filled in grid order with the frame at that index, and any index that points past the end of your batch just leaves a blank cell painted in background_color rather than erroring out. So if you ask for frame 20 in a 12-frame sequence, you get an empty slot, not a crash - handy when you're experimenting, mildly annoying when you typo an index and can't see why a panel is black.
Everything runs through a PIL round-trip on CPU, which is worth knowing if you're feeding it hundreds of 4K frames; it's a contact-sheet tool, not a realtime one. The output_scale input (1–200, default 100) is a percentage that scales the finished grid down, so you can make a quick low-res contact sheet and not choke your preview pane.
The inputs that matter
images- your batch of frames, straight from a video loader or image sequence node.indices- the comma-separated list, like0,3,6,9,12,15. This is the whole point of the node.background_color- hex string for empty cells;#000000by default. Set it to match your contact sheet background if black bothers you.output_scale- percent, 100 keeps full size.
Outputs are grid_image, plus computed_rows and computed_columns as ints - the latter two are genuinely useful if you're building a workflow that needs to know the layout for downstream math (say, splitting the grid back apart later).
Install
It ships in the WWAA-CustomNodes pack. In ComfyUI Manager search "WWAA Custom Nodes", install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/hgabha/WWAA-CustomNodes
# restart ComfyUI
Good news: the pack's requirements.txt explicitly declares no extra dependencies - it uses numpy, Pillow, and torch, all of which ship with ComfyUI. No model downloads, no PyAV, no surprises. All nodes land under the 🪠️ WWAA menu in the node list.
Where people trip
Two things to know going in. First, indices past the end of your batch silently render as background-colored cells - check your numbers if a panel is empty. Second, remember the node dedupes and sorts; if you intentionally wanted the same frame twice in a grid, this isn't the node for that. It's built by the team at WeirdWonderfulAI.Art (the Wwaa-2022 account over on r/StableDiffusion), and honestly it feels like exactly what it is: a small tool written because their own video workflows needed a storyboard step and nothing in stock ComfyUI did it. It won't change your life, but it'll quietly kill a fiddly sub-task.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| indices | STRING | 0,3,6,9,12,15 | — |
| background_color | STRING | #000000 | — |
| output_scale | INT | 1001–200 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| grid_image | IMAGE | — |
| computed_rows | INT | — |
| computed_columns | INT | — |