Nodes/ComfyUI 1hewNodes/Multi Image Overlay
ComfyUI Node

Multi Image Overlay

Stack image layers in the graph, no Photoshop tab needed

By 1hew·Created about a year ago·Updated 7 days ago· 33
Multi Image Overlay
  • image_1
  • image
fit_modecenter
color1.0

Compositing in ComfyUI is usually a mess of separate blend nodes wired in a row. Multi Image Overlay does it in one node: feed it several layers, and it alpha-composites them from top to bottom into a single image. It's the "stack of layers" operation that Photoshop users take for granted, minus the export step.

The layering order is the first thing to internalize: image_1 is the topmost layer, and higher numbers sink toward the background. That's the opposite of most people's instinct, where 1 sounds like the base. Get it backwards and your whole composition flips.

How it works

Layers are processed in numeric order, each one composited over the stack below it using normal alpha blending - an RGBA input uses its alpha channel for transparency, and an RGB input counts as fully opaque. The canvas starts as the first (topmost) layer, and each layer below is fitted to it before blending, using the fit_mode:

  • center (default) - keeps the layer's native size, centered on the canvas.
  • top_left - pins it to the top-left corner.
  • stretch - resizes each layer to the full canvas, which is your "I want them all to occupy the same frame" option.

color sets the background, default "1.0" (white). And, like the pack's other multi-image nodes, if any input carries an alpha channel, everything is promoted to RGBA first so transparency survives the whole stack.

The inputs and output

  • fit_mode, color, and image_1 (required). Wire image_2...image_N as you add layers - the node picks up every image_X input dynamically.
  • Output: a single image tensor - the fully composited result.

When it beats the alternatives

Any workflow that builds an image from parts - watermarking, text-over-frame cards, compositing a subject over a background, layering effects before a final upscale - is one node instead of a tangle of blend nodes. It also handles batches, which is the hidden gem: if every input layer is a batch of the same length, the whole stack composites per-frame, so you can watermark or label every frame of a video batch in one pass. That per-batch behavior is worth testing before you rely on it with uneven batch sizes, though.

Installing it

ComfyUI Manager, search "ComfyUI 1hewNodes", install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes

Pack-wide caveat: install pulls the repo's full dependency list (opencv, rembg, ultralytics, transformers...) even though compositing here is pure torch math.

Gotchas

Order, order, order - image_1 on top, and the background you actually want must be the highest-numbered layer. And center mode means layers smaller than the canvas float centered with their own edges visible, so if your layers differ in size and you expected everything to fill the frame, switch to stretch. If something comes out black or blank, check the background color - the default white only shows through where layers don't cover.

Category1hewNodes/multi

Inputs (3)

NameTypeDefaultDescription
fit_modeCOMBOcenter3 options: top_left, center, stretch
colorSTRING1.0
image_1IMAGE

Outputs (1)

NameTypeDescription
imageIMAGE