Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon Image Split 4-Grid
ComfyUI Node

πŸ€– Leon Image Split 4-Grid

Split a 2x2 grid into four separate images β€” the Midjourney-grid finisher

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Image Split 4-Grid
  • image
  • image_TL
  • image_TR
  • image_BL
  • image_BR

Leon Image Split 4-Grid is the simplest node in the pack and it exists for one very specific reason: Midjourney returns its variations as a 2x2 grid, and if you're running Midjourney inside ComfyUI through the pack's proxy node, you're going to want those four quadrants as separate images. This node takes one IMAGE and cuts it into top-left, top-right, bottom-left, and bottom-right outputs. That's the whole job, and it does it with no configuration and no secrets.

It's honestly refreshing to find a node this honest in a pack of API wrappers. No API key, no provider, no retry logic - it's pure local tensor slicing. Give it a grid image, get four IMAGE outputs you can preview, save, or feed into the next node. If you've ever downloaded a Midjourney grid and manually cropped it in an editor, you'll appreciate not doing that anymore.

How it works

The node takes the input tensor, finds the middle of the image in each dimension, and slices it into quadrants - it does this by converting the tensor to a PIL image, cutting with crop(), and converting each quadrant back to an RGBA tensor so they're drop-in compatible with everything downstream in ComfyUI. Because it works on pixel dimensions, it doesn't care about your image's aspect ratio: a 2048x2048 grid becomes four 1024x1024 images, and a non-square grid still splits cleanly into four.

The inputs and outputs are minimal:

  • Input: image (one IMAGE).
  • Outputs: image_TL, image_TR, image_BL, image_BR - four IMAGE sockets, each wireable into its own PreviewImage/SaveImage, or into the pack's array builder to recombine as an IMAGE_ARRAY.

That quadrant naming matters: TL/TR/BL/BR match how Midjourney lays out a grid, so the top-left output really is the top-left cell. No surprises.

Installing it

Pack-wide install, nothing special:

cd ComfyUI/custom_nodes
git clone https://github.com/l3ony2k/comfyui-leon-nodes
pip install -r requirements.txt

Restart ComfyUI, or install "ComfyUI Leon Nodes" via ComfyUI Manager. Minimal dependencies, no models, no keys.

Where people get burned

Honestly, not many places. The main footgun is feeding it a non-grid image and expecting something meaningful - it will happily cut any image into four quarters, and that's probably not what you want. And like most ComfyUI utility nodes, it operates on whatever's in the input socket: if you feed it a batch of images it takes the first frame of the tensor, so for real batch processing you'd loop instead. But for its one intended job - turning a Midjourney 2x2 grid into four clean images - it's exactly right, and it's the natural end of the pack's Midjourney Generate β†’ Split 4-Grid β†’ 4x Preview pattern.

CategoryLeon_Utils

Inputs (1)

NameTypeDefaultDescription
imageIMAGEβ€”

Outputs (4)

NameTypeDescription
image_TLIMAGEβ€”
image_TRIMAGEβ€”
image_BLIMAGEβ€”
image_BRIMAGEβ€”