You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated the base image of the Dockerfile to the latest version of
PyTorch (from PyTorch 2.8.0, CUDA 12.9, and cuDNN 9 to PyTorch 2.9.1,
CUDA 13.0, and cuDNN 9), updated the ComfyUI version to the latest
version (from ComfyUI 0.3.49 to ComfyUI 0.8.2), and updated the ComfyUI
Manager version to the latest version (from ComfyUI Manager 3.35 to
ComfyUI Manager 4.0.5). Also updated the GitHub Actions used in the
build-and-publish workflow to the latest versions available.
The name of the GitHub organization that maintains the ComfyUI project
has changed from @comfyanonymous to @Comfy-Org, so I updated the GitHub
repository URL used in the Dockerfile to clone the ComfyUI repository
to use the new organization name.
Furthermore, I went through the contributions of @alex-marinov made in
the pull request #31:
- Renamed the "docker-compose.yml" file to "compose.yml", which is now
the standard name for Docker Compose files.
- Removed some of the redundant comments in the Dockerfile, which were
already incorporated in the read me.
- Renamed the environment variables for the user ID and the group ID
used in the Docker Compose file.
- Added environment variables for the three volume directories used by
ComfyUI Docker (for the models, custom nodes, and outputs) in the
Docker Compose file.
- Updated the changelog to include the changes made by @alex-marinov
in the pull request #31.
- Included @alex-marinov in the list of contributors in the
"CONTRIBUTORS.md" file.
- Edited the read me to improve the instructions on using the Docker
Compose file and to make the information about creating the new output
volume directory stand out more using a warning.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,15 @@
1
1
# Changelog
2
2
3
+
## v0.6.0 (January 8, 2026)
4
+
5
+
- Updated the base image of the Dockerfile to the latest version of PyTorch (from PyTorch 2.8.0, CUDA 12.9, and cuDNN 9 to PyTorch 2.9.1, CUDA 13.0, and cuDNN 9).
6
+
- Updated the ComfyUI version to the latest version (from ComfyUI 0.3.49 to ComfyUI 0.8.2).
7
+
- Updated the ComfyUI Manager version to the latest version (from ComfyUI Manager 3.35 to ComfyUI Manager 4.0.5).
8
+
- Updated the versions of the checkout action, Python setup action, and attest build provenance action in the GitHub Actions workflow to their latest versions.
9
+
- The outputs of ComfyUI are now stored outside of the container in a directory on the host system. This prevents the loss of outputs when the container is removed. The read me was updated to reflect this change.
10
+
- A Docker Compose file was added to the repository to make running, managing, and updating ComfyUI Docker easier. The read me was updated to include instructions on how to use Docker Compose.
11
+
- This version of ComfyUI Docker was made possible by the contributions of [Alex Marinov](@alex-marinov).
12
+
3
13
## v0.5.0 (August 12, 2025)
4
14
5
15
- The ComfyUI Manager repository has been moved to a new organization and therefore, the URL from which it can be cloned has changed. This URL was updated in the Dockerfile.
This file contains a list of contributors to the ComfyUI Docker project.
3
+
The project was initially created and is maintained by [David Neumann](@lecode-official). The following people (in alphabetical order) have contributed in various ways to the development of ComfyUI Docker. Their contributions are greatly appreciated.
@@ -4,13 +4,15 @@ This is a Docker image for [ComfyUI](https://www.comfy.org/), which makes it ext
4
4
5
5
## Getting Started
6
6
7
-
To get started, you have to install [Docker](https://www.docker.com/). This can be either Docker Engine, which can be installed by following the [Docker Engine Installation Manual](https://docs.docker.com/engine/install/) or Docker Desktop, which can be installed by [downloading the installer](https://www.docker.com/products/docker-desktop/) for your operating system.
7
+
To get started, you have to install [Docker](https://www.docker.com/). This can be either Docker Engine, which can be installed by following the [Docker Engine Installation Manual](https://docs.docker.com/engine/install/) or Docker Desktop, which can be installed by [downloading the installer](https://www.docker.com/products/docker-desktop/) for your operating system. If you want to use Docker Compose to run the ComfyUI Docker container, then Docker Compose must also be installed. Docker Desktop comes with Docker Compose pre-installed. If you are using Docker Engine, you may already have Docker Compose installed. You can check this by running `docker compose version` in your terminal. If Docker Compose is not installed, you can follow the [Docker Compose Installation Manual](https://docs.docker.com/compose/install/) to install it.
8
8
9
9
To enable the usage of NVIDIA GPUs, the NVIDIA Container Toolkit must be installed. The installation process is detailed in the [official documentation](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
10
10
11
-
## Installation
11
+
## Installation & Running
12
12
13
-
The ComfyUI Docker image is available from the [GitHub Container Registry](https://ghcr.io). Installing ComfyUI is as simple as pulling the image and starting a container, which can be achieved using the following command:
13
+
### Installing & Running Using Docker Run
14
+
15
+
The ComfyUI Docker image is available from the [GitHub Container Registry](ghcr.io/lecode-official/comfyui-docker). Installing ComfyUI is as simple as pulling the image and starting a container, which can be achieved using the following command:
14
16
15
17
```shell
16
18
docker run \
@@ -30,70 +32,120 @@ docker run \
30
32
31
33
Please note, that the `<path/to/models/folder>`, `<path/to/custom/nodes/folder>` and `<path/to/output/folder>` must be replaced with paths to directories on the host system where the models, custom nodes and generated outputs (images, workflows, etc.) will be stored, e.g., `$HOME/.comfyui/models`, `$HOME/.comfyui/custom-nodes` and `$HOME/.comfyui/output`, which can be created like so: `mkdir -p $HOME/.comfyui/{models,custom-nodes,output}`.
32
34
33
-
The `--detach` flag causes the container to run in the background and `--restart unless-stopped` configures the Docker Engine to automatically restart the container if it stopped itself, experienced an error, or the computer was shutdown, unless you explicitly stopped the container using `docker stop`. This means that ComfyUI will be automatically started in the background when you boot your computer. The two `--env` arguments inject the user ID and group ID of the current host user into the container. During startup, a user with the same user ID and group ID will be created, and ComfyUI will be run using this user. This ensures that files written to the volumes (e.g., models and custom nodes installed with the ComfyUI Manager) will be owned by the host system's user. Normally, the user inside the container is `root`, which means that the files that are written from the container to the host system are also owned by `root`. If you have run ComfyUI Docker without setting the environment variables, then you may have to change the owner of the files in the models and custom nodes directories: `sudo chown -r "$(id -un):$(id -gn)" <path/to/models/folder> <path/to/custom/nodes/folder>`. The `--runtime nvidia` and `--gpus all` arguments enable ComfyUI to access the GPUs of your host system. If you do not want to expose all GPUs, you can specify the desired GPU index or ID instead.
35
+
> [!WARNING]
36
+
> If you are coming from a version prior to v0.6.0, please note that the output directory mapping was added in version v0.6.0. If the Docker container for the previous version is still available, you can migrate your existing outputs by copying them from the old container to the host system. Assuming your previous container was named `comfyui`, you can use the following command:
The `--detach` flag causes the container to run in the background and `--restart unless-stopped` configures the Docker Engine to automatically restart the container if it stopped itself, experienced an error, or the computer was shutdown, unless you explicitly stopped the container using `docker stop`. This means that ComfyUI will be automatically started in the background when you boot your computer. The two `--env` arguments inject the user ID and group ID of the current host user into the container. During startup, a user with the same user ID and group ID will be created, and ComfyUI will be run using this user. This ensures that files written to the volumes (e.g., models, custom nodes installed with the ComfyUI Manager, and outputs) will be owned by the host system's user. Normally, the user inside the container is `root`, which means that the files that are written from the container to the host system are also owned by `root`. If you have run ComfyUI Docker without setting the environment variables, then you may have to change the owner of the files in the models and custom nodes directories: `sudo chown -r "$(id -un):$(id -gn)" <path/to/models/folder> <path/to/custom/nodes/folder> <path/to/output/folder>`. The `--runtime nvidia` and `--gpus all` arguments enable ComfyUI to access the GPUs of your host system. If you do not want to expose all GPUs, you can specify the desired GPU index or ID instead.
34
43
35
44
After the container has started, you can navigate to [localhost:8188](http://localhost:8188) to access ComfyUI.
36
45
37
-
If you want to stop ComfyUI, you can use the following commands:
46
+
If you want to pass additional command line arguments to ComfyUI, you can do so by specifying them as the command when starting the container. For example, if you want to allow external web apps to connect to ComfyUI in the container, you can add the `--enable-cors-header` argument like so:
You can stop ComfyUI Docker using the following command:
38
66
39
67
```shell
40
68
docker stop comfyui
69
+
```
70
+
71
+
This will keep the container on your system, so that you can start it again later using:
72
+
73
+
```shell
74
+
docker start comfyui
75
+
```
76
+
77
+
To completely remove the container from your system, you can use the following command:
78
+
79
+
```shell
41
80
docker rm comfyui
42
81
```
43
82
44
83
> [!WARNING]
45
-
> While the custom nodes themselves are installed outside of the container, their requirements are installed inside of the container. This means that stopping and removing the container will remove the installed requirements. When the container is started again, the requirements will be automatically installed, but this may, depending on the number of custom nodes and their requirements, take some time.
46
-
47
-
## Docker Compose
48
-
49
-
Instead of using `docker run`, you can use the provided `docker-compose.yml` in this repository for easier management and updates.
50
-
51
-
1. (First time) Create the required host directories:
2. (Optional) Create a `.env` file next to `docker-compose.yml` to pin your user / group IDs:
56
-
```shell
57
-
echo"UID=$(id -u)"> .env
58
-
echo"GID=$(id -g)">> .env
59
-
```
60
-
If omitted, the defaults `1000` / `1000` in the compose file are used.
61
-
3. Start (or bring up after changes):
62
-
```shell
63
-
docker compose up -d
64
-
```
65
-
4. View logs:
66
-
```shell
67
-
docker compose logs -f
68
-
```
69
-
5. Update later:
70
-
```shell
71
-
docker compose pull
72
-
docker compose up -d
73
-
```
74
-
6. Stop / remove the container (keeps your data in the host directories):
75
-
```shell
76
-
docker compose down
77
-
```
78
-
79
-
Custom CLI arguments: edit the `command:` line in `docker-compose.yml` (uncomment or add) e.g.:
80
-
```yaml
81
-
command: ["--enable-cors-header", "*"]
84
+
> While the custom nodes themselves are installed outside of the container, their requirements are installed inside of the container. Also, in versions prior to v0.6.0, the outputs of ComfyUI were stored inside of the container. This means that removing the container will remove the installed requirements and all outputs you have not saved manually. When the container is started again, the requirements will be automatically installed, but this may, depending on the number of custom nodes and their requirements, take some time.
85
+
86
+
### Installing & Running Using Docker Compose
87
+
88
+
Instead of using `docker run`, you can use the provided [`compose.yml`](compose.yml) in this repository to make running, managing and updating ComfyUI Docker easier.
89
+
90
+
Models, custom nodes, and outputs are stored on the host system, by default in the `$HOME/.comfyui/models`, `$HOME/.comfyui/custom-nodes`, and `$HOME/.comfyui/output` directories, respectively. If you are running ComfyUI Docker for the first time, you have to create the required host directories for models, custom nodes, and outputs. You can do this by running:
You can change the paths to these directories using the `MODELS_PATH`, `CUSTOM_NODES_PATH`, and `OUTPUT_PATH` environment variables, respectively. To permanently set these environment variables, you can create a `.env` file alongside the [`compose.yml`](compose.yml) file with the following content:
97
+
98
+
```shell
99
+
MODELS_PATH=<path/to/models/folder>
100
+
CUSTOM_NODES_PATH=<path/to/custom/nodes/folder>
101
+
OUTPUT_PATH=<path/to/output/folder>
102
+
```
103
+
104
+
Normally, the user inside a Docker container is `root`, which means that the files that are written from the container to the host system are also owned by `root`. To avoid this, ComfyUI Docker creates a new user inside the container. By default, running the Docker Compose file will create a user and group with the IDs `1000` and `1000`, respectively. Most Linux systems have the first user created with these IDs. If your user has different IDs, you can change them using the `USER_ID` and `GROUP_ID` environment variables. To permanently set these environment variables, you can create a `.env` file alongside the `compose.yml` file to specify the correct IDs. You can find out your user and group IDs by running `id -u` and `id -g`in your terminal. To create the `.env` file, you can run:
105
+
106
+
```shell
107
+
echo"USER_ID=$(id -u)"> .env
108
+
echo"GROUP_ID=$(id -g)">> .env
82
109
```
83
-
Then apply changes:
110
+
111
+
After this, you can start ComfyUI Docker using Docker Compose:
112
+
113
+
```shell
114
+
docker compose up --detach
115
+
```
116
+
117
+
If the ComfyUI Docker image is not available locally, it will be pulled automatically. This will start ComfyUI in the background. The --detach flag causes the container to run in the background. You can then navigate to [localhost:8188](http://localhost:8188) to access ComfyUI.
118
+
119
+
Docker Compose will automatically assign all NVIDIA GPUs of your host system to the container. If you do not want to expose all GPUs, you have to update the `compose.yml` file to specify the desired GPUs under the `services.comfyui.deploy.resources.reservations.devices` section. `count: all` assigns all available GPUs to the container. You can replace it with `count: 1` to assign only one GPU, or you can specify specific GPU indices or IDs using the `device_ids` field. For example, to assign GPU-0 and GPU-3, you can specify `device_ids: ['0', '3']`.
120
+
121
+
To view the logs of the running container, you can use the following command:
122
+
84
123
```shell
85
-
docker compose up -d --force-recreate
124
+
docker compose logs --follow
86
125
```
87
126
88
-
Migrating existing outputs from a previously created container (non‑compose):
127
+
The `--follow` flag will continuously stream the logs to your terminal. Omitting this flag will show you the existing logs and then exit. To stop ComfyUI, you can use the following command:
This will stop the container and remove it from your system. If you need to run ComfyUI with custom arguments using Docker Compose, you can do so by adding a `command` section to the ComfyUI service in the `compose.yml` file. For example, to allow external web apps to connect to ComfyUI in the container, you can add the `--enable-cors-header` argument:
134
+
135
+
```yaml
136
+
command: ["--enable-cors-header", "*"]
91
137
```
92
138
93
-
After this, you can remove the old container and strictly use compose.
139
+
To apply the changes, you have to recreate the container:
140
+
141
+
```shell
142
+
docker compose up --detach --force-recreate
143
+
```
94
144
95
145
## Updating
96
146
147
+
### Updating Using Docker Run
148
+
97
149
To update ComfyUI Docker to the latest version you have to first stop the running container, then pull the new version, optionally remove dangling images, and then restart the container:
98
150
99
151
```shell
@@ -118,30 +170,15 @@ docker run \
118
170
ghcr.io/lecode-official/comfyui-docker:latest
119
171
```
120
172
121
-
If you want to pass additional command line arguments to ComfyUI, you can do so by specifying them as the command when starting the container. For example, if you want to allow external web apps to connect to ComfyUI in the container, you can add the `--enable-cors-header` argument like so:
0 commit comments