ComfyUI  >  Nodes  >  ComfyUI Layer Style

ComfyUI Extension: ComfyUI Layer Style

Repo Name


chflame163 (Account age: 445 days)
View all nodes (140)
Latest Updated
Github Stars

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

ComfyUI Layer Style Description

ComfyUI Layer Style is a set of nodes for ComfyUI designed to generate images similar to Adobe Photoshop's Layer Style. The first completed node is Drop Shadow, with additional features currently in development.

ComfyUI Layer Style Introduction

ComfyUI_LayerStyle is an extension for ComfyUI that brings Photoshop-like functionality to your AI art workflow. It allows you to composite layers and masks, making it easier to create complex images without switching between different software. This extension centralizes your workflow, reducing the need for multiple software tools and streamlining your creative process.

This workflow (title_example_workflow.json) is in the workflow directory.

How ComfyUI Layer Style Works

ComfyUI_LayerStyle works by providing a set of nodes that mimic the functionality of Photoshop. These nodes allow you to perform various image manipulations such as blending, masking, and color adjustments directly within ComfyUI. By using these nodes, you can layer images, apply masks, and adjust colors in a non-destructive manner, similar to how you would in Photoshop.

Basic Principles

  1. Layering: You can stack multiple images on top of each other, each with its own mask and blending mode.
  2. Masking: Masks can be used to hide or reveal parts of a layer, allowing for complex compositions.
  3. Blending: Different blending modes can be applied to layers to achieve various effects.
  4. Color Adjustments: Adjust the colors of your images using nodes that provide functionality similar to Photoshop's adjustment layers.

ComfyUI Layer Style Features

LayerStyle Nodes

These nodes provide layer styles that mimic Adobe Photoshop.

  • DropShadow: Generates a shadow for the layer.
  • OuterGlow: Creates an outer glow effect.
  • InnerShadow: Generates an inner shadow.
  • InnerGlow: Creates an inner glow effect.
  • Stroke: Adds a stroke around the layer.
  • GradientOverlay: Applies a gradient overlay.
  • ColorOverlay: Applies a solid color overlay.

LayerColor Nodes

These nodes provide color adjustment functionality.

  • LUT Apply: Applies a Look-Up Table (LUT) to the image.
  • AutoAdjust: Automatically adjusts brightness, contrast, and white balance.
  • AutoBrightness: Automatically adjusts the brightness.
  • ColorAdapter: Adjusts the color tone to match a reference image.
  • Exposure: Changes the exposure of the image.
  • Color of Shadow & Highlight: Adjusts the color of dark and bright areas.
  • ColorTemperature: Changes the color temperature.
  • Levels: Adjusts the levels of the image.
  • ColorBalance: Changes the color balance.
  • Gamma: Adjusts the gamma value.
  • Brightness & Contrast: Changes brightness, contrast, and saturation.
  • RGB: Adjusts the RGB channels.
  • YUV: Adjusts the YUV channels.
  • LAB: Adjusts the LAB channels.
  • HSV: Adjusts the HSV channels.

LayerMask Nodes

These nodes provide mask assistance tools.

  • BlendIfMask: Reproduces Photoshop's Blend If function.
  • MaskBoxDetect: Detects the area where the mask is located.
  • SegmentAnythingUltra: Improves mask edges using SAM and GroundingDINO models.
  • RemBgUltra: Removes the background with high edge details.
  • BiRefNetUltra: Uses the BiRefNet model for background removal.
  • PersonMaskUltra: Generates masks for different parts of a portrait.
  • SegformerB2ClothesUltra: Segments character clothing.
  • YoloV8Detect: Detects faces, hands, or characters using the YoloV8 model.
  • MediapipeFacialSegment: Detects facial features.
  • MaskByColor: Generates a mask based on selected color.
  • ImageToMask: Converts an image to a mask.
  • Shadow & Highlight Mask: Generates masks for dark and bright parts.
  • PixelSpread: Expands pixels on the mask edge.
  • MaskByDifferent: Calculates differences between two images and outputs a mask.
  • MaskEdgeUltraDetail: Processes rough masks to ultra-fine edges.
  • MaskGrow: Grows and shrinks mask edges.
  • MaskEdgeShrink: Smooths and shrinks mask edges.
  • MaskMotionBlur: Creates motion blur on the mask.
  • MaskGradient: Creates a gradient for the mask.
  • CreateGradientMask: Creates a gradient mask.
  • MaskStroke: Generates mask contour strokes.
  • MaskGrain: Adds noise to the mask.
  • MaskPreview: Previews the input mask.
  • MaskInvert: Inverts the mask.

LayerUtility Nodes

