Image Concat
Side-by-Side Comparisons Without Leaving the Graph
- image1
- image2
- IMAGE
Every once in a while you want two images to be one image: a before/after comparison, a reference next to the result, a row of variants for a contact sheet. imageConcat is the node that does it - it stitches image1 and image2 together into a single image, in any of four directions, with an optional auto-resize to make mismatched sizes behave.
How it works
It's a tensor concatenation - the node joins the two images along the width or height axis depending on your direction choice. right and down put image1 first and append image2; left and up reverse the order, so you can control which side wins the prime position. When match_image_size is on, image2 gets resized (bilinear) to image1's exact dimensions before the join, which is the setting you want when the two images come from different resolutions - like comparing a 512×512 original to a 1024×1024 upscale. Left off, images of different sizes still join, just with an offset edge where the smaller one ends.
It also handles the edge case gracefully: if one input is unwired, it passes the other through, so a comparison node can't crash a batch run just because one branch didn't produce.
The inputs that matter
image1,image2- the two images. Both are IMAGE type, so batches work, but if you're feeding multi-image batches the node joins batch-by-batch.direction-right,down,left, orup.rightis the default and the one you'll use for side-by-side.match_image_size- the toggle that makes mismatched sizes line up. Leave it off for same-size pairs; turn it on for before/after across resolutions.
Output is a single combined image.
Where it's actually useful
The killer use is comparison and review: generate a variant, concat it next to the original, and the pair becomes one image you can save and eyeball - or drop into a feedback workflow. It's also the contact-sheet building block: concat a few results into a row, then concat rows together for a grid, and you've got a one-shot review sheet without exporting anything. If you do any batch iteration at all, this node quietly pays for itself.
Installing it
Part of windfancy/zsq_prompt - search "zsq_prompt" in ComfyUI Manager and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/windfancy/zsq_prompt
then restart. Heavy dependencies install alongside but this node is plain torch work. And the Manager "conflict" flag on zsq_prompt is the pack's generic class names colliding in the manager's index - the community's advice is to ignore it unless you're actually running the other pack it names.
Verdict
Simple, four directions, one thoughtful resize toggle. It's not glamorous, but comparison workflows need exactly this, and it does it without fuss.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image1 | IMAGE | — | |
| image2 | IMAGE | — | |
| direction | COMBO | right | 4 options: right, down, left, up |
| match_image_size | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |