Location>code7788 >text

ComfyUI plugin: ComfyUI layer style node (II)

Popularity:602 ℃/2024-08-02 12:23:22

Preface:

Learning ComfyUI is a long battle, and ComfyUI layer style is a set of powerful nodes specially designed and produced for image design and integrated with Photoshop functions. The node almost all the functions of PhotoShop migrated to ComfyUI, such as providing imitation Adobe Photoshop layer styles, provide color adjustment functions (brightness, saturation, contrast, etc.), provide Mask auxiliary tools, provide layer compositing tools and workflow-related auxiliary nodes, provide image effects filters and so on. Designed to centralize the work platform so that we can achieve some of the basic functions of PhotoShop in ComfyUI.

catalogs

I. Installation

II. LayerStyle: ColorOverlay node

III. LayerStyle: DropShadow node

IV. LayerStyle: GradientOverlay node

V. LayerStyle: InnerGlow node

VI. LayerStyle: InnerShadow node

VII. LayerStyle: OuterGlow node

VIII. LayerStyle: Stroke node

I. Installation

Method 1: Installation via ComfyUI Manager (recommended)

Open the Manager interface

1

2

Method 2: Installation with git clone command

Enter cmd in the ComfyUI/custom_nodes directory and press Enter to enter the computer terminal.

3

Enter the following line of code in the terminal to start the download

git clone /chflame163/ComfyUI_LayerStyle.git

4

II. LayerStyle: ColorOverlay node

This node is designed to enhance the visual presentation of an image by overlaying color layers to change the overall tone of the image or to add specific color effects.

5

Input:

background_image → input background image

layer_image → layer image for compositing

layer_mask → mask for layer images

Note: These three items must be the same size, and mask is not a required input.

Parameters:

invert_mask → whether to invert the mask or not

blend_mode → the blend mode of the stroke (there are 19 blend modes)

opacity → opacity

color → color of the overlay

Output:

image → processed image

Example: Simple Node Example

6

Example: 19 Stroke Blending Modes

7

8

caveat

- Color Selection: Select an overlay color that is appropriate for the processing target to achieve the desired visual effect.

- Opacity Configuration: Set the opacity to control the intensity of the color coverage according to specific needs. Generally, the opacity value is between 0 and 1, with 0 indicating complete transparency and 1 indicating complete opacity.

- Input Image Quality: The quality of the input image affects the color coverage, make sure the image is clear and the color information is complete.

- Processing performance: Color overlay processing may require some computational resources, ensure that the system performance is sufficient to support the processing requirements.

- Result check: After applying the color overlay, check the overall visual effect of the image to make sure that the color overlay is as expected and does not affect important details of the image.

By using the LayerStyle: ColorOverlay node, you can achieve efficient color overlay effects in your image processing workflow, enhancing the visual expression and artistic effect of your images.

III. LayerStyle: DropShadow node

This node is designed to add visual depth and hierarchy by adding shadows to make elements in the image appear more three-dimensional and prominent.

9

Input:

background_image → input background image

layer_image → layer image for compositing

layer_mask → mask for layer images

Parameters:

invert_mask → whether to invert the mask or not

blend_mode → blend mode for shadows

opacity → opacity of the shadow

distance_x → horizontal offset of the shadow

distance_y → vertical offset of the shadow

grow → shadow expansion

blur → the degree of shadow blurring

shadow_color → shadow color

Output:

image → processed image

Example:

10

caveat

- Shadow Color Selection: Select the shadow color that is appropriate for the processing target to achieve the desired visual effect.

- Position and Blur Configuration: Set the offset and blur radius of the shadow according to specific needs to ensure that the shadow effect is natural and does not obscure the main content of the image.

- Opacity Configuration: Set the opacity of the shadow according to the specific needs and control the intensity of the shadow effect. Generally, the opacity value is between 0 and 1, with 0 indicating complete transparency and 1 indicating complete opacity.

- Input Image Quality: The quality of the input image affects the visual representation of the shading effect, make sure that the image is clear and that important elements are clearly positioned.

- Processing performance: Shadow effect processing may require some computational resources, ensure that the system performance is sufficient to support the processing requirements.

