JoinImages
Glue two images side-by-side or stacked
- image_a
- image_b
- image
Sometimes you don't need a whole grid, you just need two images next to each other - a before and after, a caption strip glued under a render, or one step of a sweep placed next to the previous one for comparison. JoinImages does exactly that: two images in, one combined image out.
How it works
It concatenates the two image tensors along whichever axis your mode picks - width for horizontal, height for vertical - using a plain torch.concat. That means the two images need to already agree on the other dimension: for a horizontal join they need matching heights, for a vertical join they need matching widths, or the concat throws a shape-mismatch error. There's no automatic resizing or padding here; it's a literal stitch, not a smart layout tool.
The inputs and outputs that matter
image_a/image_b(IMAGE) - the two images to glue together.mode-horizontal(side by side) orvertical(stacked).
Output is a single image, the combined result. A common pattern in this pack is StringToImage or ProgressBar feeding one side of a JoinImages call, so a caption or status bar ends up permanently attached to whichever real output it belongs to.
How to install it
Via ComfyUI Manager: search comfyui-job-iterator, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ali1234/comfyui-job-iterator
then restart. No dependencies - this uses only torch, which ComfyUI already depends on.
Common issues & troubleshooting
"Sizes of tensors must match" error. This is the one you'll hit most. Horizontal join needs equal heights, vertical needs equal widths - if your caption strip from StringToImage is a different width than your main render, a vertical stack will fail. Match the dimension explicitly (StringToImage's width/height inputs let you set it to line up).
You actually have a whole batch, not just two images. This node only takes exactly two named inputs, image_a and image_b - it will not accept an arbitrary-sized IMAGE batch. The pack ships a separate node for that job (tiling an entire batch into one grid); if you're trying to lay out every step of a big sweep at once rather than just two images, that's the one you want instead.
The result looks squished or offset. Since there's no automatic scaling, any pre-existing size mismatch on the matching dimension (the one that's supposed to line up) will still concat - Torch doesn't require exact equality there in every case depending on batch shape - but you'll get a lopsided result. Resize both images to the same target size upstream if you want a clean join.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image_a | IMAGE | — | |
| image_b | IMAGE | — | |
| mode | COMBO | horizontal | 2 options: horizontal, vertical |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |