Nodes/ComfyUI-LogicUtils/Concat 2 Images to Grid
ComfyUI Node

Concat 2 Images to Grid

Put two images side by side (or stacked) automatically

By aria1th·Created 3 years ago·Updated 7 months ago· 116
Concat 2 Images to Grid
  • imageA
  • imageB
  • IMAGE
directionhorizontal
match_methodresize

Before/after comparisons are one of the most common things people want out of ComfyUI and one of the most annoying to do manually - you either save two files and flip between them in an image viewer, or you break out an external editor to place them side by side. ConcatTwoImagesNode does the second thing for you, inside the graph, in one node: give it two images and it hands back one combined image with both of them placed next to each other.

It comes from ComfyUI-LogicUtils, a utility pack by GitHub user aria1th - the same handle behind Illustrious XL under the name AngelBottomless, a training-focused figure rather than a node developer by trade. LogicUtils reads like a personal toolbox that got open-sourced rather than a designed product, and the pack's own README is upfront about it: "proper documentation is being prepared, however there are too many nodes." Keep that in mind if a node's exact behavior surprises you - this isn't a heavily maintained, heavily documented pack.

How it works

ConcatTwoImagesNode is the two-image sibling of ConcatGridNode - same underlying idea, simpler interface. You wire in imageA and imageB, pick a direction, and it produces one merged image. horizontal places B to the right of A, vertical stacks B below A.

The real work happens when your two images don't match in size, which is the normal case - a reference photo and a generated result rarely share dimensions. match_method decides how the mismatch gets handled: resize scales one or both images to a common size so the seam lines up cleanly, pad instead leaves the smaller image at its native size and fills the extra space around it rather than distorting anything. If you're doing a strict before/after where proportions matter - say, comparing an upscale against the original - pad keeps things honest; resize is the quick-and-dirty option when you just want a fast visual side-by-side.

The inputs and outputs that matter

  • imageA and imageB (IMAGE, both required) - the two images to combine, in that order.
  • direction - horizontal or vertical, defaults to horizontal.
  • match_method - resize or pad, defaults to resize.
  • Output: a single IMAGE, ready for a Preview Image or Save Image node.

How to install it

Via ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils

Restart ComfyUI. Nothing to download - no models, no heavy dependencies for this node. The README flags an opt-in auto-install hook (COMFYUI_LOGICUTILS_AUTO_INSTALL=1, with COMFYUI_LOGICUTILS_SKIP_INSTALL=1 to force it off), but the image-utility nodes in this pack don't lean on it - standard install is enough.

Common issues & troubleshooting

The comparison looks stretched. That's resize at work - it will scale an image out of its native aspect ratio if that's what's needed to make the two line up. Switch match_method to pad if the proportions of each image need to stay accurate.

Wrong image is on the wrong side. imageA always goes first - left in horizontal mode, top in vertical. If your before/after is backwards, swap what's wired into imageA and imageB rather than hunting for a hidden order setting; there isn't one.

Manager doesn't find the pack. It's a small, low-visibility repo - if search comes up empty, use "Install via Git URL" in Manager and paste https://github.com/aria1th/ComfyUI-LogicUtils directly.

Something behaves differently than you'd expect. This pack is a personal side project, not something with an active support cycle - its author's public work moved away from image-generation tooling entirely in early 2026. If you hit odd behavior, check the repo's tests/ directory for a minimal working example before assuming your graph is wrong.

Categoryimage

Inputs (4)

NameTypeDefaultDescription
imageAIMAGE
imageBIMAGE
directionCOMBOhorizontal2 options: horizontal, vertical
match_methodCOMBOresize2 options: resize, pad

Outputs (1)

NameTypeDescription
IMAGEIMAGE