Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI Prebuilt Docker Images

This repository provides Docker build configurations that package ComfyUI together with all prerequisites, in a few different flavors. It also contains GitHub Actions definitions that can build and publish them to the GitHub Container Registry.

Use cases

Motivation

The images are ready-to-run with all necessary dependencies already installed. This means that upgrading to a new version of ComfyUI simply means downloading a new image, instead of updating existing files in place. So no fear of breaking an existing installation while updating!

Automatic builds on upstream changes

The ComfyUI repository is checked periodically for updates, to ensure the images stay up to date.

latest master cpu-latest cpu-master amd-latest amd-master
base base latest base master base cpu-latest base cpu-master base amd-latest base amd-master
extensions ext latest ext master ext cpu-latest ext cpu-master ext amd-latest ext amd-master
ssh ssh latest ssh master ssh cpu-latest ssh cpu-master ssh amd-latest ssh amd-master

Available images

These images are currently published to the GitHub Container Registry:

Image Additional installed components
comfyui-base xFormers, FlashAttention-2, SageAttention2++, Nunchaku
comfyui-extensions ComfyUI-Manager
comfyui-ssh OpenSSH server

Available tags

Tag Description
latest Latest tagged release of ComfyUI for NVIDIA / CUDA 13.0
vX.Y.Z Latest image built for a specific tagged ComfyUI release for NVIDIA / CUDA 13.0
master Latest commit of the ComfyUI master branch for NVIDIA / CUDA 13.0
amd-latest / amd-master As above, but for AMD / ROCm 7.1.1
cpu-latest / cpu-master As above, but a plain Ubuntu base image without GPU support
amd-vX.Y.Z / cpu-vX.Y.Z Release-specific tags for AMD / ROCm 7.1.1 and CPU-only images

Release-specific tags track the current image for that upstream ComfyUI release and may move when this repository's Docker build logic changes.

Running locally

Basic usage

docker run --gpus=all -p 8188:8188 ghcr.io/radiatingreverberations/comfyui-extensions:latest

Additional options

Additional arguments will be forwarded to ComfyUI. For example, to enable SageAttention:

docker run --gpus=all -p 8188:8188 ghcr.io/radiatingreverberations/comfyui-extensions:latest --use-sage-attention

On first container start, the entrypoint creates /opt/venv if it does not already exist. That runtime venv inherits the system packages baked into the base image.

With persistent storage

Without any additional configuration, any files created from ComfyUI will be lost whenever the container is removed or recreated, such as when updating to a new version. So when running locally, you most likely want certain directories to be located outside of the container. For persistent storage, mount these directories:

Container Path Purpose
/comfyui/models Model files
/comfyui/user User settings and ComfyUI-Manager data
/comfyui/input Input images/videos
/comfyui/output Generated outputs

Persist custom nodes

When using the extensions image that includes ComfyUI-Manager, you may also want the custom nodes you install to persist across Docker image updates. Mount this additional directory:

Container Path Purpose
/comfyui/custom_nodes Custom nodes

Note that it is not recommended to update ComfyUI itself using ComfyUI-Manager - update to a later version of the Docker image instead.

Using Docker Compose

An example of putting it all together using Docker Compose:

services:
  comfyui:
    image: ghcr.io/radiatingreverberations/comfyui-extensions:latest
    container_name: comfyui
    command:
      - --use-sage-attention
    ports:
      - "8188:8188"
    volumes:
      - ./models:/comfyui/models
      - ./user:/comfyui/user
      - ./input:/comfyui/input
      - ./output:/comfyui/output
      - ./custom_nodes:/comfyui/custom_nodes
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    restart: unless-stopped

Windows specific notes

When running Docker images on Windows, it most likely runs on a Linux VM under WSL2. This means that they cannot access the Windows file systems directly, but have to use drvfs. This can make models take longer to load. The workaround is to put such files on a Linux file system directly inside WSL2.

Running on a cloud provider

If you want to run ComfyUI on a cloud provider without exposing the web UI directly, use the ssh image and connect through an SSH tunnel. The full setup and security notes are documented in SSH.md.

Building

Instead of using the pre-built images it is also possible to build them locally.

docker buildx bake

By default local builds consume:

  • ghcr.io/offloadr/base/cpu-core:py3.12-torch2.10.0-cpu
  • ghcr.io/offloadr/base/amd-core:py3.12-torch2.10.0-rocm7.1.1
  • ghcr.io/offloadr/base/nvidia-full:py3.12-torch2.10.0-cuda13.0.2

To override them, pass one or more Bake variables such as CPU_BASE_IMAGE, AMD_BASE_IMAGE, or NVIDIA_BASE_IMAGE.

Image details

ComfyUI base image

ComfyUI extensions image

ComfyUI SSH image

About

Docker images

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages