Nodes/ComfyUI Production Nodes Pack/🌅Image Concatenate
ComfyUI Node

🌅Image Concatenate

Put two images side by side (or up to 1,000) — Image Concatenate, the comparison-grid workhorse

By KoreTeknology·Created 2 years ago·Updated 2 years ago· 16
🌅Image Concatenate
  • image_1
  • image_2
  • images
inputcount2
directionright
match_image_sizefalse

Vanilla ComfyUI is weirdly missing a "glue these images together" node. You can generate, you can upscale, but if you want a before/after pair, a seed grid, or a contact sheet, you're suddenly writing Python or installing a whole suite. Image Concatenate is the no-frills answer: it stitches multiple images into one in a direction you choose.

How it works

The node grows as many input sockets as you ask for. Set inputcount (INT, default 2, up to a frankly silly 1000), and the node expands to expose image_1, image_2, and so on. Every image is concatenated in sequence onto the previous one.

direction decides where the next image lands relative to what's already there - right, down, left, or up (default right). It's plain torch tensor concatenation under the hood, so no resampling happens unless you ask for it.

That's what match_image_size is for. Off by default. When you turn it on, each incoming image is resized with a Lanczos upscale so its height (for left/right stitching) or width (for up/down) matches the first image, preserving its own aspect ratio. That's the difference between a clean comparison grid and two rectangles of different heights glued together like a bad collage. Leave this on unless you genuinely need raw pixels.

Output is a single images tensor - one IMAGE with the stacked result - which you can save or feed onward.

The inputs that matter

  • inputcount - how many images to join. Change it and the node re-syncs its sockets.
  • image_1 and image_2 - the first two; more appear as you raise the count.
  • direction - right/down/left/up.
  • match_image_size - Boolean; resize each incoming image to line up with the first. Turn it on.

Where people get burned

The batch-size handling is the gotcha. If the two images are actually batches of different lengths, the node tries to equalize by repeating the smaller batch to match the larger. That works cleanly when the counts divide evenly - 2 repeated 3× to become 6, fine. When they don't (say 5 vs 2), the repeat math doesn't land, and you can end up feeding a mismatched batch onward. The fix is boring and reliable: feed single images, or batches that are already the same size. This is a stitching node, not a batching wizard.

Also worth knowing: if your images have different channel counts (one RGB, one RGBA), the node silently pads the shorter one with an alpha channel of 1.0. Nice that it doesn't crash, but you might not expect the output to suddenly be 4-channel.

Install

Part of the ComfyUI Production Nodes Pack by Uriel Deveaud (KoreTeknology). Grab it through ComfyUI Manager (search "ComfyUI Production Nodes Pack") or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/KoreTeknology/ComfyUI-Nai-Production-Nodes-Pack
cd ComfyUI-Nai-Production-Nodes-Pack
pip install -r requirements.txt

Restart ComfyUI afterward. It needs no model files; the requirements are the usual PIL/scipy/opencv batch. The pack deliberately files its nodes into existing menu categories, so Image Concatenate lives under image/transform. It's pre-alpha, but this one is simple enough that "pre-alpha" mostly means "the README admits it's a work in progress," not "expect breakage."

Categoryimage/transform

Inputs (5)

NameTypeDefaultDescription
inputcountINT22–1000
image_1IMAGE
image_2IMAGE
directionCOMBOright4 options: right, down, left, up
match_image_sizeBOOLEANfalse

Outputs (1)

NameTypeDescription
imagesIMAGE