Nodes/ComfyUI 1hewNodes/Multi Image Stitch
ComfyUI Node

Multi Image Stitch

Stitch a before/after comparison or a collage, cleanly

By 1hew·Created about a year ago·Updated 7 days ago· 33
Multi Image Stitch
  • image_1
  • image_2
  • image
directionright
match_image_sizetrue
spacing_width10
spacing_color1.0
pad_color1.0

The "did the upscale actually help?" question is best answered by slapping the original and the result side by side in one image. That's the everyday job of Multi Image Stitch: it concatenates multiple images in a direction you choose - left/right or top/bottom - with controllable spacing, and it does it without the ugly "one image got squished to fit" problem.

It's the node to reach for before/after comparisons, collages, banner strips, and character-turnaround sheets. If you've ever manually padded two images to the same height in an editor before stacking them, this automates exactly that chore.

How it works

Images are stitched pairwise in order: image_1 first, then image_2, and onward. The inputs are wired as separate ports (image_1 is required, image_2 onward are optional, recognized by numeric suffix), which is the key difference from plotting a batch - you control the order explicitly and can feed in genuinely different resolutions.

The size handling is where the quality lives:

  • match_image_size = true - resizes each image keeping its aspect ratio so heights (for left/right stitching) or widths (for top/bottom) line up. This is what makes a before/after comparison look professional instead of squashed.
  • match_image_size = false - pads to unify instead of resizing, so nothing gets resampled. The pad_color strategy decides what fills the slack: explicit color, edge (average edge color), extend (replicate edge pixels), mirror (reflect), or average.
  • spacing_width and spacing_color - a gap between images, 0 to 1000 pixels. spacing_width = 0 gives you a seamless join.

If any input has alpha, the whole pipeline switches to RGBA and the output keeps it - spacers and padding included. Batch inputs get broadcast, so stitching a 5-frame batch with a 2-frame batch gives you 5 stitched frames.

Install

Part of ComfyUI-1hewNodes:

cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes

Restart ComfyUI. No models, no downloads. Needs a current ComfyUI since the pack runs on the v3 node API.

Where it fits

Two neighbors in the same pack are worth knowing so you pick the right tool. Image Plot arranges the frames of a single batch into a grid or row for inspection - great for contact sheets. Multi Image Stitch takes separate wires and makes a deliberate composition: before/after, panel strips, or a collage where each piece keeps its identity.

Common issues

  • Images got resized when you didn't want them to - match_image_size = true resamples by design. Set it false and use a pad_color strategy if you must preserve pixels.
  • Order confusion - direction has no "reorder" mode; right puts image_1 on the left, bottom puts image_1 on top. If the result is flipped, swap the inputs, not the direction.
  • Spacer color looks wrong on RGBA output - explicit spacing_color/pad_color values get extended with opaque alpha automatically; if you want a transparent gap, you'll need to think in RGBA terms.

For the classic workflow - render two variants, wire them in, hit run - this is the easiest "look at the difference" node in the pack.

Category1hewNodes/multi

Inputs (7)

NameTypeDefaultDescription
directionCOMBOright4 options: top, bottom, left, right
match_image_sizeBOOLEANtrue
spacing_widthINT100–1000
spacing_colorSTRING1.0
pad_colorSTRING1.0
image_1IMAGE
image_2optIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE