LayerStyle

2167
By chflame
Updated 15 days ago
View on GitHub →See Common Issues →

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.

Available Nodes

LayerStyle: Stroke

LayerStyle: Stroke Node Documentation

Overview

The "LayerStyle: Stroke" node is designed to add a stroke effect to an image layer in a compositing workflow. This node is beneficial for creating outlined edges around image layers, enhancing their visibility or adding stylistic effects within digital art and graphic design projects.

Inputs

The "LayerStyle: Stroke" node accepts several inputs for configuration:

  1. Background Image

    • Type: Image
    • Description: The base image onto which the layer image with the stroke will be applied.
  2. Layer Image

    • Type: Image
    • Description: The image layer to which the stroke effect is applied. This image is composited over the background image.
  3. Invert Mask

    • Type: Boolean
    • Default: True
    • Description: Option to invert the mask of the layer image, effectively reversing the masked and unmasked areas.
  4. Blend Mode

    • Type: Selection
    • Description: Defines the blending mode used to combine the layer image with the stroke color. Different modes create different visual effects.
  5. Opacity

    • Type: Integer
    • Range: 0 to 100
    • Default: 100
    • Description: Controls the transparency level of the stroke. Lower values make the stroke more transparent.
  6. Stroke Grow

    • Type: Integer
    • Range: -999 to 999
    • Default: 0
    • Description: Adjusts the inward or outward growth of the stroke before the full stroke width is applied.
  7. Stroke Width

    • Type: Integer
    • Range: 0 to 999
    • Default: 8
    • Description: Defines the thickness of the stroke applied around the layer image.
  8. Blur

    • Type: Integer
    • Range: 0 to 100
    • Default: 0
    • Description: Adds a blur effect to the edges of the stroke to create smoother transitions.
  9. Stroke Color

    • Type: String
    • Default: "#FF0000" (Red)
    • Description: Specifies the color of the stroke. The color should be defined in hexadecimal format.

Optional Input

  1. Layer Mask
    • Type: Mask
    • Description: An optional mask that can be applied to the layer image. It defines the areas where the stroke should be applied, further refining the effect.

Outputs

  • Image
    • The node produces an image with the applied stroke effect, composited over the specified background image. This image can then be used in further processing or final output.

Usage in ComfyUI Workflows

The "LayerStyle: Stroke" node can be utilized in various ways within ComfyUI workflows:

  • Enhancing Visibility: Use it to outline key elements in an image to make them stand out against complex backgrounds.
  • Graphic Design: Add stylistic effects to logos, text, or image elements for promotional materials.
  • Layer Compositing: Combine with other layer effects for complex image manipulations and enhancements.
  • Artistic Effects: Apply strokes creatively to produce artistic renderings or visual aesthetics.

Special Features and Considerations

  • Dynamic Masking: The node allows for dynamic masking options, including mask inversion and application of custom masks.
  • Flexible Blending: Support for various blend modes ensures that the node can be adapted for different artistic and compositing requirements.
  • Batch Processing: Handles multiple images in batches, making it suitable for large-scale image processing tasks.
  • Customizable Parameters: Nearly every aspect of the stroke effect is customizable, from color to thickness and opacity, offering extensive creative control.

When using this node, consider the final visual impact of the stroke settings on your project and how it integrates with other effects and elements within the ComfyUI workflow.