ComfyUI Layer Style
A set of nodes for ComfyUI that generate image like Adobe Photoshop's Layer Style.
The completed nodes are as follows, and further work is in progress.

Update
- Commit InnerGlow, InnerShadow and MotionBlur nodes.
- Renaming all completed nodes, the nodes are divided into 4 groups:LayerStyle, LayerMask, LayerUtility, LayerFilter. workflows containing old version nodes need to be manually replaced with new version nodes.
- Fix OuterGlow, add 3 new options: brightness, light_color and glow_color.
- OuterGlow node has undergone significant modifications by adding options for brightness, light_color, and glow_color.
- Commit MaskInvert node.
- Commit ColorPick node.
- Commit Stroke node.
- Commit MaskPreview node.
- Commit ImageOpacity node.
- The layer_mask is not a mandatory input now. it is allowed to use layers and masks with different shapes, but the size must be consistent.
- Commit ImageBlend node.
- Commit OuterGlow node.
- Commit DropShadow node.
LayerStyle
DropShadow:
- background_image1: The background image.
- layer_image1: Layer image for composite.
- layer_mask1,2: Mask for layer_image, shadows are generated according to their shape.
- invert_mask: Whether to reverse the mask.
- blend_mode3: Blending mode of shadows.
- 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_color4: Shadow color.
OuterGlow:
- background_image1: The background image.
- layer_image1: Layer image for composite.
- layer_mask1,2: Mask for layer_image, shadows are generated according to their shape.
- invert_mask: Whether to reverse the mask.
- blend_mode3: Blending mode of glow.
- opacity: Opacity of glow.
- brightness: Luminance of light.
- glow_range: range of glow.
- blur:blur of glow.
- light_color4: Light color.
- glow_color4: Edge part color of glow.
InnerShadow:
- background_image1: The background image.
- layer_image1: Layer image for composite.
- layer_mask1,2: Mask for layer_image, shadows are generated according to their shape.
- invert_mask: Whether to reverse the mask.
- blend_mode3: Blending mode of shadows.
- 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_color4: Shadow color.
InnerGlow:
- background_image1: The background image.
- layer_image1: Layer image for composite.
- layer_mask1,2: Mask for layer_image, shadows are generated according to their shape.
- invert_mask: Whether to reverse the mask.
- blend_mode3: Blending mode of shadows.
- 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_color4: Shadow color.
Stroke:
- background_image1: The background image.
- layer_image1: Layer image for composite.
- layer_mask1,2: Mask for layer_image, shadows are generated according to their shape.
- invert_mask: Whether to reverse the mask.
- blend_mode3: Blending mode of stroke.
- opacity: Opacity of stroke.
- stroke_grow: Stroke expansion/contraction amplitude, positive values indicate expansion and negative values indicate contraction.
- stroke_width: Stroke width.
- stroke_color4: Stroke color, described in hexadecimal RGB format.
Annotation for LayerStyle nodes:
1 The layer_image, layer_mask and the background_image(if have input), These three items must be of the same size.。
2 The mask not a mandatory input item. the alpha channel of the image is used by default. If the image input does not include an alpha channel, the entire image's alpha channel will be automatically created. if have masks input simultaneously, the alpha channel will be overwrite by the mask.
3 The blend mode include normal, multply, screen, add, subtract, difference, darker and lighter.
4 The RGB color described by hexadecimal RGB format, like '#FA3D86'.
LayerMask
MaskPreview:
MaskInvert:
Invert the mask
LayerUtility
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,2: Mask for layer_image.
- invert_mask: Whether to reverse the mask.
- blend_mode3: Blending mode.
- opacity: Opacity of blend.
ImageOpacity:
Node option:
- image1: Image input, supporting RGB and RGBA. if is RGB, the alpha channel of the entire image will be automatically added.
- mask1,2 : Mask input.
- invert_mask: Whether to reverse the mask.
- opacity: Opacity of image.
ColorPicker:
Modify web extensions from mtb nodes. Select colors on the color palette and output RGB values.

Node options:
- mode: The output format is available in hexadecimal (HEX) and decimal (DEC).
Output Type:
- string
LayerUtility
MotionBlur:
Node options:
- angle: The angle of blur.
- blur: The size of blur.
Example workflow
image Some JSON workflow files in the workflow directory, that is example for ComfyUI.
The following tasks are in the planned list
- Color Overlay
- Gradient Overlay
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













