Install and run ComfyUI on AMD GPU Windows with DirectML — no CUDA needed.
ComfyUI is a powerful node-based Stable Diffusion workflow engine. This repository automates setup for AMD GPUs on Windows using DirectML backend, eliminating the need for NVIDIA-specific tooling or ROCm compilation.
git clone https://github.com/ChharithOeun/comfyui-amd-windows-setup.git
cd comfyui-amd-windows-setup
pip install -r requirements.txt
python scripts/install.py
python scripts/launch.pyOpen your browser to http://localhost:8188 and start creating.
ComfyUI is a node-based interface for Stable Diffusion. Instead of typing prompts in a text box, you build workflows by connecting nodes:
- Model loaders → generators → samplers → output
- Easily branch pipelines for inpainting, upscaling, control networks
- Save workflows as JSON, run them repeatedly with tweaks
- Install custom nodes to extend functionality
Perfect for creative professionals, researchers, and automation workflows.
✅ DirectML Backend — Full AMD GPU support on Windows
✅ Automatic Installation — One-command ComfyUI setup
✅ Custom Nodes — Easy install of popular node packs
✅ Model Management — Checkpoints, LoRAs, ControlNets in organized folders
✅ Cross-Platform Scripts — Works on Windows (batch + Python)
✅ AMD Optimized — --fp32 flag avoids black image issues
✅ Fallback to CPU — If GPU detection fails, runs on CPU
python scripts/launch.pyOptionally:
--port 8080— Run on custom port (default: 8188)--no-fp32— Use fp16 (faster but may cause issues on some AMD GPUs)--cpu— Force CPU mode
python scripts/install_nodes.py --allOr install a specific node:
python scripts/install_nodes.py --node ComfyUI-Managerpython scripts/verify_gpu.pyThis checks DirectML support and diagnoses common issues.
Place models in these folders (created automatically):
- Checkpoints:
ComfyUI/models/checkpoints/ - LoRAs:
ComfyUI/models/loras/ - ControlNets:
ComfyUI/models/controlnet/ - VAE:
ComfyUI/models/vae/ - Inpainting:
ComfyUI/models/inpaint/
- Stable Diffusion 1.5 — Original base model
- Stable Diffusion 2.x — Higher quality outputs
- SDXL — Latest, highest quality (requires more VRAM)
- ControlNet — Precise image guidance (pose, depth, canny edge)
- LoRA — Lightweight style/concept fine-tuning
- Inpainting Models — Mask-based image editing
Run python scripts/verify_gpu.py to diagnose:
- Are AMD drivers installed?
- Is torch-directml installed?
- Try
--cpumode as fallback.
Solution: Use --fp32 flag (enabled by default). If explicitly disabled, add it back:
python scripts/launch.py # includes --fp32 by default- Start with Stable Diffusion 1.5 instead of SDXL
- Reduce resolution:
512x512instead of768x768 - Use
--fp16if your GPU has sufficient VRAM and doesn't show artifacts - Enable tiling or optimization nodes in ComfyUI UI
Why --fp32?
Some AMD GPUs have issues with fp16 (half precision), resulting in black/pink outputs. --fp32 (full precision) is safer.
Disable xformers:
xformers is NVIDIA-optimized. ComfyUI auto-detects and skips it on DirectML.
Driver Compatibility:
- AMD Radeon drivers (20.50+) required
- Update via AMD Radeon Software or Windows Update
This repo is one of several tools for running modern AI on AMD Windows hardware:
- amd-windows-toolkit — Central hub for AMD GPU setup, LLM runners, environment validation
- comfyui-amd-windows-setup ← you are here
- Other models & runners coming soon
Check out the toolkit for unified AMD GPU discovery, PyTorch DirectML validation, and more.
Found a bug or have a feature request? Open an Issue.
Want to contribute? See CONTRIBUTING.md.
MIT License — see LICENSE
If this project saved you hours of setup, consider buying me a coffee!