Skip to content

Run ComfyUI with OneDiff

Yao Chi edited this page Nov 17, 2023 · 17 revisions

Download the Image

Run the following command to download the pre-installed image of OneDiff Enterprise Edition with ComfyUI:

docker pull oneflowinc/comfyui-onediff:latest

Run the Image

docker run -it --shm-size=8G -P --privileged --runtime=nvidia --rm \
    --gpus all --network host \
    -v /path/to/comfyui/models/checkpoints:/app/ComfyUI/models/checkpoints \
    oneflowinc/comfyui-onediff:latest python /app/ComfyUI/main.py

NOTE

  • We have preloaded some models within the Docker image, with their respective paths being /app/ComfyUI/models/unet_int8/unet_int8, /app/ComfyUI/models/loras/watercolor_v1_sdxl_lora.safetensors. Please be cautious not to overwrite it due to mapping paths if you want to use them.
  • The directory structure of /app/ComfyUI/models within the docker image should follow the structure of ComfyUI/models which means:
models/
├── checkpoints
├── clip
├── clip_vision
├── configs
├── controlnet
├── diffusers
├── embeddings
├── gligen
├── hypernetworks
├── loras
├── style_models
├── unet
├── upscale_models
├── vae
└── vae_approx

How to Use

In the menu's section "Add Node/utils", there is a "Model Speed Up" Node that takes a MODEL as input and outputs an accelerated model.

image

Related Workflows

Load the screenshot images below in ComfyUI to try the workflow

SDXL Workflow (ComfyUI default workflow)

onediff-sdxl-workflow

LoRA

lora-onediff

OneDiff Enterprise Compared with Origin ComfyUI

onediff-pro

Clone this wiki locally