
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
🔥 ComfyUI with AMD ROCm support - Run ComfyUI on AMD GPUs with optimized ROCm-compatible dependencies.
/models:/workspace/ComfyUI/models \ -v $(pwd)/output:/workspace/ComfyUI/output \ corundex/comfyui-rocm:latest
Access ComfyUI at: http://localhost:8188
bash# Ubuntu/Debian curl -fsSL https://repo.radeon.com/rocm/rocm.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/rocm.gpg echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.4 jammy main" | sudo tee /etc/apt/sources.list.d/rocm.list sudo apt update && sudo apt install rocm-dkms sudo usermod -a -G render,video $USER
bashrocm-smi # Should show your AMD GPU(s)
bashdocker run -d \ --name comfyui-rocm \ --device=/dev/kfd \ --device=/dev/dri \ --group-add=video \ -p 8188:8188 \ -v ./models:/workspace/ComfyUI/models \ -v ./output:/workspace/ComfyUI/output \ -v ./input:/workspace/ComfyUI/input \ -v ./custom_nodes:/workspace/ComfyUI/custom_nodes \ corundex/comfyui-rocm:latest
| Host Path | Container Path | Purpose |
|---|---|---|
./models | /workspace/ComfyUI/models | Store models (checkpoints, VAE, LoRA, etc.) |
./output | /workspace/ComfyUI/output | Generated images and videos |
./input | /workspace/ComfyUI/input | Input images for processing |
./custom_nodes | /workspace/ComfyUI/custom_nodes | Custom ComfyUI extensions |
The ComfyUI Docker image includes an intelligent model management system that automatically downloads models based on your needs.
Control model downloading with the MODEL_DOWNLOAD environment variable:
MODEL_DOWNLOAD=default (Default)
Downloads essential model to get started:
MODEL_DOWNLOAD=common
Downloads comprehensive starter set:
MODEL_DOWNLOAD=realistic
Downloads realistic photo models:
MODEL_DOWNLOAD=photorealistic
Downloads SDXL-based photorealistic models:
MODEL_DOWNLOAD=artistic
Downloads creative/stylized models:
MODEL_DOWNLOAD=all
Downloads everything from all model sets above (⚠️ Large download ~100GB+)
MODEL_DOWNLOAD=none
Skips all downloads - uses only existing models in volumes
Custom Model Sets
Add your own sections to models.yaml and use them:
bashMODEL_DOWNLOAD=mycustom
Basic Usage (SD 1.5 only)
bashdocker run -d \ --device=/dev/kfd --device=/dev/dri --group-add=video \ -p 8188:8188 \ -v ./models:/workspace/ComfyUI/models \ corundex/comfyui-rocm:latest
Common Model Set
bashdocker run -d \ --device=/dev/kfd --device=/dev/dri --group-add=video \ -p 8188:8188 \ -e MODEL_DOWNLOAD=common \ -v ./models:/workspace/ComfyUI/models \ corundex/comfyui-rocm:latest
All Models (Large Download)
bashdocker run -d \ --device=/dev/kfd --device=/dev/dri --group-add=video \ -p 8188:8188 \ -e MODEL_DOWNLOAD=all \ -v ./models:/workspace/ComfyUI/models \ corundex/comfyui-rocm:latest
No Downloads (Use Existing Models)
bashdocker run -d \ --device=/dev/kfd --device=/dev/dri --group-add=video \ -p 8188:8188 \ -e MODEL_DOWNLOAD=none \ -v ./models:/workspace/ComfyUI/models \ corundex/comfyui-rocm:latest
Automatic Skip Existing
Model Inventory
On startup, see what's available:
[ComfyUI] Current model inventory: checkpoints: 3 models vae: 1 models loras: 2 models upscale_models: 1 models controlnet: 3 models embeddings: 1 models
Edit models.yaml
Add your own model sections in YAML format:
yamlmodels: mycustom: - name: "My Custom Model" url: "https://example.com/model.safetensors" path: "checkpoints/my_model.safetensors" min_size: 2000000000 - name: "Another Model" url: "https://example.com/model2.safetensors" path: "checkpoints/model2.safetensors" min_size: 4000000000
Model Configuration Format
/workspace/ComfyUI/models/http://localhost:8188sample_workflow.json (included in this directory)Create docker-compose.yml:
yamlversion: '3.8' services: comfyui-rocm: image: corundex/comfyui-rocm:latest container_name: comfyui-rocm devices: - /dev/kfd:/dev/kfd - /dev/dri:/dev/dri group_add: - video ports: - "8188:8188" volumes: # Model storage (checkpoints, VAE, LoRA, etc.) - ./data/models:/workspace/ComfyUI/models # Generated images and outputs - ./data/output:/workspace/ComfyUI/output # Input images for processing - ./data/input:/workspace/ComfyUI/input # Custom nodes and extensions - ./data/custom_nodes:/workspace/ComfyUI/custom_nodes # ComfyUI user settings and workflows - ./data/user:/workspace/ComfyUI/user environment: # Model download behavior: default, common, realistic, photorealistic, artistic, all, none - MODEL_DOWNLOAD=default # ROCm environment - HIP_VISIBLE_DEVICES=0 - CUDA_VISIBLE_DEVICES="" restart: unless-stopped
Run with: docker compose up -d
./data/ ├── models/ # AI models (checkpoints, VAE, LoRA, etc.) │ ├── checkpoints/ # Main AI models (.safetensors) │ ├── vae/ # VAE models for better image quality │ ├── loras/ # LoRA fine-tuning models │ ├── embeddings/ # Text embeddings │ ├── controlnet/ # ControlNet guidance models │ └── upscale_models/ # Image upscaler models ├── output/ # Generated images and videos ├── input/ # Input images for processing ├── custom_nodes/ # ComfyUI extensions └── user/ # User settings and saved workflows
default: Test with basic model firstall: Download full set when readybash# Check ROCm drivers rocm-smi # Check Docker GPU access docker run --rm --device=/dev/kfd --device=/dev/dri rocm/pytorch:latest rocm-smi
bash# Verify ROCm in container docker exec comfyui-rocm python -c "import torch; print(f'ROCm: {torch.cuda.is_available()}')"
This Docker image packages ComfyUI with ROCm support. ComfyUI is licensed under GPL-3.0.
Found an issue or want to contribute? Visit our https://github.com/corundex/comfyui-rocm to:
This project is licensed under GPL-3.0.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务