Nodes/Bjornulf_custom_nodes/๐Ÿ–ผ๐Ÿ“น๐Ÿ”ช Split Image/Video Grid
ComfyUI Node

๐Ÿ–ผ๐Ÿ“น๐Ÿ”ช Split Image/Video Grid

Chop a grid image (or video) into its individual cells

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
๐Ÿ–ผ๐Ÿ“น๐Ÿ”ช Split Image/Video Grid
  • image
  • part_1
  • part_2
  • part_3
  • part_4
  • part_5
  • part_6
  • part_7
  • part_8
  • part_9
  • rows
  • columns
  • MODIFIED_part
  • MODIFIED_part_index
โ—„rows1โ–บ
โ—„columns1โ–บ
โ—„MODIFIED_part_index1โ–บ

This node takes an image laid out as a grid - say a 3ร—3 sheet of tiles, or a frame with several characters arranged in cells - and splits it back into the individual pieces. You tell it how many rows and columns the grid has, and it hands you each cell as a separate image output. It works on video the same way (a grid of video frames), which is where the author actually uses it.

The motivating use case is worth knowing, because it explains the node's odd shape. If you've got several characters in one image or video and you want to lip-sync or edit just one of them, you split the grid, process the cell you care about (which also saves VRAM, since you're only touching part of the frame), and then reassemble with the pack's companion node. It's a divide-and-conquer tool.

How it works

You give it the grid image plus the rows and columns count, and it slices the image into rows ร— columns equal cells. Each cell comes out on its own numbered output (part_1 through part_9), so you can grab exactly the piece you want and route it onward. There's also a "modified part" convenience path: you set an index, and the node echoes that specific cell out on a dedicated output so you can quickly switch which cell you're working on without rewiring.

The inputs and outputs that matter

  • image - the grid image (or video frames) to split.
  • rows and columns - the grid dimensions, 1 to 9 each. Get these right or the cuts land in the wrong places.
  • MODIFIED_part_index - which cell (1โ€“9) to echo out on the dedicated "modified part" output, a shortcut for the reassembly workflow.

Outputs: part_1 through part_9 (the individual cells - unused ones for a smaller grid simply carry nothing useful), plus rows and columns passed through as integers, and MODIFIED_part / MODIFIED_part_index for the reassembly path. The row/column passthroughs exist so the companion reassemble node can take the same grid size automatically.

How to install it

ComfyUI Manager: search Bjornulf_custom_nodes, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes

Restart ComfyUI. The image path needs no heavy dependencies; if you'll split video grids, the pack's video nodes want ffmpeg, so installing requirements.txt is worth it.

Common issues

Getting rows and columns wrong is the main failure - if the split looks misaligned, your grid dimensions don't match the actual layout. The node assumes evenly-sized cells, so a grid with uneven gutters or padding won't slice cleanly.

If you're planning to reassemble after editing a cell, feed the rows/columns outputs into the companion Reassemble node so the grid size stays consistent - the author designed the two to work as a pair. And for video specifically, editing one cell can change its length or FPS (for example if you ran an audio-sync step on it), which makes reassembly finicky; you may need to re-sync the parts back to a common duration.

Categoryimage

Inputs (4)

NameTypeDefaultDescription
imageIMAGEโ€”
rowsINT11โ€“9โ€”
columnsINT11โ€“9โ€”
MODIFIED_part_indexINT11โ€“9โ€”

Outputs (13)

NameTypeDescription
part_1IMAGEโ€”
part_2IMAGEโ€”
part_3IMAGEโ€”
part_4IMAGEโ€”
part_5IMAGEโ€”
part_6IMAGEโ€”
part_7IMAGEโ€”
part_8IMAGEโ€”
part_9IMAGEโ€”
rowsINTโ€”
columnsINTโ€”
MODIFIED_partIMAGEโ€”
MODIFIED_part_indexINTโ€”