These nodes provide auxiliary tools related to layer compositing and workflows.

  • ImageBlendAdvance: Composites layers with different sizes and transformations.
  • CropByMask: Crops the image according to the mask range.
  • RestoreCropBox: Restores the cropped image to its original size.
  • ImageScaleRestore: Scales the image and restores it to its original size.
  • ImageMaskScaleAs: Scales the image or mask to the size of a reference image.
  • QWenImage2Prompt: Generates prompts based on the image.
  • PromptTagger: Infers prompts based on the image and replaces keywords.
  • PromptEmbellish: Polishes prompt words and supports image references.
  • ImageShift: Shifts the image and outputs a displacement seam mask.
  • ImageBlend: Simple node for compositing layer and background images.
  • ImageOpacity: Adjusts image opacity.
  • ColorPicker: Selects colors on the color palette and outputs RGB values.
  • RGBValue: Outputs the color value as R, G, B decimal values.
  • HSVValue: Outputs color values as H, S, V decimal values.
  • GetColorTone: Obtains the main or average color from the image.
  • ExtendCanvas: Extends the canvas.
  • XY to Percent: Converts absolute coordinates to percentage coordinates.
  • LayerImageTransform: Transforms the layer image.
  • LayerMaskTransform: Transforms the layer mask.
  • ColorImage: Generates a solid color image.
  • GradientImage: Generates an image with a color gradient.
  • ImageRewardFilter: Rates and filters images based on quality.
  • SimpleTextImage: Generates simple typesetting images and masks from text.
  • TextImage: Generates images and masks from text.
  • LaMa: Erases objects from the image based on the mask.
  • ImageChannelSplit: Splits the image channel into individual images.
  • ImageChannelMerge: Merges each channel image into one image.
  • ImageRemoveAlpha: Removes the alpha channel from the image.
  • ImageCombineAlpha: Merges the image and mask into an RGBA image.
  • ImageAutoCrop: Automatically crops the image according to the mask.
  • HLFrequencyDetailRestore: Restores image details using frequency separation.
  • GetImageSize: Obtains the width and height of the image.
  • ImageHub: Switches output from multiple input images and masks.
  • BatchSelector: Retrieves specified images or masks from a batch.
  • TextJoin: Combines multiple paragraphs of text into one.
  • PrintInfo: Prints properties of any object connected to this node.
  • TextBox: Outputs a string.
  • String: Outputs a string.
  • Integer: Outputs an integer value.
  • Float: Outputs a floating-point value.
  • Boolean: Outputs a boolean value.
  • NumberCalculator: Performs mathematical operations on two numeric values.
  • BooleanOperator: Performs a Boolean operation on two numeric values.
  • StringCondition: Determines whether the text contains or does not contain substrings.
  • CheckMask: Checks if the mask contains enough valid areas.
  • If: Switches output based on Boolean conditional input.
  • SwitchCase: Switches the output based on the matching string.
  • PurgeVRAM: Cleans up GPU VRAM and system RAM.
  • SaveImagePlus: Enhanced save image node with additional options.
  • AddBlindWaterMark: Adds an invisible watermark to a picture.
  • ShowBlindWaterMark: Decodes the invisible watermark.
  • CreateQRCode: Generates a square QR code picture.
  • DecodeQRCode: Decodes the QR code.
  • LoadPSD: Loads the PSD format file and exports the layers.
  • SD3NegativeConditioning: Encapsulates the four nodes of Negative Condition in SD3. ## Troubleshooting ComfyUI Layer Style

Common Issues

If the node cannot load properly or there are errors during use, please check the error message in the ComfyUI terminal window. The following are common errors and their solutions.

ModuleNotFoundError: No module named 'psd_tools'

This error indicates that the psd_tools were not installed correctly.


  1. Close ComfyUI and open the terminal window in the plugin directory.
  2. Execute the following command:
../../../python_embeded/python.exe -s -m pip install psd_tools
  1. If an error occurs during the installation of psd_tools, such as ModuleNotFoundError: No module named 'docopt', please download docopt's whl ( and manually install it. Execute the following command in the terminal window:
../../../python_embeded/python.exe -s -m pip install path/docopt-0.6.2-py2.py3-none-any.whl

Replace path with the path name of the whl file.

Cannot import name 'guidedFilter' from 'cv2.ximgproc'

This error is caused by an incorrect version of the opencv-contrib-python package or this package being overwritten by other opencv packages.

NameError: name 'guidedFilter' is not defined

The reason for the problem is the same as above.

Cannot import name 'VitMatteImageProcessor' from 'transformers'

This error is caused by the low version of the transformers package.

insightface Loading very slow

This error is caused by the low version of the protobuf package.

For the issues with the above three dependency packages, please double-click repair_dependency.bat (for Official ComfyUI Portable) or repair_dependency_aki.bat (for ComfyUI-aki-v1.x) in the plugin folder to automatically fix them.

ValueError: Trimap did not contain foreground values (xxxx...)

This error is caused by the mask area being too large or too small when using the PyMatting method to handle the mask edges.


  1. Adjust the parameters to change the effective area of the mask.
  2. Use other methods to handle the edges.

Requests.exceptions.ProxyError: HTTPSConnectionPool(xxxx...)

When this error occurs, please check the network environment.

Learn More about ComfyUI Layer Style

To learn more about ComfyUI_LayerStyle, you can explore the following resources:

  • Example Workflows: Some JSON workflow files in the workflow directory demonstrate how these nodes can be used in ComfyUI.
  • Documentation: Detailed documentation for each node is available within the extension.
  • Community Forums: Join community forums and discussions to ask questions and get support from other AI artists and developers. By leveraging these resources, you can enhance your understanding and make the most out of ComfyUI_LayerStyle in your creative projects.

ComfyUI Layer Style Related Nodes


© 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.