2024-01-18 22:18:02 +08:00
2024-01-18 22:18:02 +08:00
2024-01-18 22:15:51 +08:00
2024-01-18 18:50:05 +08:00
2024-01-18 12:44:36 +08:00
2024-01-17 20:57:41 +08:00
2024-01-18 22:15:51 +08:00
2024-01-18 22:17:14 +08:00
2024-01-17 21:05:47 +08:00

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. image
  • Commit ImageBlend node.
  • Remove the mask channel output from the DropShadow node; Commit OuterGlow node.
  • Commit DropShadow node.

Node Description

Drop Shadow:

Generate shadow image

Node options: image

  • 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:

Generate outer glow image

Node options: image

  • 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. image

Node options: image

  • 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:

Adjust image opacity image

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",typegit clone https://github.com/chflame163/ComfyUI_LayerStyle.git or 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

S
Description
No description provided
Readme MIT
226 MiB
Languages
Python 93.4%
JavaScript 6.3%
Batchfile 0.3%