ComfyUI Node

DP Stitch 2 Images

Join two images into one strip, four ways

By DesertPixelAi·Created 2 years ago·Updated about a year ago· 25
DP Stitch 2 Images
  • image1
  • image2
  • image_strip
mode

Sometimes you don't need a full compositing pipeline, you just need two images next to each other - a before/after, a reference image glued next to a generation for a ControlNet-style feed, two frames lined up for a comparison post. DP Stitch 2 Images does exactly that one job: two inputs, a direction, one combined image out.

This is also the kind of small, specific utility node that gets recommended in the wild for exactly the thing it does - people point to this pack when someone asks how to line up video/image sequences without building a whole compositing graph for it.

How it works

Feed in image1 and image2, pick a mode - Horizontal_Right, Horizontal_Left, Vertical_Up, or Vertical_Down - and get back one combined image. The mode names describe which side image2 lands on relative to image1: horizontal modes place them side by side, vertical modes stack them, and the direction word (Right/Left/Up/Down) tells you which way the second image goes.

Nothing here does blending or feathering at the seam - this is a straight join, not a crossfade. If you want the joint between the two images to look seamless rather than a visible hard line, that's a separate step (this same pack's DP Strip Edge Masks is built for exactly that - generating edge masks along a stitched seam so you can blend it afterward).

Inputs and outputs

Required:

  • image1 / image2 - the two images being joined.
  • mode - Horizontal_Right, Horizontal_Left, Vertical_Up, Vertical_Down.

No optional inputs.

One output: image_strip (IMAGE) - the combined result, ready to save, feed into a comparison view, or hand to another compositing step.

Installing it

ComfyUI Manager: search ComfyUI-Desert-Pixel-Nodes, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes

Restart ComfyUI - plain image-array math, nothing to download.

Where people get tripped up

The one thing that trips up basically every stitching node, this one included: mismatched dimensions on the axis you're not stitching along. Stitching horizontally works cleanly when both images share the same height; stitching vertically wants matching widths. If your two source images came from different aspect ratios or resolutions, resize one to match the other on that shared axis before this node, or expect a result with an unexpected offset or crop rather than the clean join you were picturing.

Beyond that, remember this is a join, not a blend - if you're stitching two generations that are supposed to read as one continuous scene (a panorama-style extension, say), the seam will be visible as a hard edge unless you follow up with feathering. Don't expect this node alone to hide the fact that it's two separate images.

CategoryDP/image

Inputs (3)

NameTypeDefaultDescription
image1IMAGE
image2IMAGE
modeCOMBO4 options: Horizontal_Right, Horizontal_Left, Vertical_Up, Vertical_Down

Outputs (1)

NameTypeDescription
image_stripIMAGE