The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
Go to file
clsferguson 39b0a0cca8
refactor(entrypoint): GPU-first probe, unify SageAttention logs, CM_* config management, remove UV/pip bootstrap
Move a detailed GPU probe to the top, logging per-device name/CC/memory and exiting early if no compatible GPUs (>=7.5), while storing a temporary SAGE_BUILD_STRATEGY for SageAttention builds; unify “SageAttention” naming and remove duplicate “Building” logs; remove UV usage and runtime pip bootstrap since deps are baked; add configure_manager_config to create or update ComfyUI-Manager’s persistent config.ini from CM_* environment variables on first and subsequent boots; keep Triton baked at 3.4.0 but switch to 3.2.0 at runtime for Turing strategies only; preserve system-wide installs and non-root ownership model.
2025-10-02 21:34:09 -06:00
.ci Add basic readme for AMD portable. (#10109) 2025-09-29 23:03:02 -04:00
.github Merge upstream/master, keep local README.md 2025-10-01 05:03:19 +00:00
alembic_db Add support for sqlite database (#8444) 2025-06-11 16:43:39 -04:00
api_server Add Load Image Output node (#6790) 2025-02-18 17:53:01 -05:00
app Add workflow templates version tracking to system_stats (#9089) 2025-09-26 21:29:13 -07:00
comfy Reduce Peak WAN inference VRAM usage - part II (#10062) 2025-09-27 18:14:16 -04:00
comfy_api Add Output to V3 Combo type to match what is possible with V1 (#9813) 2025-09-12 00:44:20 -04:00
comfy_api_nodes enable Seedance Pro model in the FirstLastFrame node (#10120) 2025-09-30 10:43:41 -07:00
comfy_config Add new fields to the config types (#8507) 2025-06-18 15:12:29 -04:00
comfy_execution Fix progress update crossover between users (#9706) 2025-09-04 19:13:28 -04:00
comfy_extras convert nodes_mahiro.py to V3 schema (#10070) 2025-09-29 12:35:51 -07:00
custom_nodes Lint unused import (#5973) 2024-12-09 15:24:39 -05:00
input LoadLatent and SaveLatent should behave like the LoadImage and SaveImage. 2023-05-18 00:09:12 -04:00
middleware dont cache new locale entry points (#10101) 2025-09-29 12:16:02 -07:00
models Add models/audio_encoders directory. (#9548) 2025-08-25 20:13:54 -04:00
output Initial commit. 2023-01-16 22:37:14 -05:00
script_examples Update comment in api example. (#9708) 2025-09-03 18:43:29 -04:00
tests add offset param (#9977) 2025-09-22 17:12:32 -04:00
tests-unit dont cache new locale entry points (#10101) 2025-09-29 12:16:02 -07:00
utils Add support for sqlite database (#8444) 2025-06-11 16:43:39 -04:00
.gitattributes Add Veo3 video generation node with audio support (#9110) 2025-08-05 01:52:25 -04:00
.gitignore More API Nodes (#7956) 2025-05-06 04:23:00 -04:00
alembic.ini Add support for sqlite database (#8444) 2025-06-11 16:43:39 -04:00
CODEOWNERS Add @kosinkadink as code owner (#10041) 2025-09-26 17:08:16 -04:00
comfyui_version.py ComfyUI version 0.3.62. 2025-09-30 15:12:07 -04:00
CONTRIBUTING.md Add CONTRIBUTING.md (#3910) 2024-07-01 13:51:00 -04:00
cuda_malloc.py Only enable cuda malloc on cuda torch. (#9031) 2025-07-23 19:37:43 -04:00
Dockerfile feat(dockerfile): enable PEP 517 globally and preinstall Manager deps 2025-10-02 11:14:34 -06:00
entrypoint.sh refactor(entrypoint): GPU-first probe, unify SageAttention logs, CM_* config management, remove UV/pip bootstrap 2025-10-02 21:34:09 -06:00
execution.py remove creation of non-used asyncio_loop (#9284) 2025-08-11 16:48:17 -04:00
extra_model_paths.yaml.example add 'is_default' to model paths config (#4979) 2024-09-19 08:59:55 -04:00
folder_paths.py Add models/audio_encoders directory. (#9548) 2025-08-25 20:13:54 -04:00
hook_breaker_ac10a0.py Prevent custom nodes from hooking certain functions. (#7825) 2025-04-26 20:52:56 -04:00
latent_preview.py Convert latents_ubyte to 8-bit unsigned int before converting to CPU (#6300) 2025-01-28 08:22:54 -05:00
LICENSE Initial commit. 2023-01-16 22:37:14 -05:00
main.py feat: ComfyUI can be run on the specified Ascend NPU (#9663) 2025-09-27 22:36:02 -04:00
new_updater.py Replace print with logging (#6138) 2024-12-20 16:24:55 -05:00
node_helpers.py Add append feature to conditioning_set_values (#8239) 2025-05-22 08:11:13 -04:00
nodes.py feat(api-nodes): add wan t2i, t2v, i2v nodes (#9996) 2025-09-23 11:36:47 -04:00
protocol.py Support for async node functions (#8830) 2025-07-10 14:46:19 -04:00
pyproject.toml ComfyUI version 0.3.62. 2025-09-30 15:12:07 -04:00
pytest.ini Execution Model Inversion (#2666) 2024-08-15 11:21:11 -04:00
README.md Add new portable links to readme. (#10112) 2025-09-30 12:17:49 -04:00
requirements.txt Update template to 0.1.91 (#10096) 2025-09-29 11:59:42 -07:00
server.py Add workflow templates version tracking to system_stats (#9089) 2025-09-26 21:29:13 -07:00

ComfyUI-Docker

An automated Repo for ComfyUI Docker image builds, optimized for NVIDIA GPUs.

AboutFeaturesGetting StartedUsageLicense


About

This image packages upstream ComfyUI with CUDA-enabled PyTorch and an entrypoint that can build SageAttention at container startup for modern NVIDIA GPUs.

The base image is python:3.12-slim (Debian trixie) with CUDA 12.9 developer libraries installed via apt and PyTorch installed from the cu129 wheel index.

It syncs with the upstream ComfyUI repository, builds a Docker image on new releases, and pushes it to GitHub Container Registry (GHCR).

I created this repo for myself as a simple way to stay up to date with the latest ComfyUI versions while having an easy-to-use Docker image.


Features

  • Daily checks for upstream releases, auto-merges changes, and builds/pushes Docker images.
  • CUDA-enabled PyTorch + Triton on Debian trixie with CUDA 12.9 dev libs so custom CUDA builds work at runtime.
  • Non-root runtime with PUID/PGID mapping handled by entrypoint for volume permissions.
  • ComfyUI-Manager auto-sync on startup; entrypoint scans custom_nodes and installs requirements when COMFY_AUTO_INSTALL=1.
  • SageAttention build-on-start with TORCH_CUDA_ARCH_LIST tuned to detected GPUs; enabling is opt-in at runtime via FORCE_SAGE_ATTENTION=1.

Getting Started

  • Install NVIDIA Container Toolkit on the host, then use docker run --gpus all or Compose GPU reservations to pass GPUs through.
  • Expose the ComfyUI server on port 8188 (default) and map volumes for models, inputs, outputs, and custom_nodes.

Pulling the Image

The latest image is available on GHCR:

docker pull ghcr.io/clsferguson/comfyui-docker:latest

For a specific version (synced with upstream tags, starting at 0.3.59):

docker pull ghcr.io/clsferguson/comfyui-docker:vX.Y.Z

Docker Compose

For easier management, use this docker-compose.yml:

services:
  comfyui:
    image: ghcr.io/clsferguson/comfyui-docker:latest
    container_name: ComfyUI
    runtime: nvidia
    restart: unless-stopped
    ports:
      - 8188:8188
    environment:
      - TZ=America/Edmonton
      - PUID=1000
      - GUID=1000
    gpus: all
    volumes:
      - comfyui_data:/app/ComfyUI/user/default
      - comfyui_nodes:/app/ComfyUI/custom_nodes
      - /mnt/comfyui/models:/app/ComfyUI/models
      - /mnt/comfyui/input:/app/ComfyUI/input
      - /mnt/comfyui/output:/app/ComfyUI/output

Run with docker compose up -d.


Usage

  • Open http://localhost:8188 after the container is up; change the external port via -p HOST:8188 or the internal port with ComfyUI --port/--listen.
  • To target specific GPUs, use Dockers GPU device selections or Compose device_ids in reservations.

SageAttention

  • The entrypoint builds and caches SageAttention on startup when GPUs are detected; runtime activation is controlled by FORCE_SAGE_ATTENTION=1.
  • If the SageAttention import test fails, the entrypoint logs a warning and starts ComfyUI without --use-sage-attention even if FORCE_SAGE_ATTENTION=1.
  • To enable: set FORCE_SAGE_ATTENTION=1 and restart; to disable, omit or set to 0.

Environment Variables

  • PUID/PGID: map container user to host UID/GID for volume write access.
  • COMFY_AUTO_INSTALL=1: auto-install Python requirements from custom_nodes on startup.
  • FORCE_SAGE_ATTENTION=0|1: if 1 and the module import test passes, the entrypoint adds --use-sage-attention.

License

Distributed under the MIT License (same as upstream ComfyUI). See LICENSE for more information.


Contact

Built with ❤️ for easy AI workflows.