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
Copy file name to clipboardExpand all lines: README.md
+44-16Lines changed: 44 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,13 @@ When using RTX 50xx GPUs:
25
25
- you must use NVIDIA driver 570 (or above).
26
26
- use the `ubuntu24_cuda12.8` container tag (or above).
27
27
28
+
When using GTX 10xx GPUs:
29
+
- use the `ubuntu24_cuda12.6.3` container tag.
30
+
- set `PREINSTALL_TORCH=true` to enable the automatic installation of a CUDA 12.6 version of PyTorch.
31
+
- (recommended) set `USE_PIPUPGRADE=false` to disable the use of `pip3 --upgrade`.
32
+
- (optional) set `DISABLE_UPGRADES=true` to disable any Python package upgrade when starting the container (also disables `USE_PIPUPGRADE`). Use Comfy Manager to upgrade components.
33
+
- (optional) set `PREINSTALL_TORCH_CMD="pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126"` to install torch with the `cu126` index-url.
34
+
28
35
<h2>About "latest" tag</h2>
29
36
30
37
`latest` now points to the `ubuntu24_cuda12.6.3` tag (as announced in the `20250320` release)
@@ -85,6 +92,7 @@ If this version is incompatible with your container runtime, please see the list
85
92
| ubuntu24_cuda12.6.3-latest |`latest`|`latest` as of `20250413` release |
86
93
| ubuntu24_cuda12.8-latest || minimum required for Blackwell (inc RTX 50xx) hardware (see "Blackwell support" section) |
87
94
| ubuntu24_cuda12.9-latest |||
95
+
| ubutnu24_cuda13.0-latest || Untested |
88
96
89
97
For more details on driver capabilities and how to update those, please see [Setting up NVIDIA docker & podman (Ubuntu 24.04)](https://www.gkr.one/blg-20240523-u24-nvidia-docker-podman).
90
98
@@ -140,7 +148,8 @@ It is recommended that a container monitoring tool be available to watch the log
-[6.4. using BASE\_DIRECTORY with an outdated ComfyUI](#64-using-base_directory-with-an-outdated-comfyui)
168
+
-[6.4.1. using a specific ComfyUI version or SHA](#641-using-a-specific-comfyui-version-or-sha)
169
+
-[6.4.2. Errors with ComfyUI WebUI -- re-installation method with models migration](#642-errors-with-comfyui-webui----re-installation-method-with-models-migration)
160
170
-[7. Changelog](#7-changelog)
161
171
162
172
# 1. Preamble
@@ -611,22 +621,32 @@ When set, it will "force chown" every sub-folder in the `run` and `basedir` fold
611
621
612
622
### 5.4.7. USE_PIPUPGRADE
613
623
614
-
The `USE_PIPUPGRADE` environment variable is used to enable the use of `pip3 install --upgrade` to upgrade ComfyUI and other Python packages to the latest version during startup.
624
+
The `USE_PIPUPGRADE` environment variable is used to enable the use of `pip3 install --upgrade` to upgrade ComfyUI and other Python packages to the latest version during startup. If not set, it will use `pip3 install` to install packages.
615
625
616
-
This option is enabled by default as with the sepratation of the UI from the Core ComfyUI code, it is possible to be off-synced with the latest version of the UI.
626
+
This option is enabled by default as with the sepraation of the UI from the Core ComfyUI code, it is possible to be off-synced with the latest version of the UI.
617
627
618
628
It can be disabled by setting `USE_PIPUPGRADE=false`.
619
629
620
-
### 5.4.8. PREINSTALL_TORCH
630
+
### 5.4.8. DISABLE_UPGRADES
631
+
632
+
The `DISABLE_UPGRADES` environment variable is used to disable upgrades when starting the container (also disables USE_PIPUPGRADE).
633
+
634
+
This option is disabled by default (set to `false`) as it is recommended to keep the UI up to date (since it was decoupled from the core code). To enable its features, set `DISABLE_UPGRADES=true`.
635
+
636
+
It is recommended to only use it on a fresh install of the container, as it will attempt to prevent Comfy and other Python packages from being upgraded outside of the WebUI. Any package update will have to be performed through the WebUI (ComfyUI Manager).
637
+
638
+
### 5.4.9. PREINSTALL_TORCH and PREINSTALL_TORCH_CMD
621
639
622
640
The `PREINSTALL_TORCH` environment variable will attempt to automatically install/upgrade `torch` after the virtual environment is created.
623
641
624
642
It will also check the version of CUDA supported by the container such that for CUDA 12.8, it will install `torch` with the `cu128` index-url.
625
643
626
-
This should prevent the need to use the `PyTorch2.7-CUDA12.8.sh` script.
627
-
628
644
This option is enabled by default. It can be disabled by setting `PREINSTALL_TORCH=false`.
629
645
646
+
The `PREINSTALL_TORCH_CMD` environment variable can be used to override the torch installation command with the one specified in the variable. For example for GTX 1080, try to use `PREINSTALL_TORCH_CMD="pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126"`. It is likely also recommended to not set `USE_PIPUPGRADE=false` in this case.
647
+
648
+
Please note that the `PREINSTALL_TORCH_CMD` variable is not added to the Unraid template, and must be manually added if used.
649
+
630
650
## 5.5. ComfyUI Manager & Security levels
631
651
632
652
[ComfyUI Manager](https://github.com/ltdrdata/ComfyUI-Manager/) is installed and available in the container.
@@ -863,18 +883,25 @@ If you are curious and want to learn more, check [this video](https://supercut.a
863
883
864
884
# 6. Troubleshooting
865
885
866
-
## 6.1. Virtual environment
886
+
## 6.1. Comfy crash
887
+
888
+
It is possible that despite the container starting and setting itself up correctly, ComfyUI will crash.
889
+
You will recognize this in the Docker log as `!! ERROR: ComfyUI failed or exited with an error`.
890
+
The log might contain the reason for the crash, but you can also look up the ComfyUI logs in the container to get more details. Those are in `basedir/user/*.log`.
891
+
If Comfy crashes after it succesfully performs its internal checks (starts (`Starting server`) it is likely a Comfy/custom node error and not related to the container itself.
892
+
893
+
## 6.2. Virtual environment
867
894
868
895
The `venv` in the "run" directory contains all the Python packages the tool requires.
869
896
In case of an issue, it is recommended that you terminate the container, delete (or rename) the `venv` directory, and restart the container.
870
897
The virtual environment will be recreated; any `custom_scripts` should re-install their requirements; please see the "Fixing Failed Custom Nodes" section for additional details.
871
898
872
-
## 6.2. run directory
899
+
## 6.3. run directory
873
900
874
901
It is also possible to rename the entire "run" directory to get a clean installation of ComfyUI and its virtual environment. This method is preferred, compared to deleting the "run" directory—as it will allow us to copy the content of the various downloaded `ComfyUI/models`, `ComfyUI/custom_nodes`, generated `ComfyUI/outputs`, `ComfyUI/user`, added `ComfyUI/inputs`, and other folders present within the old "run" directory.
875
902
If using the `BASE_DIRECTORY` environment variable, please note that some of that `run` directory content will be moved to the `BASE_DIRECTORY` specified.
876
903
877
-
## 6.3. using BASE_DIRECTORY with an outdated ComfyUI
904
+
## 6.4. using BASE_DIRECTORY with an outdated ComfyUI
878
905
879
906
If using the `BASE_DIRECTORY` option and the program exit saying the `--base-directory` option does not exist, this is due to an outdated ComfyUI installation. A possible solution is to disable the option, restart the container and use the ComfyUI-Manager to update ComfyUI. Another option is manually update the code: `cd run/ComfyUI; git pull`
880
907
In some case, it is easier to create a simple `user_script.bash` to perform those steps; particularly on Unraid.
@@ -893,7 +920,7 @@ Make sure to change file ownership to the user with the `WANTED_UID` and `WANTED
893
920
894
921
**After the process complete, you should be presented with the WebUI. Make to delete or rename the script to avoid upgrading ComfyUI at start time, and use ComfyUI Manager instead.**
895
922
896
-
### 6.3.1. using a specific ComfyUI version or SHA
923
+
### 6.4.1. using a specific ComfyUI version or SHA
897
924
898
925
Following the conversation in https://github.com/mmartial/ComfyUI-Nvidia-Docker/issues/32
899
926
Use a `user_script.bash` to install a specific version of ComfyUI
@@ -918,7 +945,7 @@ Make sure to change file ownership to the user with the `WANTED_UID` and `WANTED
918
945
919
946
**After the process complete, you should be presented with the WebUI. Make sure to delete or rename the script to avoid it being run again.**
920
947
921
-
### 6.3.2. Errors with ComfyUI WebUI -- re-installation method with models migration
948
+
### 6.4.2. Errors with ComfyUI WebUI -- re-installation method with models migration
922
949
923
950
Sometimes a `custom_nodes` might cause the WebUI to fail to start, or error out with a message (ex: `Loading aborted due to error reloading workflow data`). In such cases, it is recommended to start from a brand new `run` and `basedir` folders, since `run` contains ComfyUI and the `venv` (virtual environment) that is required to run the WebUI, and `basedir` contains the `models` and `custom_nodes`. Because we would prefer to not have to redownload the models, the following describes a method to do so, such that you will be able to copy the content of the `models` folder from a `_old ``run` and `basedir` folders to the new ones.
924
951
@@ -938,6 +965,7 @@ Once you are confident that you have migrated content from the old container's f
938
965
939
966
# 7. Changelog
940
967
968
+
- 20250817: Added automatic PyTorch selection for `PREINSTALL_TORCH` environment variable based on CUDA version + added `DISABLE_UPGRADES` and `PREINSTALL_TORCH_CMD` environment variables.
941
969
- 20250713: Attempting to automatically select the `cu128` index-url when CUDA 12.8 (or above) is detected when using the `PREINSTALL_TORCH` environment variable (enabled by default).
942
970
- 20250607: Added `USE_PIPUPGRADE` and `USE_SOCAT` environment variables + added CUDA 12.9 build.
943
971
- 20250503: Future proof [extras/PyTorch2.7-CUDA12.8.sh](./extras/PyTorch2.7-CUDA12.8.sh) to use `torch>=2.7` instead of `torch==2.7.0` + added `run/pip_cache` and `run/tmp` folders support
0 commit comments