Nodes/ComfyUI Layer Style/LayerStyle: InnerShadow
ComfyUI Node Runs on cloud

LayerStyle: InnerShadow

InnerShadow — a Photoshop inset shadow, cast inward

By chflame163·Created 3 years ago·Updated 8 days ago· 3,118
LayerStyle: InnerShadow
  • background_image
  • layer_image
  • layer_mask
  • image
â—„invert_masktrueâ–º
◄blend_mode▾►
â—„opacity50â–º
â—„distance_x5â–º
â—„distance_y5â–º
â—„grow2â–º
â—„blur15â–º
â—„shadow_color#000000â–º

Where Drop Shadow makes a subject look like it's floating above a surface, Inner Shadow makes it look pressed into one - a soft shadow cast just inside the edge, like the shape has been recessed or embossed into the background. It's Photoshop's Inner Shadow layer style, same job here.

Reach for it when you want a subject to read as inset rather than layered on top: a badge or button stamped into a surface, a recessed panel, a subtle "carved" look on text or an icon. It's a smaller, more subtle effect than Drop Shadow by nature, and the node's defaults reflect that.

How it works

The mask defines the subject's boundary. The node builds a shadow shape from that mask, offsets it by distance_x/distance_y, grows or shrinks it, blurs it soft, and composites it inside the shape rather than behind it - the inverse geometry of Drop Shadow. Notice the defaults: distance_x/distance_y default to 5/5 here versus Drop Shadow's 25/25, and grow defaults to 2 versus 6 - this effect is meant to stay subtle and tight to the edge, not to project a shadow well past the subject.

The inputs and outputs that matter

  • distance_x / distance_y (default 5/5) - the inset shadow's offset. Small values keep it reading as "recessed"; push them further and it starts looking like a second, misaligned shape.
  • blur (default 15) - softness of the inset shadow's edge.
  • grow (default 2) - how far the shadow shape extends from the boundary.
  • opacity (default 50) - inset shadows read best when they're not pure black.
  • shadow_color (default #000000, hex).
  • invert_mask (default true) - flip if the shadow lands outside the subject instead of inside it.
  • background_image, layer_image, optional layer_mask, plus blend_mode (19 options) and opacity.

Output: a single composited image.

How to install it

Ships with the ComfyUI Layer Style pack. ComfyUI Manager → search ComfyUI Layer Style → install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle
pip install -r ComfyUI_LayerStyle/requirements.txt

then restart. Lives under 😺dzNodes → LayerStyle. No models needed.

Common issues & troubleshooting

Shadow looks like it's floating outside the subject rather than pressed into it. invert_mask - same story as everywhere else in this pack, and the symptom here is unmistakable since an inverted inner-shadow effectively becomes an outer one. Flip it.

Effect is invisible or too subtle to see. That's expected at the defaults if your subject is small in the frame - distance_x/distance_y and grow are tuned for a tight, subtle inset, so scale them up a little on a larger subject rather than assuming the node isn't doing anything.

Looks too harsh, more like a dark ring than a soft inset. Raise blur and pull opacity down a touch. A crisp inner shadow reads as a stroke; a soft one reads as depth.

Node's not showing up. Pack import failure, not this node. LayerStyle's dependency chain is long and a broken transformers/TensorFlow combo is the classic way the whole pack - every node in it - fails to load at once. There's also an InnerShadow V2 in this pack with the same controls and a fuller 30-mode blend list, worth defaulting to for new work.

Category😺dzNodes/LayerStyle

Inputs (11)

NameTypeDefaultDescription
background_imageIMAGE—
layer_imageIMAGE—
invert_maskBOOLEANtrue—
blend_modeCOMBO19 options: normal, multply, screen, add, subtract, difference, +13
opacityINT500–100—
distance_xINT5-9999–9999—
distance_yINT5-9999–9999—
growINT2-9999–9999—
blurINT150–100—
shadow_colorSTRING#000000—
layer_maskoptMASK—

Outputs (1)

NameTypeDescription
imageIMAGE—