ComfyUI Node Runs on cloud

Image Overlay

Image Overlay

By jags111·Created 3 years ago·Updated 4 months ago· 1,485
Image Overlay
  • base_image
  • overlay_image
  • optional_mask
  • IMAGE
overlay_resize
resize_method
rescale_factor1.00
width512
height512
x_offset0
y_offset0
rotation0
opacity0.0

Image Overlay drops one image on top of another with control over size, position, rotation and opacity. Think watermark, logo, a generated sticker composited onto a background, or one output layered over another. It's the odd node out in a pack that's mostly about sampling - a straightforward compositing utility - but it's genuinely handy and it works on image batches, not just single frames.

How it works

You give it a base_image (the bottom layer) and an overlay_image (the thing on top), then position and blend the overlay. There's an optional mask input if you want the overlay to only show through certain regions. That's the whole model: base underneath, overlay on top, knobs to place it.

The inputs that matter

  • base_image / overlay_image - bottom and top layers.
  • overlay_resize - how the overlay gets sized before compositing: None (leave it), Fit, Resize by rescale_factor, or Resize to width & heigth (yes, the typo is in the node). Pick None if your overlay is already the right size.
  • rescale_factor - the multiplier used when you chose the rescale option.
  • width / height - the target size when you chose resize-to-dimensions.
  • x_offset / y_offset - where the overlay sits, in pixels. These accept large negative and positive values, so you can slide the overlay partly off-canvas.
  • rotation - spin the overlay, roughly -180 to 180 degrees.
  • opacity - a 0–100 blend amount. This one defaults to 0, so if you drop the node in and your overlay doesn't appear, this is the first knob to check - bump it up.

The optional optional_mask input restricts where the overlay lands. The single output is IMAGE.

Installing it

ComfyUI Manager → search Efficiency Nodes for ComfyUI, or:

cd ComfyUI/custom_nodes
git clone https://github.com/jags111/efficiency-nodes-comfyui

Restart after. No models or extra dependencies for this node.

Common issues

The classic "my overlay isn't showing up" is almost always one of two things: opacity left at its default, or the overlay sized/positioned so it's off-canvas or shrunk to nothing. Check opacity first, then your overlay_resize choice and offsets.

Size mismatches are the other gotcha - if base and overlay are wildly different dimensions and you left overlay_resize on None, the overlay lands at its own size wherever the offsets put it, which may not be what you pictured. Choose a resize mode that matches your intent.

If the node doesn't appear at all, that's the pack-level import issue - check the console for IMPORT FAILED (often a pip freeze error), and update ComfyUI, the packages and the node. This pack also tends to break on ComfyUI frontend updates, with updating the node to the latest commit being the usual fix.

CategoryEfficiency Nodes/Image

Inputs (12)

NameTypeDefaultDescription
base_imageIMAGE
overlay_imageIMAGE
overlay_resizeCOMBO4 options: None, Fit, Resize by rescale_factor, Resize to width & heigth
resize_methodCOMBO3 options: nearest-exact, bilinear, area
rescale_factorFLOAT1.000.01–16
widthINT5120–16384
heightINT5120–16384
x_offsetINT0-48000–48000
y_offsetINT0-48000–48000
rotationINT0-180–180
opacityFLOAT0.00–100
optional_maskoptMASK

Outputs (1)

NameTypeDescription
IMAGEIMAGE