I’ve got something cool to share today! If you’ve been trying to run Comfy UI on your AMD GPU, you’re in luck—this is totally possible now on Windows! Not long ago, this wasn’t even an option, but thanks to some tweaks, you can now set it up easily.
Steps to Get Comfy UI Running
Running Comfy UI on Windows is actually pretty similar to other Stable Diffusion setups, but there are a few key differences when you’re using AMD. Here’s a quick breakdown of how to get it up and running:
- Install Miniconda and Git: Before anything, make sure you have Miniconda and Git set up on your system. Don’t forget to add Miniconda to your path!
- Create a New Conda Environment:
- Create a new environment called comfyUI.
- Target Python 3.10.12.
- Clone the Comfy UI Repo: Head over to the Comfy UI GitHub page and clone the repo using this command:
git clone https://github.com/comfyanonymous/comfyui.git
- Install Dependencies: Once you’ve cloned it, navigate to the directory and install the necessary dependencies with:
pip install -r requirements.txt
- Install Torch with DirectML: To make it work with AMD GPUs, you’ll need to install torch with DirectML. Use the command:
pip install torch-directml
- Run the Web UI: After everything’s installed, just run the command:
python main.py --directml
- Access the UI: Finally, go to the URL shown in the terminal (usually
http://127.0.0.1:5000
) and boom, you’re in!
Performance and Use
Running on an AMD 7900 XTX here, I tested it out, and while it’s not the fastest (you’ll get about 6 iterations per second), it works pretty smoothly for a normal model. The best part? You don’t need to convert models or mess with anything. Just drop in a model from Hugging Face or Civitai, and it’s good to go.
If you want to add more models, like the animerge model, just drop it in the models
folder, hit refresh, and you’re set!
Automating the Process
For those looking to automate the setup, you can create a batch file to run Comfy UI. It’s not perfect yet, but it’s a nice shortcut. Here’s a simple script to get you started:
conda activate comfyUI
cd comfyUI
python main.py --directml
Wrap Up
If you’re an AMD user and want to get started with Comfy UI on Windows, this setup guide should have you covered. The interface might seem complicated at first, but it’s powerful once you get the hang of it. And once you’ve got it running, you can dive into all kinds of creative AI projects.
Remember, it’s not just about the setup—it’s about having fun with it! So, give it a shot and see what kind of models you can create.
A big shoutout to the creator of the video—if this guide helped, consider subscribing to his channel. He puts out awesome content, and it’s a great way to show support!
Subscribe here 👇
https://www.youtube.com/watch?v=8rB7RqKvU5U