Nodes/ComfyUI_StarNodes/⭐ Star Apply Overlay (Depth)
ComfyUI Node

⭐ Star Apply Overlay (Depth)

Blend an edit back onto the original without the cut-and-paste look

By Starnodes2024·Created 2 years ago·Updated 3 days ago· 103
⭐ Star Apply Overlay (Depth)
  • source_image
  • filtered_image
  • depth_image
  • mask
  • image
strength100
invert_maskfalse
show_previewtrue
blur_mask_px0

You've been here: you ran a depth-based relight, or a filter pass, or an upscale on some version of an image, and now you want that result sitting on top of the original - but a hard alpha composite looks like a sticker, and doing it by hand in an editor is ten minutes of fiddling. StarApplyOverlayDepth is the node for that moment. It composites a filtered_image over a source_image with a strength dial, optional masking, and an optional depth map to make the blend behave.

How it works

Two images in, one image out. The strength control (0–100, default 100) is your blend slider - at 100 you get the full filtered result, lower it to let the original show through. Think of it as the "how much of this pass do I actually want" knob, which is more useful than it sounds because depth-processed images are often too aggressive at full strength.

The interesting inputs are the optional ones:

  • depth_image - this is the "(Depth)" in the name. When you supply a depth map, the blend respects scene structure instead of being a flat mix. White-is-close depth maps mean near objects get treated differently from the distant background, which is exactly what kills the sticker look when you're compositing relit or filtered geometry.
  • mask with invert_mask - limit the overlay to a region. Edits one area, leaves the rest of the original untouched.
  • blur_mask_px (0–256) - feather the mask edge so the transition is soft instead of a razor line. For faces and fine detail this is often the difference between "looks composited" and "looks natural."
  • show_preview - a live preview of the result while you tune.

When to reach for it

The natural home is a relight/refinish pipeline: depth-map a portrait, run your filter or relight, then overlay it back at partial strength so you keep the original's texture instead of the plastic look. It's also handy any time you have a region-edit workflow producing a "fixed" image you want to graft onto the source with a feathered mask - the depth and blur inputs are what save you from visible seams.

Output image goes wherever your pipeline ends - usually straight into a Save Image or a preview node.

Install

Nothing special here: ComfyUI_StarBetaNodes is the retired beta repo, and the nodes now ship in the main ComfyUI_StarNodes repo - the README says so outright. Install that one:

  • ComfyUI Manager → search Starnodes → install → restart, or
  • cd ComfyUI/custom_nodes && git clone https://github.com/Starnodes2024/ComfyUI_StarNodes then restart.

Pure Python, no model downloads, no hidden deps. The depth map itself comes from a separate depth-estimation node (Depth Anything V2 has been the community default since 2024) - this node just uses it.

Gotchas

The depth path only helps if your depth map matches your source image's structure - feed it a depth map from a different image and the blend gets weird, so keep the map and source paired. And remember strength is a percentage, not a multiplier: 50 means "half the overlay," and for relight passes people usually end up around 30–70, not 100. Start at full strength, dial back, and let the blur do the polish.

Category⭐StarNodes/Image And Latent

Inputs (8)

NameTypeDefaultDescription
source_imageIMAGE
filtered_imageIMAGE
strengthINT1000–100
depth_imageoptIMAGE
maskoptMASK
invert_maskoptBOOLEANfalse
show_previewoptBOOLEANtrue
blur_mask_pxoptINT00–256

Outputs (1)

NameTypeDescription
imageIMAGE