PDIMAGE:ImageCombine
ImageCombine — the batch-friendly two-image stitcher
- image1
- image2
- IMAGE
This is the other image-stitcher in the PDuse pack, and the difference between it and PD:imageconcante_V1 matters: PDIMAGE:ImageCombine is built for batches. Where the V1 concat assumes matched batch sizes, this one actively reconciles mismatches - it repeats the smaller batch to match the larger, rescales image2 to sit against image1, aligns alpha channels, and then concatenates. It's the version you want when you're joining two streams of frames, not just one pair.
The author's own description is one line - "Concatenates image2 to image1 in the specified direction" - which undersells the batch handling that makes it worth its own page.
How it works
Four steps, in order, straight from the source:
- Batch reconciliation. If the two inputs have different batch counts, the smaller is repeated (with
torch.repeat) until both match. So a 1-frame image2 against a 30-frame image1 becomes 30 frames of image2 repeated - the join runs for every frame. - Size matching. With
match_image_sizeon (default), image2 is rescaled (Lanczos) so its shared axis matches image1's - height for left/right joins, width for up/down - preserving image2's aspect ratio. With it off, images are joined as-is and you own the size mismatch. - Channel alignment. If one image has an alpha channel and the other doesn't, the missing channel is padded with ones (opaque). This is what keeps transparent PNG joins from erroring or going black.
- The concat.
torch.catalong the width (left/right) or height (up/down) axis, withleft/upplacing image2 first.
The inputs that matter
- image1 / image2 (
IMAGE) - both required here (unlike the V1, no pass-through if image2 is missing). - direction -
right(default) /down/left/up. - match_image_size (
BOOLEAN, default on) - rescale image2 to image1's axis before joining.
One output: IMAGE.
Where it earns its place
Batch contact sheets and frame-aligned comparisons. Feed it two batches of equal-length generations - "all the A renders" and "all the B renders" - and out comes one batch of side-by-side pairs, ready to save as a comparison grid. The batch-repeat behavior also lets you tile a single watermark/overlay across a whole batch, though for that job a dedicated overlay node is usually cleaner.
The honest trade: with match_image_size on, image2's width in a left/right join is derived from its own aspect ratio, not forced to match image1's width - so you can get asymmetric panels when the two images have very different shapes. If you need identical panel sizes, the V1's crop by image1 mode is the better fit; this node is the batch-handling specialist.
Install
ComfyUI Manager: search PDuse (repo 7BEII/Comfyui_PDuse), install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/7BEII/Comfyui_PDuse
cd Comfyui_PDuse
pip install -r requirements.txt
Restart and it appears as PDIMAGE:ImageCombine under PDuse/Image. The pick when your stitching job involves more than one frame at a time.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image1 | IMAGE | — | |
| image2 | IMAGE | — | |
| direction | COMBO | right | 4 options: right, down, left, up |
| match_image_size | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |