Multiple Image Stitch
Stitch N Images Into One — Without the Batch Math
- image_1
- image_2
- image_3
- stitched_image
- image_list
You've got five generated panels and you want them as one image. Or you outpainted a scene in tiles and want to reassemble the grid. Or you just want a row of candidates side by side so you can eyeball them without a photo editor. Multiple Image Stitch is the node that does that without you hand-wiring torch.cat gymnastics, and it's the reason most people find this pack at all.
It comes from judian17's small ComfyUI-multiple-inputs collection, which also ships the mask and text helpers on these pages. It's a utility node, not a generation node: no model files, no downloads, no API. You feed it images, you get one stitched image back.
How it works
The mechanism is simple but friendlier than doing it yourself. Every image you connect - including whole batches and lists - gets flattened into individual frames. The node takes your first image as the dimension reference, then resizes everything else so the seams line up:
direction= "right" matches all images to the first image's height, scaling widths to keep aspect ratio, then glues them left to right.direction= "down" matches widths instead and stacks vertically.
Matching is done with bilinear interpolation, and the code even pads RGB images up to RGBA if anything with an alpha channel shows up, so you don't blow up on a stray transparent PNG. The final size widget optionally resizes the whole result - set it to a target height (for "right") or width (for "down"); -1 leaves it alone.
The inputs that matter
inputcount- how many images you want to stitch, up to 50. This is the one you'll touch most.image_1- your base image; everything else is resized to match its dimensions.direction- "right" or "down". The default "right" is what you want for side-by-side comparisons.size- global resize of the result. Leave at-1unless you're targeting an exact dimension.
Outputs are stitched_image (the single combined IMAGE) and image_list - a flat list of every input frame, handy when you want to turn several separate outputs into a batch for another node like a grid or a save-all.
Installing it
Grab it through ComfyUI Manager (search "ComfyUI-multiple-inputs"), or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/judian17/ComfyUI-multiple-inputs
cd ComfyUI-multiple-inputs
pip install -r requirements.txt
Then restart ComfyUI. The only real dependency is scipy (plus numpy); if you already have a full ComfyUI install those are usually there. No models to download. All four nodes land under the MyTemplate category.
Where people get burned
The classic trap: you change inputcount from 3 to 5 and nothing happens. The node doesn't live-update its ports - you have to click the "Update inputs" button on the node (or right-click → Update inputs) to actually create image_4 and image_5. Until you do, the extra inputs are silently ignored and you get a 3-image stitch. Same in reverse: lower the count and the leftover ports stay until you refresh.
Second gotcha: mismatched dimensions are auto-resized, not cropped. A portrait and a landscape stitched "right" both end up at the first image's height - the landscape just gets skinnier. That's usually fine, but if you wanted pixel-exact tiles you need matching inputs to begin with.
It's a small node with a small job, and it does that job. If you're stitching a panorama of dozens of frames, the batch-flattening alone beats stringing together core ComfyUI image ops.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| inputcount | INT | 32–50 | Number of inputs. |
| image_1 | IMAGE | Base image for dimensions. | |
| direction | COMBO | right | Stitch direction. |
| size | INT | -1-1–8192 | Resize result. -1 to keep original. |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| stitched_image | IMAGE | — |
| image_list | IMAGE | — |