Open-source project
chflame163/ComfyUI_LayerStyle avatar
chflame163/ComfyUI_LayerStyle

ComfyUI_LayerStyle: Photoshop-style layer and mask nodes for ComfyUI

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

3,217 stars211 forksPythonMIT

At a glance

What is it?
ComfyUI_LayerStyle ports layer compositing and masking work into ComfyUI graphs so you stop bouncing between the two programs. This review covers how it installs, what the Ultra nodes depend on, and where the split into a second repository will bite you.
Who is it for?
Adopt ComfyUI_LayerStyle if your ComfyUI work already ends in compositing steps and you want masks, blend modes and matting inside the same graph, and if you can accept a second repository for the heavier nodes. Skip it if you only need one or two image operations, since the dependency list and the vitmatte model downloads are a lot of surface area for that.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 17 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • chflame163/ComfyUI_LayerStyle3,217 ★ · +49
Star history
Repository2026-09-242026-11-24
chflame163/ComfyUI_LayerStyle3.2k3.2k

49 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What ComfyUI_LayerStyle is for, and who actually needs it

The project describes itself as a set of nodes for ComfyUI that composite layer and mask to reach Photoshop-like functionality. The stated aim is narrower than that sounds: migrate some basic functions of Photoshop into ComfyUI so a workflow stays in one place and you switch between programs less often. The pyproject.toml description is even more specific about where it started, naming Drop Shadow as the first completed node with follow-up work in progress.

That framing matters for who should care. If your ComfyUI graph produces an image and you then open it elsewhere to add a drop shadow, blend two layers, or cut a subject out against a new background, this is the category of tool that removes a step. If you already have a compositing pipeline you are happy with, the node set duplicates work you have solved. The README is explicit that the migration is partial: some basic functions, not a full port.

The nodes are grouped by prefix. LayerMask nodes deal with masks and segmentation, LayerUtility nodes handle prompts, files, QR codes and similar side tasks. That naming is the fastest way to find what you want in the node menu, and it is also how the README lists the nodes that have moved out.

How the nodes and models fit together

There is no separate service or daemon here. The plugin registers nodes with ComfyUI through __init__.py at the repository root, with the implementation under py/, front-end assets under js/, translations under locales/, and color lookup tables under lut/. Workflows are plain ComfyUI JSON, and the repository ships examples in the workflow directory, including title_example_workflow.json which the README points to for the header image.

The interesting architectural fact is the dependency split. A long list of nodes was moved into a separate repository, ComfyUI_LayerStyle_Advance, and the README says this was done for the dependencies that are prone to problems. The moved set is dominated by model-backed nodes: BiRefNet, EVF-SAM, Florence2, SAM2, YOLO detectors, JoyCaption2, LaMa, LlamaVision, PhiPrompt, QWenImage2Prompt, ImageReward, and the PSD loader. Those names tell you why. They pull large checkpoints and heavy Python packages, and a failure in any one of them takes down the whole plugin import.

Several nodes carry an Ultra suffix, and the README states that Ultra nodes use the vitmatte model, expected under ComfyUI/models/vitmatte. So the data flow for those is: your image and mask go into the node, the node loads vitmatte from that folder, and the result comes back as an image or mask for the next node in the graph. The model is not fetched by the node on demand; the README instructs you to download it and place it yourself.

Installing ComfyUI_LayerStyle and running a first node

The README recommends ComfyUI Manager for installation. The manual route is to open a command window in the custom_nodes directory and clone the repository there.

bash
git clone https://github.com/chflame163/ComfyUI_LayerStyle.git

After that, dependencies have to be installed. The README gives two paths depending on which ComfyUI distribution you run. For the official portable package, double-click install_requirements.bat in the plugin directory. For the Aki package, double-click install_requirements_aki.bat. If you prefer the terminal, open a command window inside ComfyUI\custom_nodes\ComfyUI_LayerStyle and run the pip command that matches your distribution.

bash
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt
.\repair_dependency.bat

For the Aki package the interpreter path and the repair script differ, and the README gives them as ..\..\python\python.exe with repair_dependency_aki.bat. Restart ComfyUI afterwards. Models come next: the README says to download all files from the Hugging Face repository at huggingface.co/chflame163/ComfyUI_LayerStyle and copy them into the ComfyUI\models folder, or to download per node as each node's instructions describe. Chinese users are pointed to Baidu Netdisk and Quark Netdisk mirrors.

With that in place, the practical first use is a two-node graph: an image source feeding a LayerStyle node, with the output wired to a preview. The README does not walk through a single node's inputs in text, so the workflow JSON files under workflow are the real starting point. Load one, look at how the LayerMask and LayerUtility nodes are wired, and swap the inputs for your own image.

The Advance split is the main operational risk

The README states plainly that if there are recent updates, you need to install ComfyUI_LayerStyle_Advance to ensure previous workflows do not lose nodes. Read that as a compatibility contract rather than a suggestion. A workflow JSON references nodes by their registered class names. When a class moves to another repository and that repository is not installed, ComfyUI cannot resolve the node and the graph opens with holes in it.

There is a documented escape hatch. The README says that if the problem is caused by splitting the warehouse, roll back the plugin version to the commit 3d4a3526a9d1a19671a133e9215077bda520ee5d, and gives the command to run in the plugin directory.

bash
git reset --hard 3d4a3526a9d1a19671a133e9215077bda520ee5d

That is a hard reset, which discards uncommitted changes in that directory. It is also a pin, not a fix: you stop receiving updates on that checkout. The README does not document a forward migration path for workflows saved before the split, so if you have a library of graphs built on the pre-split node set, the realistic options are installing Advance or freezing at that commit.