- Result check: After applying the shading effect, check the overall visual effect of the image to make sure that the shading effect is as expected and does not affect important details of the image.

By using the LayerStyle: DropShadow node, you can achieve efficient shadow effects in your image processing workflow, enhance the three-dimensionality and visual hierarchy of your images, and make them more vivid and attractive.

IV. LayerStyle: GradientOverlay node

This node is designed to change the overall tone of an image or enhance it visually by adding a gradient color layer.

11

Input:

background_image → input background image

layer_image → layer image for compositing

layer_mask → mask for layer images

Parameters:

invert_mask → whether to invert the mask or not

blend_mode → the blend mode of the stroke

opacity → opacity of the stroke

start_color → the color of the start of the gradient.

start_alpha → transparency of the start of the gradient.

end_color → the color of the end of the gradient.

end_alpha → the transparency of the end of the gradient.

angle → gradient rotation angle

Output:

image → processed image

Example:

12

caveat

- Color Selection: Select a gradient color that is appropriate for the processing target to achieve the desired visual effect. Two or more colors can be selected to create a gradient effect.

- Gradient direction: set the direction of gradient according to the specific needs, common directions are horizontal, vertical and diagonal.

- Opacity Configuration: Set the opacity of the gradient according to specific needs and control the intensity of the gradient effect. Generally speaking, the opacity value is between 0 and 1, 0 means completely transparent, 1 means completely opaque.

- Input Image Quality: The quality of the input image affects the effect of the gradient overlay, make sure the image is clear and the color information is complete.

- Processing performance: Gradient overlay processing may require some computational resources, ensure that the system performance is sufficient to support the processing requirements.

- Result check: After applying the gradient overlay, check the overall visual effect of the image to make sure that the gradient is as expected and does not affect important details of the image.

By using the LayerStyle: GradientOverlay node, you can achieve efficient gradient overlay effects in your image processing workflow, enhancing the visual expression and artistic effect of your images.

V. LayerStyle: InnerGlow node

This node is designed to enhance the three-dimensionality and visual appeal of the image by adding a soft halo effect inside the image.

13

Input:

background_image → input background image

layer_image → layer image for compositing

layer_mask → mask for layer images

Parameters:

invert_mask → whether to invert the mask or not

blend_mode → blend mode of shine

opacity → opacity of shine

brightness → luminous brightness

glow_range → glow range

blur → shine blur

light_color → light center color

glow_color → glow peripheral color

Output:

image → processed image

Example:

14

caveat

- Illumination Color Selection: Select the appropriate illumination color for the treatment target to achieve the desired visual effect.

- Luminous Radius and Intensity Configuration: Set the luminous radius and intensity according to the specific needs to ensure that the luminous effect is natural and does not cover the main content of the image.

- Opacity Configuration: Set the opacity of the luminous according to the specific needs and control the intensity of the luminous effect. Generally speaking, the opacity value is between 0 and 1, 0 means completely transparent, 1 means completely opaque.

- Input Image Quality: The quality of the input image affects the visual representation of the luminous effect, make sure the image is clear and the important elements are clearly positioned.

- Processing performance: Glow effect processing may require some computing resources, ensure that the system performance is sufficient to support the processing requirements.

- Result check: After applying the glow effect, check the overall visual effect of the image to make sure that the glow effect is as expected and does not affect important details of the image.

By using the LayerStyle: InnerGlow node, you can achieve an efficient inner glow effect in your image processing workflow, enhancing the three-dimensionality and visual hierarchy of your images, making them more vivid and attractive.

VI. LayerStyle: InnerShadow node

This node is designed to make elements in an image appear more three-dimensional and have depth by adding shadows inside the image.

15

Input:

background_image → input background image

layer_image → layer image for compositing

layer_mask → mask for layer images

Parameters:

invert_mask → whether to invert the mask or not

blend_mode → blend mode for shadows

opacity → opacity of the shadow

distance_x → horizontal offset of the shadow

distance_y → vertical offset of the shadow

grow → shadow expansion

blur → the degree of shadow blurring

shadow_color → shadow color

Output:

image → processed image

Example:

16

caveat

