ComfyUI > Nodes > ComfyUI > Stitch Images

ComfyUI Node: Stitch Images

Class Name

ImageStitch

Category
image/transform
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Stitch Images Description

Combine images seamlessly for panoramic views, extensions, and visual element merging with flexible vertical or horizontal stitching, resizing, and padding capabilities.

Stitch Images:

The ImageStitch node is designed to seamlessly combine two images into a single cohesive image. This node is particularly useful for AI artists who want to create panoramic views, extend images, or merge different visual elements into a unified composition. By allowing images to be stitched either vertically or horizontally, the node provides flexibility in how images are combined. It can handle images of different sizes by resizing or padding them to ensure a smooth transition between the stitched images. This capability is essential for maintaining the visual integrity of the final image, making it a valuable tool for creative projects that require image manipulation and enhancement.

Stitch Images Input Parameters:

image1

image1 is the first image to be used in the stitching process. It serves as the base image to which the second image will be attached. The dimensions and properties of image1 can influence the final output, especially if resizing or padding is required to match the dimensions of image2.

image2

image2 is the second image that will be stitched to image1. If image2 is not provided, image1 will be returned unchanged. The dimensions of image2 may be adjusted to match image1 depending on the stitching direction and whether resizing is enabled.

direction

The direction parameter determines the orientation of the stitching process. It can be set to "up", "down", "left", or "right", indicating where image2 will be attached relative to image1. This parameter is crucial for defining the layout of the final stitched image.

resize

The resize parameter is a boolean that indicates whether image2 should be resized to match the dimensions of image1. If set to True, image2 will be resized while preserving its aspect ratio to ensure a seamless stitch. This is particularly useful when the images have different dimensions.

padding

padding specifies the amount of space to be added between image1 and image2 during the stitching process. This can be useful for creating a visual separation between the images or accommodating differences in their dimensions.

padding_color

padding_color defines the color of the padding added between the images. This parameter allows you to choose a color that complements the images or matches the overall aesthetic of the composition. Common options include "white", "black", or any other color that suits the design.

Stitch Images Output Parameters:

result

The result is the final stitched image, which combines image1 and image2 according to the specified parameters. This output is a single image tensor that reflects the chosen direction, resizing, and padding settings. The result is ready for further processing or display, providing a seamless and visually appealing combination of the input images.

Stitch Images Usage Tips:

  • To create a panoramic effect, use the direction parameter to stitch images horizontally and ensure resize is set to True for consistent height.
  • When combining images with different aspect ratios, consider using padding to maintain visual balance and avoid distortion.
  • Experiment with different padding_color options to enhance the visual transition between stitched images.

Stitch Images Common Errors and Solutions:

Image dimensions do not match

  • Explanation: This error occurs when the images have incompatible dimensions and resizing is not enabled.
  • Solution: Enable the resize parameter to automatically adjust the dimensions of image2 to match image1.

Invalid direction specified

  • Explanation: The direction parameter has been set to an unsupported value.
  • Solution: Ensure the direction is set to one of the valid options: "up", "down", "left", or "right".

Padding color not recognized

  • Explanation: The padding_color parameter is set to a color that is not supported.
  • Solution: Use a standard color name like "white" or "black", or ensure the color is specified in a recognized format.

Stitch Images Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Stitch Images