Layer Effect: Inner Glow (MEC)
Inner glow that stays inside the matte
- layer_image
- background_image
- layer_mask
- image
- effect_mask
- report
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 maskinstead 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_maskon its default. Flip it. - Nothing renders, just an error. No matte connected and no alpha in the image. Wire
layer_maskor use an RGBA layer. - The glow has hard edges.
blurtoo low for theglow_rangeyou set. They scale together or it looks like an outline drawn with a marker.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| layer_image | IMAGE | — | |
| invert_mask | BOOLEAN | true | — |
| blend_mode | COMBO | 30 options: screen, linear dodge(add), color dodge, lighten, dodge, hard light, +24 | |
| opacity | INT | 1000–100 | — |
| brightness | INT | 52–20 | Number of glow passes from core to edge. |
| glow_range | INT | 48-9999–9999 | Initial spread for the outer glow; clamped to frame size. |
| blur | INT | 250–9999 | — |
| light_color | STRING | #FFBF30 | — |
| glow_color | STRING | #FE0000 | — |
| dissolve_seed | INT | 00–2147483647 | Only used by the 'dissolve' blend mode. Upstream reseeds every frame, so a dissolve flickers through a sequence; a fixed seed here holds still. |
| background_imageopt | IMAGE | — | |
| layer_maskopt | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| effect_mask | MASK | — |
| report | STRING | — |