BreakGrid
Cut a frame grid back into individual frames
- grid
- Frames
BreakGrid is the return trip. MakeGrid tiles your keyframes into one big image so you can generate them in a single pass; BreakGrid crops that grid back into individual frames. If MakeGrid is the clever half of the trick, BreakGrid is the unglamorous half you can't skip - otherwise everything you just generated is stuck in one giant canvas.
Three inputs, all required: grid (IMAGE), plus rows and columns (INT). It crops the image into rows × columns equal cells, row by row, left to right. That order matters and it's worth stating plainly: BreakGrid crops in exactly the order MakeGrid pastes, so as long as you feed it the Rows and Columns outputs straight out of MakeGrid, every cell lands back where it started. Mix in your own numbers and you'll get scrambled frames - the README's advice to "use rows/columns output from MakeGrid" is not a suggestion. The single output, Frames, is an IMAGE batch of the individual cells, ready to pipe into an encode-to-video node or a preview.
So the whole animation pipeline for this pack reads: BreakFrames → GetKeyFrames → MakeGrid → img2img → BreakGrid → encode. Which brings up the honest gap: the pack stops at IMAGE. There's no encoder here, no FPS handling, nothing to turn your regenerated frames back into an actual video file. You'll need an ffmpeg-based node (VHS, ComfyUI-VideoHelperSuite, or similar) to do that final stitch, and to remember what frame rate the source was, since none of these nodes track it.
One quirk worth knowing before it bites you, because it's visible in the shipped source: BreakGrid appends an extra batch dimension on the way out - the code takes an already-batched tensor and unsqueeze(0)s it again, which produces a five-dimensional IMAGE instead of the usual four. Depending on what you feed it into, downstream nodes can throw or just silently see a weird shape. If your frames come back as one stacked mess, run them through a reshape or image-batch splitter node before you encode. It's a rough edge, but that's the deal with this pack: a single-commit November 2023 personal tool that still works because the underlying crop math is dead simple and hasn't changed.
If your use case is narrower - say you've got a pre-made contact sheet from somewhere else and you just want the cells out - BreakGrid does that fine too, as long as the grid is even and you know the rows and columns. Otherwise, treat it as MakeGrid's bookend and move on.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| grid | IMAGE | — | |
| rows | INT | — | |
| columns | INT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Frames | IMAGE | — |