Library / SDK
chflame163/ComfyUI_LayerStyle_Advance avatar
chflame163/ComfyUI_LayerStyle_Advance

ComfyUI Layer Style Advance: the heavyweight ComfyUI nodes split out for easier installs

The nodes detached from [ComfyUI Layer Style](https://github.com/chflame163/ComfyUI_LayerStyle) are mainly those with complex requirements for dependency packages.

718 stars83 forksPythonMIT

At a glance

What is it?
ComfyUI_LayerStyle_Advance holds the nodes detached from ComfyUI Layer Style, the ones whose dependency packages are hard to install, with bundled wheels, repair scripts and a large third-party dependency set. It suits ComfyUI users whose image pipeline needs matting, segmentation or transformer-based vision nodes, and its installation is a real systems problem rather than a copy-paste.
Who is it for?
ComfyUI Layer Style Advance fits a ComfyUI user whose workflow needs the heavy Layer Style nodes, such as matting, segmentation or transformer-based vision, and who is prepared to manage model files and repair a Python environment by hand. It does not fit someone wanting a lightweight ComfyUI install, or a deployment where the bundled model download and the dependency set are unwelcome.
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 36 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 October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Why these nodes were split out of ComfyUI Layer Style

ComfyUI Layer Style Advance is described in one sentence in the readme: the nodes detached from ComfyUI Layer Style are mainly those with complex requirements for dependency packages.

That sentence is the whole architecture. The parent project, ComfyUI Layer Style, contains a large set of image processing nodes for ComfyUI, the node-based stable diffusion interface. A number of those nodes need libraries that are awkward to install inside a ComfyUI environment: a specific opencv build, a particular transformers version, onnxruntime with the right CUDA provider, mediapipe, insightface. When a plugin installation silently upgrades or replaces one of those packages, every other node in the set can break, and the user is left with a ComfyUI that no longer loads.

Moving the awkward nodes into a separate plugin contains the blast radius. Installing Layer Style Advance can break Layer Style, but not the other way around, and the dependency list in this repository is correspondingly brutal.

The audience is ComfyUI users working on image compositing, matting and segmentation workflows who have hit a broken installation and want the problematic nodes isolated. The pyproject gives the version as 2.0.37 with MIT licensing, and the repository is not archived with the last push on 2026-09-18. The project publishes through Comfy Registry with a publisher id of chflame163, and the top-level tree also holds a Chinese README, a js/ directory for the web interface, a locales/ directory for translations, and a workflow/ directory of example graphs.

Installing the plugin: manager, clone or zip

The readme gives three routes, and it is explicit that the commands are written for the ComfyUI official portable package and the Aki ComfyUI package, and that the dependency environment directory needs to be changed for other ComfyUI environments.

The recommended one is ComfyUI Manager. The second is a clone into the plugin directory:

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

And the third is downloading the zip, extracting it, and copying the resulting folder into the custom_nodes directory of ComfyUI.

What comes after the plugin itself is where the difficulty is, and the readme is candid about it. For the ComfyUI official portable package you double-click install_requirements.bat in the plugin directory; for the Aki package you double-click install_requirements_aki.bat. Both scripts are in the repository root, alongside a repair_dependency_list.txt that the repair scripts presumably read.

The manual route shows what those batch files do, and it is the same pip sequence with a different interpreter path. For the official portable package, the embedded Python lives three directories up:

code
..\..\..\python_embeded\python.exe -s -m pip install .\whl\docopt-0.6.2-py2.py3-none-any.whl
..\..\..\python_embeded\python.exe -s -m pip install .\whl\hydra_core-1.3.2-py3-none-any.whl
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt
.\repair_dependency.bat

For the Aki package the interpreter is two levels up instead of three:

code
..\..\python\python.exe -s -m pip install .\whl\docopt-0.6.2-py2.py3-none-any.whl
..\..\python\python.exe -s -m pip install .\whl\hydra_core-1.3.2-py3-none-any.whl
..\..\python\python.exe -s -m pip install -r requirements.txt
.\repair_dependency.bat

The two wheels are bundled in the whl/ directory in the repository, which is the interesting trick. docopt and hydra-core are installed from local files before requirements.txt is processed, because pip resolves them in an order that breaks on the newer package index otherwise. The -s flag disables user site packages, so the install goes into ComfyUI's own embedded Python rather than your system one. After the install, you restart ComfyUI.

Model files: Baidu and Quark for China, Hugging Face elsewhere

The plugin needs model files, and the readme splits the instructions by network location, which is a detail that tells you a lot about who this is for.

Users in China are pointed at BaiduNetdisk or QuarkNetdisk, and other users at a Hugging Face repository under chflame163/ComfyUI_LayerStyle. Either way you download all the files and copy them into the models folder of ComfyUI, and the Hugging Face link provides all the model files required for the plugin. The alternative is to download individual model files according to the instructions of each node.

There is a specific case worth knowing about. Nodes named Ultra use the vitmatte model, so you need the vitmatte model, which is also included in the main download link, and it goes into a vitmatte subfolder of ComfyUI/models. The repository tree has a face_landmarker/ directory and a florence2_models/ directory, which are the model files that ship with the plugin rather than being downloaded separately.

The dependency on a Chinese file-sharing service for the primary download path is a practical constraint rather than a design flaw, but it does mean the install story differs by geography, and it means a network-restricted environment has to plan for the mirror.

The dependency list explains the repair scripts

Look at what the plugin depends on and the troubleshooting section becomes predictable. The requirements.txt pulls in numpy, matplotlib, scikit_image, scikit_learn, opencv-contrib-python, pymatting, timm, blend_modes, transformers at 4.45.0 or above, diffusers, loguru, colour-science, huggingface_hub at 0.23.4 or above, segment_anything, addict, omegaconf, yapf, wget, iopath, mediapipe, typer_config, fastapi, rich, google-generativeai, google-genai at 1.5.0 or above, pillow at 10.1.0 or above, ultralytics at 8.2.0 or above, transparent-background, accelerate at 0.26.0 or above, onnxruntime, bitsandbytes at 0.41.1 or above, peft at 0.12.0 or above, protobuf, hydra-core, blind-watermark, qrcode, pyzbar, psd-tools, zhipuai and openai.

The pyproject dependency list largely overlaps that, and it also includes google-genai, typer-config and fastapi again, and openai.

Now the troubleshooting entries make sense, because each one is a version conflict between two of those packages. The error Cannot import name 'guidedFilter' from 'cv2.ximgproc' is caused by an incorrect version of opencv-contrib-python, or by that package being overwritten by other opencv packages, and the NameError for guidedFilter has the same cause. Cannot import name 'VitMatteImageProcessor' from 'transformers' is caused by a low version of transformers. And insightface loading very slowly is caused by a low version of protobuf.

For those three dependency packages, the readme's advice is to double-click repair_dependency.bat for the official portable package or repair_dependency_aki.bat for ComfyUI-aki-v1.x, and the existence of repair_dependency_list.txt in the root is the manifest of what those scripts fix.

A documented failure mode for every stage of the install

The Common Issues section is the most valuable part of this readme, because for a plugin with this many dependencies the failures are predictable and the author has written them all down.

The ini warning is the harmless one. A message like xxxx.ini not found, use default xxxx means the ini file cannot be found and does not affect usage, and if you do not want to see the warnings you can modify all the *.ini.example files in the plugin directory to *.ini. The root directory holds api_key.ini.example, custom_size.ini.example and resource_dir.ini.example, so there are three such files.

The ModuleNotFoundError for psd_tools means psd_tools was not installed correctly, and the fix is to close ComfyUI, open a terminal in the plugin directory and run../../../python_embeded/python.exe -s -m pip install psd_tools. If that in turn fails with a missing docopt module, the readme points at the docopt wheel on piwheels.org for a manual install.

Two more common ones. The onnxruntime error about CUDA_PATH being set but CUDA not being loadable is fixed by reinstalling the onnxruntime dependency package. And a model loading error that says the tool could not connect to huggingface.co is a network environment problem, with the documented workaround of forcing the HF_ENDPOINT environment variable to the hf-mirror.com endpoint by editing constants.py in the huggingface_hub package, adding the line after import os.

The last documented fix for this node is a protobuf downgrade to 3.20.3 or an environment variable, for the JoyCaption2 node, where the fix is also to check the transformers version, at least 4.43.2.

Config files, example workflows and the shape of the plugin

The plugin is a ComfyUI custom node package, so the interesting parts of the tree are the node implementations and the assets they load.

The py/ directory holds the Python side, the js/ directory the front end that ComfyUI renders as the node widgets, and the image/, font/, face_landmarker/ and florence2_models/ directories the assets and models the nodes read. The locales/ directory holds translations, and the workflow/ directory holds the example JSON workflow files that the readme describes as examples of how these nodes can be used in ComfyUI. The __init__.py at the root is the ComfyUI node registration entry point.

There is also a small web service surface. The dependency list includes fastapi, typer_config, rich, ultralytics and google-generativeai, and the pyproject lists the project URLs with a comment about it being used by the Comfy Registry, including a PublisherId of chflame163, a DisplayName of ComfyUI_LayerStyle_Advance and an icon URL.

The licensing is MIT, stated in the pyproject as a text field, and the repository is not archived. There are no GitHub releases, so the version history lives in the pyproject version field, currently 2.0.37, rather than in tags.

One thing the readme does not document is a working directory for the examples or a headless mode for the nodes, and the whole installation story is written around the two desktop ComfyUI packages. For a server-side deployment, that is the part you would have to work out yourself.

Editorial conclusion

ComfyUI Layer Style Advance fits a ComfyUI user whose workflow needs the heavy Layer Style nodes, such as matting, segmentation or transformer-based vision, and who is prepared to manage model files and repair a Python environment by hand. It does not fit someone wanting a lightweight ComfyUI install, or a deployment where the bundled model download and the dependency set are unwelcome. Before installing, run install_requirements.bat for your ComfyUI distribution, put the model files in ComfyUI\models, and keep repair_dependency.bat in mind, since the readme ties several common errors to specific package versions.

Frequently asked questions

What is ComfyUI Layer Style Advance and how does it differ from ComfyUI Layer Style?

It is the set of nodes detached from ComfyUI Layer Style, the ones mainly with complex requirements for dependency packages. Splitting them into a separate plugin contains installation conflicts, so a broken install of these nodes does not take the rest of the Layer Style set down with it.

How do I install the ComfyUI Layer Style Advance plugin?

Use ComfyUI Manager, or clone the repository into the ComfyUI custom_nodes directory with git clone, or download the zip and copy the extracted folder there. Then run install_requirements.bat for the official portable package or install_requirements_aki.bat for the Aki package, install the model files into ComfyUI\models, and restart ComfyUI.

Why does the manual install use pip install with local wheel files?

The whl/ directory bundles docopt and hydra-core wheels, and they are installed from those local files before requirements.txt is processed, because pip otherwise resolves them in an order that breaks. The -s flag keeps the install inside ComfyUI's embedded Python rather than your system one, and the repair_dependency.bat script at the end fixes the packages that conflict with each other.

Where do I download the model files for these ComfyUI nodes?

Users in China are pointed at BaiduNetdisk or QuarkNetdisk, and other users at the Hugging Face repository under chflame163/ComfyUI_LayerStyle. Files go into the ComfyUI\models folder, and nodes named Ultra additionally need the vitmatte model placed in ComfyUI/models/vitmatte.

How do I fix the guidedFilter and VitMatteImageProcessor import errors?

The guidedFilter import error is caused by an incorrect opencv-contrib-python version or by that package being overwritten by other opencv packages, and the VitMatteImageProcessor import error is caused by a low transformers version. The readme's answer for both, along with a slow insightface load caused by an old protobuf, is to run repair_dependency.bat for the official portable package or repair_dependency_aki.bat for ComfyUI-aki-v1.x.

Official sources

  1. chflame163/ComfyUI_LayerStyle_Advance 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-advance.svg)](https://hysenlabs.com/projects/chflame163-comfyui-layerstyle-advance)

Was this useful?