Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pin-comfyui-cuda-12-8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"worker-comfyui": minor
---

Pin ComfyUI to 0.29.0, build on CUDA 12.8, and pin the runtime PyTorch to 2.11.0+cu128 so the image runs on every host allowed by the Hub config. `allowedCudaVersions` in `.runpod/hub.json` moves from 12.6/12.7 to 12.8–13.0 (driver >= 570). Existing Hub endpoints keep the old release and its near-exhausted 12.6/12.7 host pool — update your endpoint to this release to pick up the new host range.
2 changes: 1 addition & 1 deletion .runpod/hub.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"containerDiskInGb": 20,
"gpuIds": "ADA_24",
"gpuCount": 1,
"allowedCudaVersions": ["13.0"],
"allowedCudaVersions": ["12.8", "12.9", "13.0"],
"env": [
{
"key": "COMFY_ORG_API_KEY",
Expand Down
2 changes: 1 addition & 1 deletion .runpod/tests_.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@
"value": "false"
}
],
"allowedCudaVersions": ["12.7", "12.6"]
"allowedCudaVersions": ["12.8", "12.9", "13.0"]
}
}
22 changes: 17 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Build argument for base image selection
ARG BASE_IMAGE=nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04
ARG BASE_IMAGE=nvidia/cuda:12.8.1-cudnn-runtime-ubuntu24.04

# Stage 1: Base image with common dependencies
FROM ${BASE_IMAGE} AS base

# Build arguments for this stage with sensible defaults for standalone builds
ARG COMFYUI_VERSION=latest
ARG CUDA_VERSION_FOR_COMFY
ARG COMFYUI_VERSION=0.29.0
ARG CUDA_VERSION_FOR_COMFY=12.8
ARG ENABLE_PYTORCH_UPGRADE=false
ARG PYTORCH_INDEX_URL

Expand Down Expand Up @@ -48,7 +48,9 @@ RUN wget -qO- https://astral.sh/uv/install.sh | sh \
ENV PATH="/opt/venv/bin:${PATH}"

# Install comfy-cli + dependencies needed by it to install ComfyUI
RUN uv pip install comfy-cli pip setuptools wheel
# comfy-cli is pinned: its install/torch-index behavior decides what lands in
# the workspace venv, so an unpinned version makes builds non-reproducible.
RUN uv pip install comfy-cli==1.13.0 pip setuptools wheel

# Install ComfyUI
RUN if [ -n "${CUDA_VERSION_FOR_COMFY}" ]; then \
Expand Down Expand Up @@ -76,7 +78,17 @@ RUN if [ "$ENABLE_PYTORCH_UPGRADE" = "true" ]; then \
# breaking API changes also crash ComfyUI at startup. Pinning them in the same
# RUN downgrades within one layer, so the unwanted versions aren't left behind
# bloating the image.
RUN uv pip install -r /comfyui/requirements.txt \
#
# torch is installed FIRST, pinned to +cu128 builds: ComfyUI's requirements.txt
# declares a bare `torch`, and default PyPI serves CUDA 13 builds (torch's PyPI
# wheels depend on nvidia-*-cu13 since 2.11) that require driver >= 580. Hosts
# allowed in .runpod/hub.json advertise CUDA 12.8/12.9 (driver 570/575), where
# a cu13 torch fails CUDA init at startup. cu128 builds run on driver >= 570,
# i.e. every allowed host. Installing torch first satisfies the bare `torch`
# requirement so the PyPI pass doesn't touch it.
RUN uv pip install torch==2.11.0 torchvision==0.26.0 torchaudio==2.11.0 \
--index-url https://download.pytorch.org/whl/cu128 \
&& uv pip install -r /comfyui/requirements.txt \
&& for r in /comfyui/custom_nodes/*/requirements.txt; do \
[ -f "$r" ] && uv pip install -r "$r" || true; \
done \
Expand Down
8 changes: 4 additions & 4 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ variable "RELEASE_VERSION" {
}

variable "COMFYUI_VERSION" {
default = "latest"
default = "0.29.0"
}

# Global defaults for standard CUDA 12.6.3 images
# Global defaults for standard CUDA 12.8.1 images
variable "BASE_IMAGE" {
default = "nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04"
default = "nvidia/cuda:12.8.1-cudnn-runtime-ubuntu24.04"
}

variable "CUDA_VERSION_FOR_COMFY" {
default = "12.6"
default = "12.8"
}

variable "ENABLE_PYTORCH_UPGRADE" {
Expand Down
Loading