ComfyUI is a powerful and modular GUI that allows you to design and execute advanced stable diffusion pipelines using a graph-based interface. Historically, running Stable Diffusion on AMD GPUs in Windows was tricky, often relying on slower DirectML solutions. However, recent updates have brought native ROCm support to Windows, offering significantly better performance.
This blog post will guide you through the process of installing ComfyUI on a Windows system with an AMD GPU using the latest official methods.
Prerequisites
Before we begin, make sure you have the following:
- OS: A Windows operating system (Windows 10/11).
- GPU: An AMD GPU (Radeon RX 6000 series, RX 7000 series, or newer recommended).
- Drivers: Ensure your AMD Adrenalin drivers are up to date.
- 7-Zip: 7-Zip for extracting the archive.
- Python: (For manual installation) Python 3.10 or 3.11 is generally recommended, though the portable version handles this for you.
- Git: (For manual installation) Git installed.
Installation Methods
There are two primary methods for installing ComfyUI on Windows with an AMD GPU:
- Using the Portable Standalone Build (Easiest)
- Manual Installation (Advanced - Native ROCm)
Method 1: Using the Portable Standalone Build (Experimental)
The ComfyUI team now provides an experimental portable build specifically for AMD GPUs. This is the simplest way to get started.
- Download: Go to the ComfyUI releases page and scroll down to the "Assets" section of the latest release. Look for a file named
ComfyUI_windows_portable_amd.7z(or similar, indicating "portable" and "amd").- Note: If you don't see an explicit AMD portable file, check the release notes. Sometimes they are separate releases.
- Extract: Use 7-Zip to extract the downloaded archive to your desired location (e.g.,
C:\ComfyUI_Windows_Portable).- Important: If you encounter permission errors, right-click the
.7zfile, select Properties, check Unblock, and try again.
- Important: If you encounter permission errors, right-click the
- Run: Open the extracted folder. You should see batch files like
run_cpu.batand likely arun_nvidia_gpu.bat(which might be generic). Look for arun_amd_gpu.bator simply try runningrun_nvidia_gpu.bat—the internal environment should detect your AMD setup if it's the specific AMD build.- Note: If the portable build relies on standard scripts, simply double-click the main run script provided.
- Place Models: Place your Stable Diffusion checkpoints (the large
.ckptor.safetensorsfiles) in theComfyUI\models\checkpointsdirectory.
Method 2: Manual Installation (ROCm)
For the best performance and control, specifically for RDNA 3 (RX 7000 series) and RDNA 4 cards, a manual installation using PyTorch with ROCm support is recommended.
Clone the Repository: Open your terminal (Command Prompt or PowerShell) and run:
git clone https://github.com/comfyanonymous/ComfyUI.git cd ComfyUIInstall PyTorch with ROCm Support: You need to install the specific "nightly" version of PyTorch that supports ROCm on Windows. Run the command matching your GPU architecture inside your ComfyUI folder:
For RDNA 3 (RX 7000 Series):
pip install --pre torch torchvision torchaudio --index-url https://rocm.nightlies.amd.com/v2/gfx110X-dgpu/For RDNA 3.5 (Ryzen AI Max+ 365 / Strix Halo):
pip install --pre torch torchvision torchaudio --index-url https://rocm.nightlies.amd.com/v2/gfx1151/For RDNA 4 (RX 9000 Series):
pip install --pre torch torchvision torchaudio --index-url https://rocm.nightlies.amd.com/v2/gfx120X-all/
Install Other Dependencies:
pip install -r requirements.txtRun ComfyUI: Start the application:
python main.py
Troubleshooting & Overrides for Older GPUs
If you are using an older AMD GPU (like RX 6000 series / RDNA 2 or the RX 7600) and encounter crashes or errors with the manual installation, you may need to force a specific graphics version compatibility mode using environment variables.
Run the following command in your terminal before starting ComfyUI (or add it to a .bat script):
For RX 6700, 6600, and other RDNA 2 cards:
set HSA_OVERRIDE_GFX_VERSION=10.3.0 python main.pyFor RX 7600 and some RDNA 3 cards (if default fails):
set HSA_OVERRIDE_GFX_VERSION=11.0.0 python main.py
Performance Tips
Experimental Memory Efficient Attention: If you want to try enabling experimental optimizations (which might be default on RDNA 3), you can run:
set TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python main.py --use-pytorch-cross-attentionTunable Op (Startup Speed vs. Performance): To potentially improve generation speed at the cost of a slower initial launch (as it benchmarks operations):
set PYTORCH_TUNABLEOP_ENABLED=1 python main.py
Conclusion
With the introduction of native ROCm support on Windows, running ComfyUI on AMD GPUs has become much faster and more reliable than the older DirectML methods. Whether you choose the experimental portable build for convenience or the manual ROCm installation for maximum performance, you are now ready to generate amazing AI art.
For more assistance, join the vibrant community on the Matrix space or visit Comfy.org. Happy creating!
