Categories
AI ComfyUI

ComfyUI on AMD GPU with DirectML

Just in case anyone is trying to get this to work, these are the steps I followed. These steps assume you have a rough idea of what you are trying to accomplish and how to get there; this is not a detailed step-by-step guide. I’m using Windows 11 with a 6700XT and the 23.11.1 drivers.

This was handy:
https://learn.microsoft.com/en-us/windows/ai/directml/gpu-pytorch-windows

Install miniconda.
https://docs.conda.io/en/latest/miniconda.html#windows-installers

Edit 11/28: Start an Anaconda Powershell Prompt.

Clone the ComfyUI code somewhere (you’ll need git installed).

mkdir d:\ai
cd d:\ai

git clone https://github.com/comfyanonymous/ComfyUI.git
cd comfyui

Start a conda environment for python 3.10 and activate it:

conda create --name dml python=3.10
conda activate dml

Verify the python version is 3.10 within the new environment:

python --version

Start installing other bits and pieces (the requirements.txt is in the comfyui root folder):

conda install numpy pandas tensorboard matplotlib tqdm pyyaml -y

pip install opencv-python
pip install wget
pip install torchvision
conda install pytorch cpuonly -c pytorch
pip install -r requirements.txt

Start comfyUI with:

python main.py --directml

You should then get the URL to be able to view ComfyUI.

Leave a Reply

Your email address will not be published. Required fields are marked *