ComfyUI DirectML AMD

# ComfyUI DirectML AMD Skill 🎨

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ComfyUI DirectML AMD" with this command: npx skills add vilda007/comfyui-directml-amd

ComfyUI DirectML AMD Skill 🎨

Description

Skill 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.

When to Use This Skill

Use this skill when:

  • You have an AMD GPU (RX 7000/6000/5000 series) and want to run ComfyUI
  • You're getting errors with torch_directml module
  • You need to fix model_patcher.py for DirectML compatibility
  • You want to know which models are compatible with your VRAM
  • You're looking for AMD GPU performance benchmarks

Installation

# 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

Tools

apply-directml-fixes.py

Automatically applies all necessary DirectML fixes:

  • Fixes comfy\model_patcher.py (2 locations)
  • Creates backups of original files
  • Verifies functionality after application

download-models.ps1

Downloads recommended models:

  • SDXL Turbo (6.6 GB)
  • SDXL Base 1.0 (6.0 GB)
  • Juggernaut XL v9 (6.6 GB)
  • Optional: Flux.1, ACE-Step, Wan 2.1

benchmark.py

Tests performance with different models and settings:

  • Measures generation time
  • Monitors VRAM usage
  • Compares with CUDA references

Configuration

Minimum Requirements

  • GPU: AMD Radeon with 8GB+ VRAM
  • OS: Windows 10/11 64-bit
  • Python: 3.12 (DirectML has no wheels for 3.13+)
  • VRAM: 8GB minimum, 12GB+ recommended

Recommended 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

Performance Benchmarks (RX 7900 GRE 16GB)

ModelResolutionStepsTimeQuality
SDXL Turbo1024²130-60sGood
SDXL Base1024²205-10 minVery Good
Juggernaut XL1024²205-10 minExcellent
Flux.1 schnell1024²43-5 minBest

Note: DirectML is ~2-3x slower than CUDA on comparable NVIDIA GPU, but fully functional!

Common Errors and Solutions

ModuleNotFoundError: torch_directml

Solution: Python 3.14 is too new → create .venv with Python 3.12

SyntaxError in model_patcher.py

Solution: Skill automatically applies fixes, or use apply-directml-fixes.py

Port already in use

Solution: ComfyUI already running → kill process or use different port

Out of Memory

Solution: Reduce resolution, use FP8 models, or add --lowvram flag

ComfyUI crash during generation

Solution: DirectML is unstable → restart server, try fewer steps

OpenClaw Integration

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"
          }
        }
      }
    }
  }
}

References

Author

Klepeto 🦞 (vilda)
Tested on: AMD Radeon RX 7900 GRE 16GB, Windows 11

License

MIT-0 - Free to use, modify, and redistribute without attribution.

Changelog

1.0.0 (2026-05-07)

  • Initial release
  • Complete AMD DirectML setup guide
  • Automatic model_patcher.py fixes
  • Benchmark scripts
  • Model download scripts
  • OpenClaw integration

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

1688 Item Image Optimizer

1688 商品图片智能优化助手 —— 打开图片优化页面,为商品主图增加热卖元素。 触发词:优化图片、图片优化、主图优化、商品图片、改图。

Registry SourceRecently Updated
General

Skill Manager All In One | 一站式技能管理器

Manage OpenClaw skills end-to-end. 一站式管理 OpenClaw 技能的创建、修改、发布、更新、升版与审计。

Registry SourceRecently Updated
General

Gangtise 文件列表

在 Gangtise 文件中心按不同文档类型(报告、公告、纪要等)检索,返回文件 ID 以及关键元数据/摘要,并提供按类型与 ID 下载完整文件的辅助。当你需要在“找哪些文件(先定位)”的阶段进行定位/筛选,并可能进一步下载核验时,务必使用本技能。检索结果基于系统匹配与字段归纳,强调专业性、准确性与覆盖全面;如需...

Registry SourceRecently Updated
General

海量标讯智搜助手-标800

海量标讯智搜助手-标800,当用户提供复杂的搜索条件(多个关键词、排除特定词汇、指定金额区间)时调用,需精确组合查询条件,过滤无效信息,提供高准确率的数据反馈。

Registry SourceRecently Updated
1250pkuycl