Nodes/ComfyUI-PainterNodes/Painter Image Concat
ComfyUI Node

Painter Image Concat

Stack videos side by side without the manual labor

By princepainter·Created 7 months ago·Updated 6 days ago· 194
Painter Image Concat
  • images
  • image
directiondown
max_long_edge0

Comparing two generations side by side shouldn't require an image editor. PainterImageConcat is the node that tiles multiple images - or whole image sequences, i.e. videos - into one output along whatever direction you choose, and it does the annoying parts automatically: it resizes everything to match your first input (aspect ratio preserved), pads shorter video sequences by freezing their last frame so they line up, and can cap the whole result to a max long edge. It's a "for people who don't want to leave ComfyUI" utility, and it's genuinely handy for A/B shots, contact sheets, and multi-cam previews.

What it is

An image utility in the painter/image category. You feed in up to five images or image sequences via an autogrow images input, pick a direction (right, left, down, up - default down), and it returns one concatenated image. Its own description spells out the behavior: all inputs resized to match image_0 with aspect ratio preserved, short sequences padded with the last frame frozen, optional max long-edge constraint.

How it works

Everything is normalized against your first input. Every other image or sequence gets resized so its longest dimension matches the corresponding dimension of image_0 - aspect ratio preserved, so nothing gets squashed into a box. Sequences of different lengths are handled by padding the short ones with their last frame repeated, so a 40-frame clip next to an 81-frame clip lines up as a full 81-frame stack with the short one held on its final frame. Then the whole thing is joined along the chosen direction.

The max_long_edge input (default 0 = no constraint) scales the final result down so its longest edge fits a budget. For a 2×2 grid of 1080p clips that's the difference between a 2160×2160 monster and something previewable - set it and the node downscales the final composite, aspect ratio intact.

Inputs that matter

  • images - the autogrow list. First input is the size reference; the rest conform to it.
  • direction - which way to join: right/left for horizontal, down/up for vertical.
  • max_long_edge - cap the final long edge; 0 means no cap.

Output: a single image tensor - a grid if you joined frames, or a longer sequence if you stacked videos along the time axis... no, along the chosen spatial direction, which for sequences means each frame is the concatenation of that frame's inputs.

Install

Part of the PainterNodes pack. ComfyUI Manager → search "PainterNodes" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/princepainter/ComfyUI-PainterNodes
cd ComfyUI-PainterNodes
pip install -r requirements.txt

Common issues

  • Output looks squashed - that's the resize-to-match behavior doing its job, but if inputs have wildly different aspect ratios the conforming step can produce a surprise. Feed inputs that are roughly the same aspect ratio and you'll rarely see it.
  • Sequence lengths don't line up - they do, by design: short ones freeze on the last frame. If you see a "hold" you didn't want, that's the padding, not corruption.
  • Grid too big to preview - set max_long_edge.

Honestly, most people who need this end up installing an entire image-processing suite just for it. This node does the one job, does it predictably, and doesn't drag in dependencies. For side-by-side video comparisons and contact sheets it's the least-effort path in this pack.

Categorypainter/image

Inputs (3)

NameTypeDefaultDescription
imagesCOMFY_AUTOGROW_V3
directionCOMBOdown4 options: right, left, down, up
max_long_edgeINT00–8192If > 0, scale down the final concatenated result so that its longest edge does not exceed this value. Aspect ratio is preserved. 0 means no constraint.

Outputs (1)

NameTypeDescription
imageIMAGE