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

LayerUtility: ImageBlendAdvance V3

LayerUtility: ImageBlendAdvance V3 - Documentation

Overview

The LayerUtility: ImageBlendAdvance V3 node is a sophisticated image processing tool designed for blending images with various advanced options. It allows users to manipulate images by applying transformations such as scaling, rotating, mirroring, and blending layers. This node is particularly useful for creative image compositions within ComfyUI workflows.

Functionality

The ImageBlendAdvance V3 node merges layer images onto a background image with precise control over various parameters such as blending modes, position, opacity, and transformations. Users can also apply masks for more complex compositions.

Inputs

The following is a list of inputs that the node accepts:

  • Layer Image: The primary image or images that you want to blend onto a background.
  • Invert Mask (Boolean): A switch to invert the mask, with the default setting as True.
  • Blend Mode: Determines the mode of blending between layers.
  • Opacity (Integer): Controls the transparency level of the layer image, ranging from 0 to 100.
  • X Percent (Float): Horizontally positions the layer image as a percentage of the background width.
  • Y Percent (Float): Vertically positions the layer image as a percentage of the background height.
  • Mirror: Options to mirror the image horizontally or vertically.
  • Scale (Float): Adjusts the size of the layer image, defaulting to 1, with a range from 0.01 to 100.
  • Aspect Ratio (Float): Changes the aspect ratio of the layer image, also ranging from 0.01 to 100.
  • Rotate (Float): Rotates the layer image by the specified angle in degrees.
  • Transform Method: Chooses the resampling method for transformations, with options like lanczos, bicubic, bilinear, etc.
  • Anti-Aliasing (Integer): Sets the level of anti-aliasing from 0 to 16, improving image quality during transformations.

Optional Inputs

  • Background Image: The image that serves as the canvas onto which the layer images will be blended.
  • Layer Mask: An optional mask that can be applied to the layer image for advanced blending effects.

Outputs

  • Image: The resultant image after all transformations, blending, and compositions have been applied.
  • Mask: A mask corresponding to the final composition, useful for further post-processing steps.

Usage in ComfyUI Workflows

The ImageBlendAdvance V3 node is exceptionally versatile and can be integrated into various stages of a ComfyUI workflow. Here’s how it might be used:

  1. Creative Compositions: Perfect for blending multiple images with different opacity and blending modes to create composite images.
  2. Image Transformations: Use the node to apply precise transformations to images, including scaling, rotation, and mirroring, as part of a preprocessing step.
  3. Masking and Layering: Integrate masks for detailed layer control, helping refine compositions where certain areas of the layer image need to be selectively applied.
  4. Animation and Sequencing: Can be part of a sequence of image nodes to create layered animations or evolving compositions.

Special Features and Considerations

  • Advanced Blending Modes: The node supports multiple blending modes and is particularly accommodating when layering images with different blending effects.
  • Batch Processing: Handles multiple images and masks efficiently, processing each with the specified parameters.
  • No Default Background: If a background image is not provided, the node creates a transparent canvas automatically for the layer image.
  • Flexibility: Most parameters can be adjusted dynamically, offering extensive freedom for creative control over the final image output.

This modular and comprehensive nature makes the ImageBlendAdvance V3 node a powerful tool in any ComfyUI project.