ComfyUI Flux is a Docker-based setup for running ComfyUI with FLUX.1 models and additional features.
- Dockerized ComfyUI environment
- Automatic installation of ComfyUI and ComfyUI-Manager
- Pre-configured with FLUX models and VAEs
- Easy model management and updates
- GPU support with CUDA 12.1
- Docker and Docker Compose
- NVIDIA GPU with CUDA support (for GPU acceleration)
- (Optional) Huggingface account and token (for downloading FLUX.1[dev] models)
-
(Optional) Create a
.env
file in the project root and add your Huggingface token:HF_TOKEN=your_huggingface_token
-
Download the
docker-compose.yml
file:wget https://raw.githubusercontent.com/frefrik/comfyui-flux/main/docker-compose.yml
Alternatively, you can create a
docker-compose.yml
file and copy/paste the following contents:services: comfyui: container_name: comfyui image: frefrik/comfyui-flux:latest restart: unless-stopped ports: - "8188:8188" volumes: - "./data:/app" environment: - CLI_ARGS= - HF_TOKEN=${HF_TOKEN} deploy: resources: reservations: devices: - driver: nvidia device_ids: ['0'] capabilities: [gpu]
-
Run the container using Docker Compose:
docker-compose up -d
Note: The first time you run the container, it will download all the included models before starting up. This process may take some time depending on your internet connection.
-
Access ComfyUI in your browser at
http://localhost:8188
Overview of the model files that will be automatically downloaded when using this container. Some model files require an HF_TOKEN
for download.
Type | Model File Name | Size | Notes |
---|---|---|---|
Checkpoint | flux1-dev-fp8.safetensors | 17 GiB | downloaded if HF_TOKEN is provided |
Checkpoint | flux1-schnell-fp8.safetensors | 17 GiB | |
CLIP | clip_l.safetensors | 235 MiB | |
CLIP | t5xxl_fp16.safetensors | 9.2 GiB | |
CLIP | t5xxl_fp8_e4m3fn.safetensors | 4.6 GiB | |
LoRA | flux_realism_lora.safetensors | 22 MiB | |
UNet | flux1-dev.safetensors | 23 GiB | downloaded if HF_TOKEN is provided |
UNet | flux1-schnell.safetensors | 23 GiB | |
VAE | ae.safetensors | 320 MiB |
Drag the images below into ComfyUI to load the corresponding workflows.
FLUX.1[schnell] | FLUX.1[dev] |
---|---|
- Models are automatically downloaded during container startup. You can modify the
scripts/models.txt
file to add or remove models. - The
data
directory is mounted as a volume for persistent storage of input files.
The ComfyUI and ComfyUI-Manager are automatically updated when the container starts. To update the base image and other dependencies, pull the latest version of the Docker image using:
docker-compose pull