ComfyUI Setup Guide - ajgillis04/GillisDockerDepot GitHub Wiki

ComfyUI Setup Guide

Introduction

ComfyUI generates and edits images on your own GPU. Here it's the image back end for OpenWebUI Setup Guide (WSL2 Docker), so you can ask for a picture in chat, or upload a photo and ask for changes.

Requires an NVIDIA GPU with the NVIDIA container toolkit (or Docker Desktop's GPU support on Windows/WSL 2).

Compose

compose/server2/comfyui.yaml:

services:
  comfyui:
    container_name: comfyui.${HOST_NAME}
    image: yanwk/comfyui-boot:cu130-slim-v2
    gpus: all
    environment:
      TZ: ${TZ}
      CLI_ARGS: "--preview-method none"
      OLLAMA_URL: http://ollama.${HOST_NAME}:11434
    ports:
      - "127.0.0.1:${COMFYUI_PORT}:8188"   # no login, so this machine only
    volumes:
      - comfyui_models:/root/ComfyUI/models          # Docker volume, fast disk
      - ${DOCKERDIR}/comfyui/output:/root/ComfyUI/output
      - ${DOCKERDIR}/comfyui/input:/root/ComfyUI/input
      - ${DOCKERDIR}/comfyui/user:/root/ComfyUI/user
    restart: always
volumes:
  comfyui_models:
    name: comfyui_models
  • ComfyUI has no login, so its port is published on 127.0.0.1 only. Open WebUI reaches it over the Docker network by name.
  • Keep models in a Docker volume. On Windows/WSL 2, loading multi-gigabyte models from a Windows drive (/mnt/d) takes minutes; a volume on the WSL disk is fast.
  • Pick an image that doesn't open public tunnels by default. Some all-in-one ComfyUI images start Cloudflare quick-tunnels unless you turn them off.

Models

Download into the volume's checkpoints, diffusion_models, text_encoders and vae folders, matching what your workflow expects. Smaller distilled models generate in seconds on a 12 GB card. Editing models that take reference images (for example FLUX.2 Klein 4B) let chat edit uploaded photos; expect faces to come out close rather than exact, and quality to drop with repeated edits.

Sharing One GPU with Ollama

A 12 GB card can't hold a large language model and an image model at once. A small custom node can ask Ollama to unload its model before each image (Ollama's API: a request with "keep_alive": 0) and let it reload afterwards. Expect the first chat reply after an image to be a few seconds slower.

Connecting Open WebUI

Admin Panel → Settings → Images: engine ComfyUI, URL http://comfyui.<host>:8188, then import your workflow JSON (saved from ComfyUI with Export (API)) and map its prompt, size and seed nodes.

Troubleshooting

  • CUDA out of memory: another app holds the GPU (Ollama, a Tdarr node transcoding). Unload or pause it.
  • Blank or black images: the workflow's model names don't match the files in the volume.
  • Slow first image: the model is loading from disk; later images are faster.
⚠️ **GitHub.com Fallback** ⚠️