Install
openclaw skills install comfyui-directml-amdSets up and optimizes ComfyUI on AMD GPUs with DirectML on Windows, including fixes, compatible models, benchmarks, and automated configuration tools.
openclaw skills install comfyui-directml-amdSkill for setting up and optimizing ComfyUI on AMD GPUs under Windows using DirectML. Provides guides, fixes, and ready-to-use configurations for local image, music, and video generation.
Use this skill when:
torch_directml modulemodel_patcher.py for DirectML compatibility# 1. Install skill
clawhub install comfyui-directml-amd
# 2. Navigate to directory
cd C:\ComfyUI
# 3. Create Python 3.12 environment (if not already done)
uv venv --python 3.12
# 4. Install DirectML
.venv\Scripts\python.exe -m pip install torch-directml --force-reinstall
# 5. Apply fixes (automated by this skill)
python apply-directml-fixes.py
# 6. Start ComfyUI
.venv\Scripts\python.exe main.py --directml --port 8188
apply-directml-fixes.pyAutomatically applies all necessary DirectML fixes:
comfy\model_patcher.py (2 locations)download-models.ps1Downloads recommended models:
benchmark.pyTests performance with different models and settings:
# For 16GB VRAM (RX 7900 GRE/XTX)
python main.py --directml --port 8188 --max-memory 16384
# For 12GB VRAM (RX 7800/6800)
python main.py --directml --port 8188 --max-memory 12288 --use-split-cross-attention
# For 8GB VRAM (RX 7600/6600)
python main.py --directml --port 8188 --max-memory 8192 --lowvram
| Model | Resolution | Steps | Time | Quality |
|---|---|---|---|---|
| SDXL Turbo | 1024² | 1 | 30-60s | Good |
| SDXL Base | 1024² | 20 | 5-10 min | Very Good |
| Juggernaut XL | 1024² | 20 | 5-10 min | Excellent |
| Flux.1 schnell | 1024² | 4 | 3-5 min | Best |
Note: DirectML is ~2-3x slower than CUDA on comparable NVIDIA GPU, but fully functional!
ModuleNotFoundError: torch_directmlSolution: Python 3.14 is too new → create .venv with Python 3.12
SyntaxError in model_patcher.pySolution: Skill automatically applies fixes, or use apply-directml-fixes.py
Port already in useSolution: ComfyUI already running → kill process or use different port
Out of MemorySolution: Reduce resolution, use FP8 models, or add --lowvram flag
ComfyUI crash during generationSolution: DirectML is unstable → restart server, try fewer steps
Skill is compatible with OpenClaw comfy plugin:
{
"plugins": {
"entries": {
"comfy": {
"enabled": true,
"config": {
"baseUrl": "http://127.0.0.1:8188",
"image": {
"workflowPath": "comfy-workflows/image-generation.json"
}
}
}
}
}
}
Klepeto 🦞 (vilda)
Tested on: AMD Radeon RX 7900 GRE 16GB, Windows 11
MIT-0 - Free to use, modify, and redistribute without attribution.