Nodes/ComfyUI_Fill-Nodes/FL Image Overlay
ComfyUI Node

FL Image Overlay

The compositor node that replaces four separate nodes

By filliptm·Created 3 years ago·Updated about 12 hours ago· 628
FL Image Overlay
  • base_image
  • overlay_image
  • mask
  • IMAGE
x_offset0
y_offset0
alignmentcustom
resize_overlaynone
blend_modenormal
opacity1.00
invert_maskfalse
mask_feather0
boundary_behaviorclip
show_previewfalse

Compositing one image onto another in ComfyUI usually means chaining several nodes: resize the overlay, position it, apply a mask, blend it in, maybe feather the edge. FL_ImageOverlay does all of that in one node - alignment presets, scaling, five real blend modes, opacity, mask feathering, and a choice of what happens when the overlay hangs off the edge of the base image. If you've been stitching together a mini-pipeline of separate resize/position/blend nodes for something this common, this is the node that collapses it.

The core inputs. base_image and overlay_image are your two layers, and mask - required, not optional - defines where the overlay shows through. If you want to overlay a fully opaque rectangular image with no transparency at all, don't expect to skip the mask input; feed it a solid white mask instead (an all-white FL_ImageBlank run through FL_ImageToMask works fine for this).

Positioning has two independent systems and it matters which one is actually in control. alignment offers nine named anchor points (top-left, center, bottom-right, and so on) plus custom, which is the default - and custom is the one that actually uses x_offset/y_offset (−8192 to 8192 each). If you've set offsets and nothing seems to move, check alignment isn't still sitting on a named preset, because a named preset overrides the manual offsets entirely.

Sizing goes through resize_overlay: none leaves it as-is, fit_to_base stretches or fits it to the base image's dimensions, and the scale_50% through scale_200% options resize it relative to its own original size rather than the base.

Blending is blend_mode (normal/multiply/screen/overlay/add - the familiar Photoshop-style equations, with normal being a straight masked paste) at a given opacity (0–1). invert_mask flips which side of the mask counts as "show," and mask_feather (0–100) softens the mask edge so the composite doesn't have a hard cutout line.

boundary_behavior decides what happens when a positioned, scaled overlay would extend past the base image's edges: clip (default) crops whatever hangs off, extend_canvas grows the output to fit the whole overlay instead. And show_preview toggles an on-node visual preview so you can iterate on alignment and blending without re-running everything downstream each time.

One IMAGE output - the composited result.

Installing it follows the pack's standard pattern: search "Fill-Nodes" in ComfyUI Manager, or clone it directly -

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
  • then restart ComfyUI. No extra dependencies beyond PIL, already core to this pack.

Where people get burned. Beyond the alignment/offset conflict above, the other common trap is boundary_behavior defaulting to clip - if part of your overlay is quietly missing from the output and you positioned it near an edge, that's clip cropping it, not a bug; switch to extend_canvas if you need the full overlay visible regardless of where it lands. And since mask is a required input rather than optional, forgetting it isn't something the node will silently work around - you need a real mask wired in every time, even for the simplest full-image overlay.

Category🏵️Fill Nodes/Image

Inputs (13)

NameTypeDefaultDescription
base_imageIMAGE
overlay_imageIMAGE
maskMASK
x_offsetINT0-8192–8192
y_offsetINT0-8192–8192
alignmentCOMBOcustom10 options: custom, center, top-left, top-center, top-right, center-left, +4
resize_overlayCOMBOnone7 options: none, fit_to_base, scale_50%, scale_75%, scale_125%, scale_150%, +1
blend_modeCOMBOnormal5 options: normal, multiply, screen, overlay, add
opacityFLOAT1.000–1
invert_maskBOOLEANfalse
mask_featherINT00–100
boundary_behaviorCOMBOclip2 options: clip, extend_canvas
show_previewBOOLEANfalse

Outputs (1)

NameTypeDescription
IMAGEIMAGE