- ZLUDA (Install ZLUDA and add it to the PATH environment variable)
- Git
- Miniconda
-
Download and install Miniconda from here.
-
Open the Anaconda Prompt (miniconda3) terminal.
-
Create a new directory where you want to save your files.
-
Navigate to the directory and execute the following command:
conda create -n comfyui python=3.10.8 -y
-
Activate the environment:
conda activate comfyui
-
Change directory to
ComfyUI
:cd .\ComfyUI\
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
.\venv\Scripts\activate
-
Install the required packages:
.\venv\Scripts\python.exe -m pip install -r .\requirements.txt
-
Install Torch and Torchvision:
pip install torch==2.3.1 torchvision --index-url https://download.pytorch.org/whl/cu118
-
Navigate to
venv\Lib\site-packages\torch\lib
-
Copy
cublas64_11.dll
andcusparse64_11.dll
from ZLUDA (cublas.dll
andcusparse.dll
respectively) and paste them here. -
使用
replacement/<版本号>/model_management.py
中的文件对应你的ComfyUI版本替换,否则原版会报找不到定义的错误。 IMPORTANT Before running ComfyUI, you must apply the following changes inmodel_management.py
located inComfyUI\comfy
:-
此处不需要覆盖 cuda_malloc.py,启动项附带参数 --disable-cuda-malloc 规避了对于此文件的替换验证。
-
Run the main script (规避
cuda_malloc.py
的未验证):python main.py --disable-cuda-malloc
Now, ComfyUI should be up and running using AMD with ZLUDA on Windows.
注意:不要使用原版的 dll文件 和 py文件直接替换,亲测一堆BUG,这个文件示例已经旧了。需要根据你的版本根据以上方法从安装的文件进行复制或者修改后复制再覆盖,只有replacement目录下的文件可以直接覆盖到对应的ComfyUI版本。该仓库拷贝自 https://github.com/zubenelakrab/ComfyUI_AMD_ZLUDA