- Shadow Color Selection: Select the shadow color that is appropriate for the processing target to achieve the desired visual effect.

- Position and Blur Configuration: Set the offset and blur radius of the shadow according to specific needs to ensure that the shadow effect is natural and does not obscure the main content of the image.

- Opacity Configuration: Set the opacity of the shadow according to the specific needs and control the intensity of the shadow effect. Generally, the opacity value is between 0 and 1, with 0 indicating complete transparency and 1 indicating complete opacity.

- Input Image Quality: The quality of the input image affects the visual representation of the shading effect, make sure that the image is clear and that important elements are clearly positioned.

- Processing performance: Shadow effect processing may require some computational resources, ensure that the system performance is sufficient to support the processing requirements.

- Result check: After applying the shading effect, check the overall visual effect of the image to make sure that the shading effect is as expected and does not affect important details of the image.

By using the LayerStyle: InnerShadow node, you can achieve efficient inner shadow effects in your image processing workflow to enhance the three-dimensionality and visual hierarchy of your images, making them more vivid and attractive.

VII. LayerStyle: OuterGlow node

This node is designed to make elements in an image stand out and have a glow by adding a halo effect to the outside of the image.

17

Input:

background_image → input background image

layer_image → layer image for compositing

layer_mask → mask for layer images

Parameters:

invert_mask → whether to invert the mask or not

blend_mode → blend mode of shine

opacity → opacity of shine

brightness → luminous brightness

glow_range → glow range

blur → shine blur

light_color → light center color

glow_color → glow peripheral color

Output:

image → processed image

Example:

18

caveat

- Illumination Color Selection: Select the appropriate illumination color for the treatment target to achieve the desired visual effect.

- Luminous Radius and Intensity Configuration: Set the luminous radius and intensity according to the specific needs to ensure that the luminous effect is natural and does not cover the main content of the image.

- Opacity Configuration: Set the opacity of the luminous according to the specific needs and control the intensity of the luminous effect. Generally speaking, the opacity value is between 0 and 1, 0 means completely transparent, 1 means completely opaque.

- Input Image Quality: The quality of the input image affects the visual representation of the luminous effect, make sure the image is clear and the important elements are clearly positioned.

- Processing performance: Glow effect processing may require some computing resources, ensure that the system performance is sufficient to support the processing requirements.

- Result check: After applying the glow effect, check the overall visual effect of the image to make sure that the glow effect is as expected and does not affect important details of the image.

By using the LayerStyle: OuterGlow node, you can achieve efficient external glow effects in your image processing workflow, enhancing the three-dimensionality and visual hierarchy of your images, making them more vivid and attractive.

VIII. LayerStyle: Stroke node

This node is designed to be more prominent and visually hierarchical by adding contour lines around image elements.

19

Input:

background_image → input background image

layer_image → layer image for compositing

layer_mask → mask for layer images

Parameters:

invert_mask → whether to invert the mask or not

blend_mode → blend mode of shine

opacity → opacity of shine

stroke_grow → stroke expansion/contraction (positive values are expansion, negative values are contraction)

stroke_width → stroke width

blur → the degree of blurring of the stroke

stroke_color → stroke color

Output:

image → processed image

Example:

20

caveat

- Stroke Color Selection: Select a stroke color that is appropriate for the processing target to achieve the desired visual effect.

- Stroke Width Configuration: Set the width of the stroke according to your specific needs to ensure that the stroke is noticeable but does not obscure the main content of the image.

- Stroke position selection: choose the position of the stroke according to specific needs, common positions include internal, external and center.

- Input Image Quality: The quality of the input image affects the visual presentation of the stroke effect, make sure the image is clear and important elements are clearly positioned.

- Processing performance: Stroke effect processing may require some computational resources, ensure that the system performance is sufficient to support the processing requirements.

- Result check: After applying the stroke effect, check the overall visual effect of the image to make sure that the stroke is as expected and does not affect important details of the image.

By using the LayerStyle: Stroke node, you can achieve efficient stroke effects in image processing workflows, enhance the three-dimensionality and visual hierarchy of images, and make images more vivid and attractive.

**To go beyond oneself is to strive for excellence. Perseverance is the key to success. **