← 返回 Skills 市场
vilda007

ComfyUI DirectML AMD

作者 Vilém Kužel · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
32
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install comfyui-directml-amd
功能描述
Sets up and optimizes ComfyUI on AMD GPUs with DirectML on Windows, including fixes, compatible models, benchmarks, and automated configuration tools.
使用说明 (SKILL.md)

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)

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!

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
安全使用建议
Before installing, confirm you are on Windows with an intended ComfyUI directory, review that apply-directml-fixes.py will patch comfy/model_patcher.py, and keep the generated backup. Treat the missing download-models.ps1 and benchmark.py references as documentation gaps, and do not run separately sourced helper scripts unless you inspect them first.
功能分析
Type: OpenClaw Skill Name: comfyui-directml-amd Version: 1.0.0 The skill is a legitimate utility designed to help users configure ComfyUI for AMD GPUs using DirectML on Windows. The primary component, `apply-directml-fixes.py`, performs targeted patching of the `comfy/model_patcher.py` file to resolve compatibility issues by disabling the `comfy_aimdo` module, which is a documented workaround for DirectML users. The documentation in `SKILL.md` and `README.md` provides clear instructions for environment setup and model downloads from trusted sources like Hugging Face. No evidence of data exfiltration, malicious persistence, or prompt injection was found.
能力评估
Purpose & Capability
The stated purpose—setting up ComfyUI with DirectML on AMD GPUs—matches the included Python patch script. However, the documentation also describes helper tools such as download-models.ps1 and benchmark.py that are not present in the provided file manifest.
Instruction Scope
The instructions are user-directed setup and troubleshooting commands, including creating a Python environment, reinstalling torch-directml, running the patch script, downloading model files, starting a local ComfyUI server, and killing a ComfyUI Python process if needed. These are aligned with the purpose, and no hidden autonomous execution is shown.
Install Mechanism
There is no automatic install spec. The registry metadata under-declares requirements compared with skill.json and the docs, which indicate Windows plus tools such as uv and curl. This is a metadata completeness issue rather than evidence of unsafe behavior.
Credentials
The included script searches common ComfyUI locations or COMFYUI_PATH/current directory, then patches comfy/model_patcher.py and creates a backup. This is proportionate to the stated DirectML compatibility purpose, but it still mutates a local application install.
Persistence & Privilege
No credentials, account access, background services, scheduled tasks, or persistent agent memory are requested. The only persistence shown is a local .backup file created before patching.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install comfyui-directml-amd
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /comfyui-directml-amd 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - Complete AMD DirectML setup guide, automatic model_patcher.py fixes, model downloader scripts, performance benchmarks for RX 7000/6000 series
元数据
Slug comfyui-directml-amd
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

ComfyUI DirectML AMD 是什么?

Sets up and optimizes ComfyUI on AMD GPUs with DirectML on Windows, including fixes, compatible models, benchmarks, and automated configuration tools. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 32 次。

如何安装 ComfyUI DirectML AMD?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install comfyui-directml-amd」即可一键安装,无需额外配置。

ComfyUI DirectML AMD 是免费的吗?

是的,ComfyUI DirectML AMD 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ComfyUI DirectML AMD 支持哪些平台?

ComfyUI DirectML AMD 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ComfyUI DirectML AMD?

由 Vilém Kužel(@vilda007)开发并维护,当前版本 v1.0.0。

💬 留言讨论