Nodes/zhangp365/ComfyUI-utils-nodes/Image Concatenate of Utils
ComfyUI Node

Image Concatenate of Utils

Gluing up to six images into one, without crashing on empty slots

By zhangp365·Created 2 years ago·Updated 5 months ago· 134
Image Concatenate of Utils
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • IMAGE
directionright

This node glues images together edge to edge - up to six of them, in one of four directions - to build comparison grids, before/after strips, or panel layouts without leaving ComfyUI. It's a direct extension of ImageConcatenate from kijai's KJNodes, one of the most relied-on utility packs in the whole ecosystem, credited by name in this pack's README. Two things get added on top of the original: automatic upscaling when your images don't match in size, and a check for whether an optional image slot is actually empty before trying to use it.

Why the "empty check" addition actually matters

In ComfyUI, an unconnected optional IMAGE input doesn't error - it just doesn't produce a tensor. A naive concatenate node that blindly tries to process image3 through image6 regardless of whether they're wired will crash the moment you leave one unconnected, which is exactly the situation you're in most of the time (you rarely want to concatenate all six). That's almost certainly why this exists as a separate node rather than people just using kijai's original directly for variable-count layouts: it checks each optional slot before touching it, so leaving image4, image5, image6 disconnected just works.

Inputs and outputs

  • image1 / image2 - required, the two images always in play.
  • image3 through image6 - optional, chained on in order if connected.
  • direction - right, down, left, or up, defaulting to right. This is where each subsequent image gets attached relative to what's already been built.

Output: a single IMAGE. If the images you're feeding it don't all share the same dimensions, the added upscale behavior handles the mismatch rather than erroring - worth knowing if you're chaining outputs from different sampling steps or different aspect ratios and expect an exact-size crash instead.

Installing it

ComfyUI Manager: search "ComfyUI-utils-nodes." Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/zhangp365/ComfyUI-utils-nodes

Restart ComfyUI. No extra dependencies beyond what core ComfyUI and KJNodes-style image ops already need - nothing to download, nothing to configure.

Where people get tripped up

The most common confusion is direction doing something other than what you pictured - it dictates where the next image lands relative to the growing composite, not a fixed left-to-right/top-to-bottom grid layout, so switching from right to down mid-graph changes your whole layout shape, not just one join. Second: because mismatched sizes get silently upscaled to fit rather than rejected, a panel that looks subtly blurry on one side is usually a tell that one of your source images was smaller than the others and got stretched up to match - check your source resolutions before assuming something's wrong with the concat itself.

Categoryutils/image

Inputs (7)

NameTypeDefaultDescription
image1IMAGE
image2IMAGE
directionCOMBOright4 options: right, down, left, up
image3optIMAGE
image4optIMAGE
image5optIMAGE
image6optIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE