ComfyUI > Nodes > ComfyUI-LogicUtils > Concat 2 Images to Grid

ComfyUI Node: Concat 2 Images to Grid

Class Name

ConcatTwoImagesNode

Category
image
Author
aria1th (Account age: 3016days)
Extension
ComfyUI-LogicUtils
Latest Updated
2026-01-21
Github Stars
0.1K

How to Install ComfyUI-LogicUtils

Install this extension via the ComfyUI Manager by searching for ComfyUI-LogicUtils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-LogicUtils 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

Concat 2 Images to Grid Description

Merges two images into one, with options for horizontal/vertical alignment and resizing/padding.

Concat 2 Images to Grid:

The ConcatTwoImagesNode is designed to seamlessly merge two images into a single composite image. This node is particularly useful for artists and designers who want to create a unified visual by aligning two separate images either side by side or one above the other. The node offers flexibility in how the images are combined, allowing you to choose between horizontal and vertical concatenation. Additionally, it provides options to either resize the images to match dimensions or pad them to maintain their original size while ensuring alignment. This functionality is essential for creating cohesive image grids or layouts without manually adjusting each image, thus saving time and effort in the creative process.

Concat 2 Images to Grid Input Parameters:

imageA

imageA is the first image to be used in the concatenation process. It serves as one of the two primary inputs for the node. The image should be in a compatible format, typically an image object, and it will be combined with imageB according to the specified direction and match method. There are no specific minimum or maximum values for this parameter, as it is an image input.

imageB

imageB is the second image input for the concatenation process. Like imageA, it should be in a compatible image format. This image will be aligned with imageA based on the chosen direction and match method. The node does not impose specific size constraints on this parameter, allowing for flexibility in the images you choose to combine.

direction

The direction parameter determines how the two images will be aligned. It offers two options: "horizontal" and "vertical". When set to "horizontal", the images are placed side by side, while "vertical" stacks them one on top of the other. The default value is "horizontal", providing a straightforward way to create side-by-side image layouts.

match_method

The match_method parameter specifies how the images' dimensions should be aligned. It offers two options: "resize" and "pad". Choosing "resize" will scale the images so that their matching dimension (height for horizontal, width for vertical) is the same, ensuring a seamless join. Alternatively, "pad" retains the original image sizes but adds padding to align the matching dimension. The default setting is "resize", which is ideal for maintaining image proportions while ensuring alignment.

Concat 2 Images to Grid Output Parameters:

IMAGE

The output of the ConcatTwoImagesNode is a single composite image, denoted as IMAGE. This output represents the merged result of imageA and imageB based on the specified direction and match method. The resulting image is a cohesive visual that combines the two inputs into one, making it suitable for further processing or direct use in creative projects.

Concat 2 Images to Grid Usage Tips:

  • To create a seamless side-by-side image layout, use the "horizontal" direction with the "resize" match method to ensure both images align perfectly in height.
  • If you want to maintain the original size of your images while aligning them, choose the "pad" match method. This is particularly useful when the images have different aspect ratios but need to be presented together.
  • Experiment with both "horizontal" and "vertical" directions to see which layout best suits your creative vision, especially when working with images of varying orientations.

Concat 2 Images to Grid Common Errors and Solutions:

Image format not supported

  • Explanation: This error occurs when the input images are not in a compatible format that the node can process.
  • Solution: Ensure that both imageA and imageB are in a standard image format, such as JPEG or PNG, before inputting them into the node.

Mismatched image dimensions

  • Explanation: This error might arise if the images cannot be resized or padded to match dimensions due to extreme size differences.
  • Solution: Consider manually resizing the images to more similar dimensions before using the node, or adjust the match method to "pad" to accommodate size differences.

Concat 2 Images to Grid Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-LogicUtils
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.

Concat 2 Images to Grid