Nodes/ComfyUI-CustomNodePacks/Layer Effect: Inner Glow (MEC)
ComfyUI Node

Layer Effect: Inner Glow (MEC)

Inner glow that stays inside the matte

By Code2Collapse·Created 7 months ago·Updated 2 days ago· 56
Layer Effect: Inner Glow (MEC)
  • layer_image
  • background_image
  • layer_mask
  • image
  • effect_mask
  • report
invert_masktrue
blend_mode
opacity100
brightness5
glow_range48
blur25
light_color#FFBF30
glow_color#FE0000
dissolve_seed0

What it's for

Light coming from behind the edge of a subject, spilling inward. The classic uses: a rim of light where a character is backlit, a translucent material (glass, gummy, fabric) picking up glow from its own boundary, an LED strip inside an enclosure, and - the workhorse - making a cut-out subject feel lit by the scene it was pasted into instead of lit by the studio it came from.

It's the companion to Outer Glow and shares its parameters and its code path; the difference is that the footprint is clipped to the inside of the matte. Which sounds like a small distinction and is the whole effect.

How it works

The matte is grown by glow_range and blurred, then the glow gradient runs across brightness passes from glow_color at the core to light_color toward the edge, is blended onto the plate with blend_mode at opacity, and then everything is masked to the interior of the layer. The subject ends up with a luminous band hugging its own boundary and fading into its centre.

effect_mask is the glow footprint: the band inside the matte, blurred by the same falloff. It's the honest output of this node - if you want to add haze, grain, or a colour shift only inside the glow region, this is the matte to use, and it saves you rebuilding the same falloff by hand.

Inputs

  • layer_image - the subject. Alpha counts if you don't wire a mask.
  • layer_mask (optional) - the matte. You need one of the two; a 3-channel image with nothing connected raises needs a layer mask instead of silently doing nothing.
  • invert_mask - defaults to true, and it genuinely inverts the matte. A standard ComfyUI mask is white-on-subject, so leaving the default puts your glow on the outside of the subject and clips it there - genuinely confusing to debug. Flip it first.
  • brightness - 2–20 passes, default 5. This is glow density: how many stacked passes build the core.
  • glow_range - the initial spread, clamped internally to frame size.
  • blur - default 25. Bigger - the falloff into the subject, so this is the parameter that decides whether the glow reads as light or as paint.
  • light_color / glow_color - inner-stop to outer-stop. For a believable rim light both should be tints of the same hue, with the edge stop brighter.
  • blend_mode (30 modes; the light-family modes are at the top of the list for the glow nodes), opacity, dissolve_seed - dissolve is stochastic, and the seed is fixed here so a dissolve holds still across frames, where upstream's per-frame reseed made them flicker.
  • background_image (optional) - the plate. Empty = transparent canvas (black in the RGB output).

Outputs: image, effect_mask, report.

Settings that work

An inner glow is the easiest of these effects to overdo, because a bright band inside a silhouetted subject reads as a halo on the subject rather than light near it. Start at opacity 30–50, blur 20–30, glow_range 8–15, brightness 4–6, screen, and colours that are only a little brighter than the subject. The tell that you've gone too far: you can see the glow's inner boundary as a curve of its own rather than as light fading to nothing.

The genuinely useful variant: put the layer's own colour in glow_color and something a couple of stops brighter in light_color, then use effect_mask downstream to lift the exposure of just the rim. That's how you fake a backlight without regenerating anything.

Note the glow is generated from the matte, so it doesn't know anything about the subject's actual surface. On a subject with internal structure (hair, foliage, mesh) an inner glow will trace every strand, which is occasionally exactly right and usually a mess. Feather the matte upstream if you want the glow to wrap the whole silhouette rather than thread itself through it.

Install

ComfyUI Manager → search "CustomNodePacks", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks

Restart and watch for the pack's load line in the console. This is a torch-native port of the upstream ComfyUI_LayerStyle glow nodes, standalone - you do not need that several-hundred-node pack with its multi-page README, heavy dependency list and API-calling nodes installed to get this one effect. Tier 1: no models, no VRAM. And per the README: check pip list before installing the pack's requirements; it lists libraries ComfyUI already ships.

Common issues

  • Glow is outside the subject. invert_mask on its default. Flip it.
  • Nothing renders, just an error. No matte connected and no alpha in the image. Wire layer_mask or use an RGBA layer.
  • The glow has hard edges. blur too low for the glow_range you set. They scale together or it looks like an outline drawn with a marker.
CategoryMEC/LayerEffects

Inputs (12)

NameTypeDefaultDescription
layer_imageIMAGE
invert_maskBOOLEANtrue
blend_modeCOMBO30 options: screen, linear dodge(add), color dodge, lighten, dodge, hard light, +24
opacityINT1000–100
brightnessINT52–20Number of glow passes from core to edge.
glow_rangeINT48-9999–9999Initial spread for the outer glow; clamped to frame size.
blurINT250–9999
light_colorSTRING#FFBF30
glow_colorSTRING#FE0000
dissolve_seedINT00–2147483647Only used by the 'dissolve' blend mode. Upstream reseeds every frame, so a dissolve flickers through a sequence; a fixed seed here holds still.
background_imageoptIMAGE
layer_maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
effect_maskMASK
reportSTRING