A second constraint is the model situation. The README does not document a rollback for model files, and the vitmatte placement under ComfyUI/models/vitmatte is a manual step with no verification built in. If a node that should work returns an error, check the terminal window first, as the README instructs, before assuming the node itself is broken.

Common errors and what they actually mean

The README devotes a section to failure modes, which is more than many node packs do. The warnings about xxxx.ini not found are cosmetic: rename the *.ini.example files in the plugin directory to *.ini if they bother you. Nothing breaks if you leave them.

The errors worth knowing are the import failures. Cannot import name 'guidedFilter' from 'cv2.ximgproc', and the related NameError: name 'guidedFilter' is not defined, both come from a wrong version of opencv-contrib-python or from another opencv package overwriting it. The repair scripts, repair_dependency.bat and repair_dependency_aki.bat, are the documented fix. Note that this is a dependency conflict, not a bug in the node, so it will come back if something else in your environment reinstalls a plain opencv package.

Cannot import name 'VitMatteImageProcessor' from 'transformers' means the transformers version is too low. requirements.txt pins transformers>=4.43.2, so an environment that predates that pin needs an upgrade. Slow insightface loading is attributed to a low protobuf version. An onnxruntime error mentioning CUDA_PATH set but CUDA not loadable is resolved by reinstalling onnxruntime. And errors about connecting to huggingface.co are network problems, which the README acknowledges by offering the two Chinese mirrors.

Alternatives, and where the boundary sits

The obvious alternative is doing the compositing in Photoshop, or in GIMP or Krita, after ComfyUI produces the image. The difference is not capability, it is where state lives. In an external editor you get real layer documents, non-destructive adjustment layers, and a file format built for that. Here the layer stack is a graph, and every operation is a node you re-run. That is better when you want the compositing to be part of a batch or a reproducible pipeline, and worse when you are doing one-off retouching where the iteration loop in a layer panel is faster than rewiring nodes.

Within ComfyUI itself, the alternative to this pack is assembling the same effects from core nodes and a general-purpose image utility pack. That avoids the model downloads and the Advance split, at the cost of building blend and matting logic yourself. The pyproject.toml dependency list is the honest measure of what you are taking on: numpy, pillow, torch, matplotlib, scipy, scikit_image, scikit_learn, opencv-contrib-python, pymatting, timm, colour-science, transformers, blend_modes, huggingface_hub and loguru. Several of those are heavyweight, and opencv-contrib-python in particular is the one the README's repair scripts exist to defend.

If you need segmentation models specifically, the README's own answer is that those nodes now live in ComfyUI_LayerStyle_Advance. So the comparison is not really this pack versus another pack; it is this pack plus Advance versus a narrower utility pack.

Maintenance, licence and upgrade cost

The repository is not archived, and the last push was on 2026-09-16, which is recent. The version in pyproject.toml is 2.0.42. The repository has no published GitHub releases, so versioning appears to be tracked through the file rather than through tagged releases, which means pinning to a version number is less useful than pinning to a commit.

The licence is MIT, declared both in the LICENSE file at the repository root and in pyproject.toml. MIT is permissive, so redistribution and modification are allowed with the licence text retained. That covers this repository's code. It does not automatically cover the model weights the nodes load, which come from separate Hugging Face repositories, including vitmatte from hustvl. Those carry their own terms, and the README does not summarise them. Check the model cards before shipping anything commercial.

The upgrade cost is the split. Installing Advance is the documented way to keep old workflows working, and the hard reset to 3d4a3526a9d1a19671a133e9215077bda520ee5d is the documented way to avoid the split entirely. There is no third option in the README, and no stated plan for merging the two repositories back together.

Editorial conclusion

Adopt ComfyUI_LayerStyle if your ComfyUI work already ends in compositing steps and you want masks, blend modes and matting inside the same graph, and if you can accept a second repository for the heavier nodes. Skip it if you only need one or two image operations, since the dependency list and the vitmatte model downloads are a lot of surface area for that. Before committing, verify two things: that ComfyUI_LayerStyle_Advance is installed alongside it so existing workflows keep their nodes, and that opencv-contrib-python is the copy actually loaded, because the guidedFilter import failures come from something else overwriting it.

Frequently asked questions

How do I install ComfyUI_LayerStyle?

The README recommends ComfyUI Manager. Manually, clone the repository into ComfyUI\custom_nodes, then run install_requirements.bat for the official portable package or install_requirements_aki.bat for the Aki package, and restart ComfyUI.

Why are nodes missing from my ComfyUI_LayerStyle workflow?

The README states that a set of nodes was moved into the separate ComfyUI_LayerStyle_Advance repository, and that you need to install it so previous workflows do not lose nodes.

Where do the model files for ComfyUI_LayerStyle go?

Download them from the Hugging Face repository at huggingface.co/chflame163/ComfyUI_LayerStyle and copy them into the ComfyUI\models folder. Ultra nodes use the vitmatte model, which goes in ComfyUI/models/vitmatte.

What causes the guidedFilter import error in ComfyUI_LayerStyle?

The README attributes it to a wrong version of opencv-contrib-python, or to that package being overwritten by another opencv package. Double-clicking repair_dependency.bat or repair_dependency_aki.bat in the plugin folder is the documented fix.

Can I roll ComfyUI_LayerStyle back to an older version?

Yes. The README says that if a problem is caused by the repository split, roll back to commit 3d4a3526a9d1a19671a133e9215077bda520ee5d with git reset --hard in the plugin directory.

Official sources

  1. chflame163/ComfyUI_LayerStyle on GitHub
  2. Issues
  3. License: MIT
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/chflame163-comfyui-layerstyle.svg)](https://hysenlabs.com/projects/chflame163-comfyui-layerstyle)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/chflame163-comfyui-layerstyle.svg)](https://hysenlabs.com/projects/chflame163-comfyui-layerstyle)

Was this useful?