Nodes/Remade_nodes/Batch Enlarged Overlay
ComfyUI Node

Batch Enlarged Overlay

Overlaying an image on a batch, but slightly bigger — seams and all

By Pheat-AI·Created 2 years ago·Updated 2 years ago· 5
Batch Enlarged Overlay
  • gen_images
  • original_image
  • IMAGE
enlarge_factor1.05

This is the sibling of Batch Image Overlay with one dial added: enlarge_factor. Same idea - take a batch of generated images and a single original_image, paste the original on top of each frame - except the original is scaled up a touch first, centered, and composited. Default factor is 1.05, so five percent bigger. It's a tiny difference, and it's exactly the point.

Why would you want the overlay bigger than the image it's being pasted over? The reason this node exists in the same pack as the inpainting helpers: when you've regenerated a region of an original photo, the boundary between the untouched original and the inpainted area can show a hairline seam. Overshooting the paste slightly - letting the original's edges extend a few pixels past their original position - is a cheap way to bury that seam under real pixels. It's not elegant, but it's fast and it works on a batch.

What it actually does

Mechanically: it resizes the original by the factor (LANCZOS, so the quality is respectable), centers the enlarged version on a transparent canvas the size of the original, crops the overflow, and alpha-composites that canvas over each generated frame. Enlarging + centering + cropping means the middle stays put and the edges grow outward.

Inputs and outputs

Three inputs, one output:

  • gen_images (IMAGE) - the batch you're compositing onto.
  • original_image (IMAGE) - the single image, enlarged, pasted on top.
  • enlarge_factor (FLOAT, 1.0–2.0, default 1.05) - the only knob. Past ~1.1 the original visibly eats into the frame; keep it low if you're hiding seams.
  • Output: IMAGE, a batch of the same length.

Where it gets fiddly

  • This one does not resize to match the batch. Unlike its sibling, Batch Enlarged Overlay builds its canvas at the original's own size, then alpha-composites against each generated frame. If the generated frame isn't the same size as the original, alpha_composite throws a size-mismatch error. Different-size inputs here fail loudly; with Batch Image Overlay they fail silently. Worth knowing which failure you're getting.
  • Corners get cropped. The enlargement is centered, so a 5% blowup clips ~2.5% off every edge. Fine for seam-hiding, wrong if you needed the original's full frame.
  • Center-of-image bias. If your seam is near an edge, the enlargement won't cover it as generously.

Installing it

Part of the Remade_nodes pack - install the pack once:

cd ComfyUI/custom_nodes
git clone https://github.com/Pheat-AI/Remade_nodes

Restart ComfyUI, or grab it via ComfyUI Manager by searching Remade_nodes. Nothing to download beyond the code; the declared dependency is numpy (with the usual caveat that the pack's color-blend node needs OpenCV present - pip install opencv-python if the whole pack fails to load).

Reach for this when you want the overlay slightly oversized, and don't forget it demands matching dimensions where its sibling doesn't. Five percent is a subtle weapon, but it's the right one for hiding a composite seam.

CategoryREMADE/Image

Inputs (3)

NameTypeDefaultDescription
gen_imagesIMAGE
original_imageIMAGE
enlarge_factorFLOAT1.051–2

Outputs (1)

NameTypeDescription
IMAGEIMAGE