ComfyUI  >  Nodes  >  ComfyUI Layer Style >  LayerStyle: Stroke

ComfyUI Node: LayerStyle: Stroke

Class Name

LayerStyle: Stroke

Category
😺dzNodes/LayerStyle
Author
chflame163 (Account age: 445 days)
Extension
ComfyUI Layer Style
Latest Updated
6/24/2024
Github Stars
0.6K

How to Install ComfyUI Layer Style

Install this extension via the ComfyUI Manager by searching for  ComfyUI Layer Style
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Layer Style in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

LayerStyle: Stroke Description

Add customizable stroke effects to image layers for emphasis and visual appeal, with control over color, width, opacity, and more.

LayerStyle: Stroke:

The LayerStyle: Stroke node is designed to add a stroke or outline effect to a given image layer, enhancing its visual appeal and making it stand out against the background. This node is particularly useful for creating emphasis on specific elements within your artwork, such as text or shapes, by surrounding them with a customizable border. The stroke effect can be finely tuned with various parameters, allowing you to control the color, width, opacity, and blending mode of the stroke. Additionally, you can apply effects like blur to soften the edges of the stroke, and adjust the stroke's growth or shrinkage to achieve the desired look. This node is a powerful tool for AI artists looking to add professional and polished touches to their digital creations.

LayerStyle: Stroke Input Parameters:

background_image

The background_image parameter is the base image over which the stroke effect will be applied. This image serves as the canvas for the stroke and is required for the node to function.

layer_image

The layer_image parameter is the image layer to which the stroke effect will be applied. This image will be outlined with the stroke, making it stand out against the background_image.

invert_mask

The invert_mask parameter is a boolean option that determines whether the mask should be inverted. By default, this is set to True. Inverting the mask can be useful for reversing the areas where the stroke is applied.

blend_mode

The blend_mode parameter allows you to select the blending mode for the stroke. This determines how the stroke will interact with the background_image and layer_image, affecting the overall visual result.

opacity

The opacity parameter controls the transparency of the stroke. It accepts integer values ranging from 0 to 100, with a default value of 100. A lower opacity makes the stroke more transparent, while a higher opacity makes it more opaque.

stroke_grow

The stroke_grow parameter adjusts the growth or shrinkage of the stroke. It accepts integer values ranging from -999 to 999, with a default value of 0. Positive values will expand the stroke, while negative values will contract it.

stroke_width

The stroke_width parameter sets the width of the stroke. It accepts integer values ranging from 0 to 999, with a default value of 8. This parameter determines how thick or thin the stroke will appear.

blur

The blur parameter applies a blur effect to the stroke, softening its edges. It accepts integer values ranging from 0 to 100, with a default value of 0. Higher values will increase the blur intensity.

stroke_color

The stroke_color parameter specifies the color of the stroke. It accepts a string value representing a color in hexadecimal format, with a default value of "#FF0000" (red). This allows you to customize the stroke color to match your design.

layer_mask

The layer_mask parameter is an optional mask that can be applied to the layer_image. This mask can be used to define specific areas where the stroke should be applied or excluded.

LayerStyle: Stroke Output Parameters:

image

The image output parameter is the final image with the applied stroke effect. This image combines the background_image, layer_image, and the stroke, resulting in a visually enhanced output that highlights the stroked elements.

LayerStyle: Stroke Usage Tips:

  • Experiment with different stroke colors and widths to see how they affect the emphasis on your image elements.
  • Use the blur parameter to create softer, more natural-looking strokes, especially for organic shapes.
  • Adjust the stroke_grow parameter to fine-tune the size of the stroke, ensuring it complements the design without overwhelming it.
  • Try different blend modes to achieve unique visual effects and better integration of the stroke with the background.

LayerStyle: Stroke Common Errors and Solutions:

"Invalid image input"

  • Explanation: This error occurs when the provided background_image or layer_image is not in a supported format.
  • Solution: Ensure that both the background_image and layer_image are valid image files and are correctly loaded into the node.

"Opacity value out of range"

  • Explanation: This error occurs when the opacity parameter is set to a value outside the allowed range (0-100).
  • Solution: Adjust the opacity parameter to a value within the range of 0 to 100.

"Stroke width value out of range"

  • Explanation: This error occurs when the stroke_width parameter is set to a value outside the allowed range (0-999).
  • Solution: Adjust the stroke_width parameter to a value within the range of 0 to 999.

"Invalid color format"

  • Explanation: This error occurs when the stroke_color parameter is not in a valid hexadecimal color format.
  • Solution: Ensure that the stroke_color parameter is a valid hexadecimal color string, such as "#FF0000" for red.

LayerStyle: Stroke Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Layer Style
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.