FL Image Overlay
The compositor node that replaces four separate nodes
- base_image
- overlay_image
- mask
- IMAGE
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.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| base_image | IMAGE | — | |
| overlay_image | IMAGE | — | |
| mask | MASK | — | |
| x_offset | INT | 0-8192–8192 | — |
| y_offset | INT | 0-8192–8192 | — |
| alignment | COMBO | custom | 10 options: custom, center, top-left, top-center, top-right, center-left, +4 |
| resize_overlay | COMBO | none | 7 options: none, fit_to_base, scale_50%, scale_75%, scale_125%, scale_150%, +1 |
| blend_mode | COMBO | normal | 5 options: normal, multiply, screen, overlay, add |
| opacity | FLOAT | 1.000–1 | — |
| invert_mask | BOOLEAN | false | — |
| mask_feather | INT | 00–100 | — |
| boundary_behavior | COMBO | clip | 2 options: clip, extend_canvas |
| show_preview | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |