This commit is contained in:
Terry Jia
2024-05-17 22:40:24 -04:00
parent d03c3b68c4
commit 7c7ec503de
3 changed files with 34 additions and 30 deletions
+34 -30
View File
@@ -7,15 +7,41 @@
https://github.com/jtydhr88/ComfyUI-LayerDivider/assets/860985/3ceb0638-1ed7-4e01-b231-03c4408c95e3
## Environment
I only tested the following environment, it might work on other environment, but I don't test:
I tested the following environment, it might work on other environment, but I don't test:
### Common
1. Windows 10
2. conda
3. Python 3.10
4. GTX 3090
5. Cuda 12.1
2. GTX 3090
3. Cuda 12.1
## Installation - ComfyUI
First, this plugin depends on **Python 3.10**, which means we cannot use the default Python that comes with ComfyUI, as it is Python 3.11. For this reason, it is recommended to use conda to manage and create the ComfyUI runtime environment:
### 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.10
## (Common) Installation - CUDA & cuDNN
This repo requires specific versions of CUDA and cuDNN to be installed locally:
- For CUDA, I only install and test CUDA 12.1, you can find it from https://developer.nvidia.com/cuda-12-1-0-download-archive
- For cuDNN, it MUST be v8.9.2 - CUDA 12.x (according to https://github.com/mdboom/pytoshop/issues/9), you can find it from https://developer.nvidia.com/rdp/cudnn-archive
- After install and unzip, make sure you configure the PATH of your system variable ![Path](docs/paths.png)
## (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](https://visualstudio.microsoft.com/downloads/?q=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](docs/comfyui-manager.png)
3. However, no matter which way you choose, it will fail at first time ![error](docs/error.png)
4. Stop ComfyUI
5. Then go to **custom_nodes\ComfyUI-LayerDivider**, and run **install_windows_portable_win_py311_cu121.bat**
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`
@@ -24,18 +50,7 @@ First, this plugin depends on **Python 3.10**, which means we cannot use the def
Then you can run `python -s ComfyUI\main.py --windows-standalone-build` to check ComfyUI running properly.
## Installation - CUDA & cuDNN
Next, this repo also requires specific versions of CUDA and cuDNN to be installed locally:
- For CUDA, I only install and test CUDA 12.1, you can find it from https://developer.nvidia.com/cuda-12-1-0-download-archive
- For cuDNN, it MUST be v8.9.2 - CUDA 12.x (according to https://github.com/mdboom/pytoshop/issues/9), you can find it from https://developer.nvidia.com/rdp/cudnn-archive
- After install and unzip, make sure you configure the PATH of your system variable ![Path](docs/paths.png)
## 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](https://visualstudio.microsoft.com/downloads/?q=build+tools).
## Installation - ComfyUI LayerDivider
## (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/`
@@ -93,17 +108,6 @@ Here are two workflows for reference:
## Known issues
Sometimes, composite mode will fail on some images, such as ComfyUI example image, still under invesgating the cause
## Python 3.11? ComfyUI's Built-in Python?
As mentioned above, some dependency packages in the original library are only available in Python 3.10, not in Python 3.11. At this stage, a new runtime environment must be created independently of the Python that comes with ComfyUI.
However, it is possible that support for Python 3.11 may be found in the future.
## ComfyUI Manager?
I understand that many non-technical users rely on ComfyUI Manager for plugin installation and management. However, as mentioned in the installation instructions above, this plugin requires some local configuration, Python version, and the order of dependency installation.
Based on these considerations, it will not be registered on ComfyUI Manager, at least at this point in time.
## Credit & Thanks
- [mattyamonaca/layerdivider](https://github.com/mattyamonaca/layerdivider) - Original implement
- [ComfyUI](https://github.com/comfyanonymous/ComfyUI) - A powerful and modular stable diffusion GUI.
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB