ComfyUI Layer Style
A set of nodes for ComfyUI that generate image like Adobe Photoshop's Layer Style.
Currently completed Drop Shadow and OuterGlow nodes, and follow-up work is in progress.
Update
- Commit ImageOpacity node.
- The layer_mask is not a mandatory input. without inputting will use the layer_image's alpha channel. It is allowed to use layers and masks with different shapes, but the size must be consistent.

- Commit ImageBlend node.
- Remove the mask channel output from the DropShadow node; Commit OuterGlow node.
- Commit DropShadow node.
Node Description
Drop Shadow:
- background_image1: The background image.
- layer_image1: Layer image for composite.
- layer_mask1: Mask for layer_image, shadows are generated according to their shape.
- invert_mask: Whether to reverse the mask.
- blend_mode: Blending method of shadows, there are normal, multply, screen, add, subtract, difference, darker and lighter.
- opacity: Opacity of shadow.
- distance_x: Horizontal offset of shadow.
- distance_y: Vertical offset of shadow.
- grow: Shadow expansion amplitude.
- blur:Shadow blur level.
- shadow_color: Shadow color, described in hexadecimal RGB format.
1 The layer_image, layer_mask and the background_image, These three items must be of the same size.
Output type:
- image
OuterGlow:
- background_image1: The background image.
- layer_image1: Layer image for composite.
- layer_mask1: Mask for layer_image, shadows are generated according to their shape.
- invert_mask: Whether to reverse the mask.
- blend_mode: Blending method of glow, there are normal, multply, screen, add, subtract, difference, darker and lighter.
- opacity: Opacity of Glow.
- grow: Glow expansion amplitude.
- blur:Gkow blur level.
- glow_color: Glow color, described in hexadecimal RGB format.
1 The layer_image, layer_mask and the background_image, These three items must be of the same size.
Output type:
- image
ImageBlend:
Composit layer image and background image, multiple blend modes are available for option, and transparency can be set.

- background_image1: The background image.
- layer_image1: Layer image for composite.
- layer_mask1: Mask for layer_image.
- invert_mask: Whether to reverse the mask.
- blend_mode: Blending method of glow, there are normal, multply, screen, add, subtract, difference, darker and lighter.
- opacity: Opacity of blend.
1 The layer_image, layer_mask and the background_image, These three items must be of the same size.。
Output type:
- image
ImageOpacity:
Node option:
- image: Image input, supporting RGB and RGBA. if is RGB, the alpha channel of the entire image will be automatically added.
- mask: Mask input. Attention that if the image input has alpha channel and different masks are input simultaneously, the original alpha channel will be overwritten by the mask.
- invert_mask: Whether to reverse the mask.
- opacity: Opacity of image.
Output type:
- image(RGBA)
- mask
Example workflow
image Some JSON workflow files in the workflow directory, that is example for ComfyUI.
How to install
-
Open the cmd window in the plugin directory of ComfyUI, like "ComfyUI\custom_nodes",type
git clone https://github.com/chflame163/ComfyUI_LayerStyle.gitor download the zip file and extracted, copy the resulting folder to ComfyUI\custom_ Nodes\ -
Install dependency packages, open the cmd window in the WordCloud plugin directory like "ComfyUI\custom_ Nodes\ComfyUI_WordCloud" and enter the following command:
..\..\..\python_embeded\python.exe -m pip install -r requirements.txt -
Restart ComfyUI





