Skip to main content

Image Stitch

Category: comfy-core
Not to be confused with the WAS Node “Image Stitch.”
They share a name, but the WAS version is more like an artsy scrapbooker, while the comfy-core version is a blunt pixel-joiner that’s here to do one thing: slap two images together in a straight line.

🔍 Overview

The Image Stitch node in comfy-core lets you combine exactly two images into a single output image in one of four cardinal directions: right, left, down, or up.

Think of it as a no-nonsense, four-directional tape gun for images. There’s no blending, no magic AI seam-hiding — just pure “take these pixels and stick them next to each other” energy.

Image Stitch

📁 Function in ComfyUI Workflows

You feed it two images, it outputs one stitched image.
You control:

  • The direction of the stitch (placement of image 2 relative to image 1)
  • Whether both images should be resized to match
  • The spacing width between them (in pixels)
  • The color used for that spacing

It’s perfect for before/after previews, comic panels, side-by-side comparisons, and other “I need these two images in one file” situations.

🧠 Technical Details

  • Inputs:
    • image 1 (IMAGE) – The base image.
    • image 2 (IMAGE) – The image to attach in the chosen direction.
  • Output:
    • IMAGE – The resulting stitched image.
  • Processing: Pixel-level concatenation with optional resizing and fixed-color spacing fill.
  • Performance: Extremely fast — minimal GPU usage, negligible VRAM impact unless images are extremely large.

⚙️ Parameters & Settings (Deep Dive)

1. direction

  • Type: COMBO (Enum)
  • Options:
    • right → Places image 2 to the right of image 1.
    • left → Places image 2 to the left of image 1.
    • down → Places image 2 below image 1.
    • up → Places image 2 above image 1.
  • Why It Matters: This completely changes the layout. If you’re aiming for a horizontal composition, choose left or right. If you want vertical stacking, choose up or down.
  • Changing This Means: Get ready for a different aspect ratio and possibly a total visual composition shift.

2. match_image_size

  • Type: BOOLEAN (True/False)
  • True: Resizes both images so their shared edge dimensions match:
    • For left/right, both images will have the same height.
    • For up/down, both images will have the same width.
  • False: Keeps original image sizes — which may result in mismatched edges.
  • Why It Matters: Without this, stitching different-sized images will cause jagged or uneven seams.

3. spacing_width

  • Type: INTEGER (0 or more)
  • Function: Number of pixels between the two images.
  • Effects:
    • 0 → Images directly touch.
    • Larger numbers → Creates a visible gap.
  • Why It Matters: Helps create visual separation in comparisons or layouts.

4. spacing_color

  • Type: COMBO (Enum)
  • Options:
    • white
    • black
    • red
    • green
    • blue
  • Why It Matters: Ensures your spacing area is filled with a solid, intentional color. Prevents transparency unless you want the gap to scream “unfinished.”
  • Before/After Comparisons – Prompt changes, model swaps, or style shifts.
  • Side-by-Side Evaluations – Model A vs Model B.
  • Storyboarding / Panels – Simple, clean layouts.
  • Reference Prep – Combine inspiration images in a set order.

🛠 Workflow Setup Example

  1. Connect image 1 and image 2 outputs from generation nodes.
  2. Add Image Stitch node and wire both inputs.
  3. Choose direction (right, left, down, up).
  4. Toggle match_image_size ON if you need perfect alignment.
  5. Set spacing_width and spacing_color to taste.
  6. Save or send to next node in the workflow.

🧾 Prompting Tips

  • When planning to stitch, generate both images with matching dimensions — it avoids resizing artifacts.
  • Use spacing to visually clarify “this is two separate renders” when comparing results.
  • If you want invisible seams, set spacing to 0 and ensure colors match at the join.

🔥 What-Not-To-Do-Unless-You-Want-a-Fire

  • Don’t feed it only one image — this is not the “lonely painter” node.
  • Don’t expect it to “blend” — it’s a cut-and-paste machine, not a Photoshop wizard.
  • Don’t stitch ultra-high-res images without enough RAM unless you like crashes.
  • Don’t confuse this comfy-core node with the WAS Node Image Stitch — they are not interchangeable.
  • Don’t set spacing color to something obnoxious unless your goal is to blind viewers.

⚠️ Known Issues

  • Aspect Ratio Changes: Direction changes can drastically alter output proportions.
  • Resizing Softness: With match_image_size ON, resizing may cause slight image softening.
  • Limited Colors: Only 5 preset spacing colors available — no custom hex/RGB.