Skip to content
Node packVerifiedExternal
Open source

ComfyUI-LayerDivider

ComfyUI LayerDivider is custom nodes that generating layered psd files inside ComfyUI

Maintainer@jtydhr88A · adoptiongrade

Package profile

Status
Verified
Publisher
@jtydhr88
Source
GitHub

README

EN | 中文

ComfyUI LayerDivider

ComfyUI LayerDivider is custom nodes that generating layered psd files inside ComfyUI, original implement is mattyamonaca/layerdivider

image1 image2 https://github.com/jtydhr88/ComfyUI-LayerDivider/assets/860985/3ceb0638-1ed7-4e01-b231-03c4408c95e3

Environment

I tested the following environment, it might work on other environment, but I don't test:

Common

  1. Windows 10/Ubuntu
  2. GTX 3090
  3. Cuda 12.1

Env 1 - see Method 1

  1. ComfyUI embedded python (python 3.11) and ComfyUI Manager

Env 2 - see Method 2

  1. conda
  2. Python 3.11

Env 3 - see Method 3

  1. conda
  2. Python 3.11

Env 4 - see Method 4

  1. Ubuntu
  2. conda/Python 3.11
  3. cuda 12.1

(Common) Installation - CUDA & cuDNN

This repo requires specific versions of CUDA and cuDNN to be installed locally:

(Common) Installation - Visual Studio Build Tools

It might also require Visual Studio Build Tools. However, I am not sure because my local already installed previously. If it needs, you can find from Visual Studio Build Tools.

(Method 1) Installation - ComfyUI Embedded Plugin & ComfyUI Manager

  1. You could clone this repo inside comfyUI/custom_notes directly git clone https://github.com/jtydhr88/ComfyUI-LayerDivider.git
  2. or use ComfyUI Manager manager
  3. However, no matter which way you choose, it will fail at first time error
  4. Stop ComfyUI
  5. Then go to custom_nodes\ComfyUI-LayerDivider, and run install_windows_portable_win_py311_cu121.bat

Done!

(If you prefer to use conda and python 3.10, you could follow the next)

(Method 2) Installation - ComfyUI

You could use conda to manage and create the ComfyUI runtime environment:

  • use cmd/terminal to enter the comfyui root folder (which includes run_cpu.bat and run_nvidia_gpu.bat)
  • conda create --name comfy-py-310 python=3.10
  • conda activate comfy-py-310
  • pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu121
  • pip install -r ComfyUI\requirements.txt

Then you can run python -s ComfyUI\main.py --windows-standalone-build to check ComfyUI running properly.

(Method 2) Installation - ComfyUI LayerDivider

Then we can clone and configure this repo for ComfyUI:

  • cd ComfyUI\custom_nodes
  • pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
  • pip install Cython
  • pip install pytoshop -I --no-cache-dir
  • pip install psd-tools --no-deps
  • git clone https://github.com/jtydhr88/ComfyUI-LayerDivider.git
  • cd ComfyUI-LayerDivider
  • pip install -r requirements.txt

Congratulation! You complete all installation!

(Method 3) Installation - ComfyUI LayerDivider

Assume you already have a conda python3.11 env

  • activate your env
  • go into this folder and run install_conda_win_py311_cu121.bat

Congratulation! You complete all installation!

(Method 4) Ubuntu Installation - ComfyUI LayerDivider

Assume you already have a python3.11 env + cuda 12.1

  • clone this repo inside custom_nodes folder
  • cd ComfyUI-LayerDivider/
  • pip install -r requirements.txt

Then make sure run them one by one:

  • pip install cython
  • pip install pytoshop -I --no-cache-dir
  • pip install psd_tools
  • pip install onnxruntime-gpu==1.17.0 --extra-index-url https://aiinfra.pkgs

Nodes in this pack

4 nodes
  • LayerDivider - Color Base
  • LayerDivider - Divide Layer
  • LayerDivider - Load SAM Mask Generator
  • LayerDivider - Segment Mask

Sources

3 sources
GitHubSourceVersion 615b7943ca91a8f7d4cef87804ac7cda154282cc
github.com/jtydhr88/ComfyUI-LayerDivider

Verified Oct 23

Source excerpts

1 excerpt

Source context: Repo jtydhr88/ComfyUI-LayerDivider