ComfyUI with AMD ROCm support for GPU-accelerated AI image generation on AMD RX 6000/7000+ GPUs
50K+
๐ฅ ComfyUI with AMD ROCm support - Run ComfyUI on AMD GPUs with optimized ROCm-compatible dependencies.
corundex/comfyui-rocm GitHub repositoryโ
ComfyUI running on AMD ROCm with sample workflow and generated landscape image
rocm/pytorch:rocm6.4.1_ubuntu24.04_py3.12_pytorch_release_2.6.0This ROCm-optimized build:
All packages in this container have been tested on real AMD hardware. See requirements_rocm.txt for the complete lists:
comfyui-frontend-package==1.23.4comfyui-workflow-templates==0.1.30comfyui-embedded-docs==0.2.3torchsdeeinopstransformers>=4.37.2tokenizers>=0.13.3sentencepiecesafetensors>=0.4.2pyyamlPillowalembicSQLAlchemykornia>=0.7.1spandrelav>=14.2.0pydantic~=2.0pydantic-settings~=2.0torchtorchvisionnumpy>=1.25.0aiohttp>=3.11.8yarl>=1.18.0scipytqdmpsutilsoundfiletorchaudio - Excluded from the image# Pull and run ComfyUI with ROCm support
docker run -d \
--device=/dev/kfd \
--device=/dev/dri \
--group-add=video \
-p 8188:8188 \
-v $(pwd)/models:/workspace/ComfyUI/models \
-v $(pwd)/output:/workspace/ComfyUI/output \
corundex/comfyui-rocm:latest
Access ComfyUI at: http://localhost:8188โ
# 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
rocm-smi
# Should show your AMD GPU(s)
docker 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=commonDownloads comprehensive starter set:
MODEL_DOWNLOAD=realisticDownloads realistic photo models:
MODEL_DOWNLOAD=photorealisticDownloads SDXL-based photorealistic models:
MODEL_DOWNLOAD=artisticDownloads creative/stylized models:
MODEL_DOWNLOAD=allDownloads everything from all model sets above (โ ๏ธ Large download ~100GB+)
MODEL_DOWNLOAD=noneSkips all downloads - uses only existing models in volumes
Add your own sections to models.yaml and use them:
MODEL_DOWNLOAD=mycustom
docker run -d \
--device=/dev/kfd --device=/dev/dri --group-add=video \
-p 8188:8188 \
-v ./models:/workspace/ComfyUI/models \
corundex/comfyui-rocm:latest
docker 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
docker 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
docker 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
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
models.yamlAdd your own model sections in YAML format:
models:
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
/workspace/ComfyUI/models/http://localhost:8188sample_workflow.json (included in this directory)Create docker-compose.yml:
version: '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 ready# Check ROCm drivers
rocm-smi
# Check Docker GPU access
docker run --rm --device=/dev/kfd --device=/dev/dri rocm/pytorch:latest rocm-smi
# 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 GitHub repositoryโ to:
This project is licensed under GPL-3.0.
Content type
Image
Digest
sha256:3079597cbโฆ
Size
21.5 GB
Last updated
over 1 year ago
docker pull corundex/comfyui-rocm