Skip to main content

ComfyUV Deployment Guide

Overview

This guide explains how to deploy the Docker image:

sandichhuu/comfyuv on Docker Hub


An optimized, production-ready ComfyUI Docker image built with uv for ultra-fast Python package management. It comes pre-configured with modern performance optimizations like Triton, SageAttention.

Important Note:

⚠️ This image is only support nvidia RTX20xx (sm75), RTX30xx (sm86).
✅ Compatible with higher GPU RTX40xx, 50xx, ..., but not optimized.

Compatible GPU List
SM75 : RTX 2060, 2070, 2080, 2080 Ti, and their Super/Laptop variants.
SM86 : RTX 3050, 3060, 3070, 3080, 3090, A2, A10, A16, A40, A2000, A4000, A5000, A6000 and their Super/Laptop variants.
Newer : Runnable, but not fastest.
Unsupported : GTX10xx and older series, AMD or Intel GPU.

⚠️ Unsupport xformers.
Because cu132 have no pre-build for this package & have no reason to use the slowest method.
✅ You can use sage-attention or triton instead.

⚠️ No longer support flash-attn (because the compile time is super slow).
✅ You can do it your self with this command:

MAX_JOBS=10 NVCC_THREADS=1 uv pip install flash-attn --no-build-isolation  

Why use this Docker image for ComfyUI?

  • Blazing Fast Execution: Leverages uv for ultra-fast package management and bytecode compilation. Built on CUDA 13.2, delivering superior performance compared to older versions like CUDA 12.8 or 13.0.
  • Precompiled Ecosystem: Comes out-of-the-box with precompiled essential packages and popular custom nodes, saving you significant setup and compile time.
  • Privacy-Focused (No Analytics): Completely stripped of telemetry and analytics tracking. Your data and workflows remain entirely private.
  • Optimized for cloud: You can public the website without configuration. Use caddy or nginx for authentication.

Preinstalled sage-attn and custom nodes:

Quick Start (Docker Compose)

Requirements

⬇️ Docker
⬇️ nvidia-driver
⬇️ cuda-toolkit

docker-compose.yml

services:
  comfyuv:
    image: sandichhuu/comfyuv:sm86cu132
    container_name: comfyuv
    ipc: host
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    volumes:
      - ./input:/comfy/input
      - ./output:/comfy/output
      - ./workflows:/comfy/user/default/workflows
      - ./models:/comfy/models
      - ./workflows:/comfy/user/default/workflows
      
      - comfyuv:/comfy
      - uv_cache:/root/.cache/uv
    command: >
      --enable-triton-backend
#     --use-flash-attention unsupport becase it take long times to compile.
#     --lowvram
      --use-sage-attention
      --disable-pinned-memory
      --fast fp8_matrix_mult autotune
      --front-end-version Comfy-Org/ComfyUI_frontend@latest

volumes:
  comfyuv:
  uv_cache:

Files Structure

comfyuv/
├── docker-compose.yml
├── config.ini
├── input/
├── models/
├── workflows/
└── output/

Why have no all-in-one image ?

All GPU support int4, int8, fp16, fp32.
But each GPU series has different physics structure due to different kernels and different attention optimization.

For example RTX4090 support fp8 native, RTX5090 support fp8 & nvfp4 native.
RTX40xx fastest with FlashAttention3, RTX50xx with FlashAttention4.
If I compile everything on one image, the file size come super heavy.
And the compile time is slow as hell.

I have to put a lot of effort to build this image.
If the compilation failed, I have to wait several hours to fix and recompile.

So, All-In-One image is impossible.