MakeGrid
The concurrent-generation trick
- frames
- Grid
- Rows
- Columns
Here's the trick MakeGrid exists for: instead of running a separate img2img pass on every keyframe - slow, and the style drifts from frame to frame - you tile all your keyframes into one big image, run a single denoise pass over the whole grid, then cut it back apart. All the frames get generated in the same pass, under the same prompt and seed, so they at least share a style. The README calls it "concurrent frame generation," and for a 2023-era animation workflow it was the standard hack before AnimateDiff's temporal modules made coherence a solved problem.
The mechanism is where the author's craft shows. Frames come in as one IMAGE batch, and the node normalizes every one of them to the first frame's dimensions, rounded to a multiple of 8 so resampling doesn't wobble. Then get_grid_aspect works out the rows-and-columns layout that makes the grid closest to square - it even accounts for whether your frames are landscape or portrait, so you get a 3×4 grid for twelve landscape frames, not a silly 1×12. If the last row isn't full, the empty cells are padded with repeats of the last image. Not black. Black space "frustrates generation" - that's the author's phrase, and it's right, because a sampler will happily invent content in a black void and then you've got random junk cells.
The three inputs are straightforward: frames, plus max_width and max_height (both default 2048, range 64–8000, step 8) which cap how big the grid is allowed to get. The three outputs are the payoff: Grid (IMAGE) goes into your sampler, and Rows and Columns (both INT) get handed to BreakGrid afterward to split the result back up.
The catch, and it's a real one: grids get huge fast. Twelve 512×512 keyframes in a 3×4 layout is a 1536×2048 image, and most models generate poorly at that size - you're squarely in tiling-and-repetition territory if you push past the native resolution of your checkpoint. Keep max_width/max_height honest, and accept that a grid is a space-efficiency trick, not a quality hack. And be clear-eyed about what it can't do: cells are generated independently, so there's no temporal coherence between them. You get a set of styled frames, not a smooth animation - the motion comes from whatever drift the img2img gives you. If you need coherent video, that's what AnimateDiff-Evolved or Wan are for. MakeGrid is for per-frame control and for breathing one style across existing footage, and for that job it's the right tool.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| frames | IMAGE | — | |
| max_width | INT | 204864–8000 | — |
| max_height | INT | 204864–8000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| Grid | IMAGE | — |
| Rows | INT | — |
| Columns | INT | — |