Nodes/KJNodes for ComfyUI/Image Grid Composite 2x2
ComfyUI Node Runs on cloud

Image Grid Composite 2x2

Four images into one comparison sheet

By kijai·Created 3 years ago·Updated about 21 hours ago· 2,930
Image Grid Composite 2x2
  • image1
  • image2
  • image3
  • image4
  • IMAGE

Image Grid Composite 2x2 takes exactly four images and concatenates them into a single 2x2 grid. That's the entire node - no options, no settings, just four inputs and one output. It's a comparison-sheet builder, and its lack of configuration is honestly the feature: you don't have to think about it, you just wire four images in.

Why you'd reach for it

Anyone who's tested four seeds, four LoRA strengths, four sampler/scheduler combos, or four settings of anything knows the workflow: generate four separate images, then flip between browser tabs or files trying to actually compare them side by side. This node closes that loop inside ComfyUI itself - feed your four variants in, save the single grid image out, and you've got one file that shows all four results at a glance, positioned exactly where a 2x2 comparison naturally reads (top-left, top-right, bottom-left, bottom-right). It's the kind of tiny utility that doesn't feel necessary until you're three A/B tests deep into a settings sweep, at which point it saves real time.

The inputs and outputs that matter

  • image1, image2, image3, image4 (all IMAGE, all required) - your four sources, filling the grid top-left, top-right, bottom-left, bottom-right in that order.
  • IMAGE out - the composited 2x2 grid, ready for a Save Image node or anywhere else in your graph.

There's no crop, resize, spacing, or border option exposed - it's a straight concatenation. If your four sources aren't the same dimensions going in, resize them to match beforehand with a standard image-resize node; a concat-style grid node like this one isn't going to reconcile mismatched sizes for you.

Installing it

Comes with the pack:

  • ComfyUI Manager - search KJNodes for ComfyUI, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, then pip install -r ComfyUI-KJNodes/requirements.txt, restart.

No dependencies of note, no downloads - it's a straightforward image op.

Common issues & troubleshooting

Error or a visibly broken/skewed grid. The near-certain cause is your four input images not sharing the same width and height. Run each through a resize node to a common size before this one - the node isn't doing any resizing or letterboxing on your behalf, it's concatenating tensors, and tensors of mismatched shape either error out or produce a grid that doesn't line up the way you'd expect.

I only have two or three images to compare, not four. All four inputs are required, so you'll need to feed something into every slot. A quick workaround is duplicating one of your real images into the unused slot(s) so the node runs, then just ignoring that quadrant - or, if the comparison really is two-way, a simpler side-by-side/concat node (not this one) is the better fit than forcing a 2x2 grid to do a job it wasn't built for.

Want more than four, or a different layout. This node is fixed at 2x2 by design - there's no 3x3 or variable-count sibling here. For an arbitrary number of images, you'd be looking at a different tool entirely (a contact-sheet or grid node elsewhere in the ecosystem), or chaining multiple 2x2 grids together if your layout happens to work out that way.

CategoryKJNodes/image

Inputs (4)

NameTypeDefaultDescription
image1IMAGE
image2IMAGE
image3IMAGE
image4IMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE