From 034c98b50f45e2e169d726c17841670a42f1e485 Mon Sep 17 00:00:00 2001 From: lslowmotion Date: Thu, 2 May 2024 19:05:57 +0700 Subject: [PATCH] Add support for ComfyUI --- README.md | 4 +++- docker-compose.yml | 18 +++++++++--------- services/comfy/Dockerfile | 6 +++--- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9a668dc..3348ea0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Run Stable Diffusion on your Radeon machine with a nice UI without any hassle! NOTE: - Only ROCm supported for now -- Only AUTOMATIC1111 is confirmed to work for now +- Supports AUTOMATIC1111 and ComfyUI - CUDA support to be worked on later - Requires podman-compose 1.1.0 or newer @@ -34,6 +34,8 @@ $ podman generate systemd --new webui-docker_auto_1 > ~/.config/systemd/user/aut $ systemctl --user enable --now automatic1111.service ``` +**You can change `--profile auto` to `--profile comfy` to change AUTOMATIC1111 to ComfyUI** + ## Features This repository provides multiple UIs for you to play around with stable diffusion: diff --git a/docker-compose.yml b/docker-compose.yml index 10d8d5b..ba2d609 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,15 +59,15 @@ services: # environment: # - CLI_ARGS=--no-half --precision full --allow-code --enable-insecure-extension-access --api # - invoke: &invoke - <<: *base_service - profiles: ["invoke"] - build: ./services/invoke/ - image: sd-invoke:30 - environment: - - PRELOAD=true - # - CLI_ARGS=--xformers - - CLI_ARGS= + # invoke: &invoke + # <<: *base_service + # profiles: ["invoke"] + # build: ./services/invoke/ + # image: sd-invoke:30 + # environment: + # - PRELOAD=true + # # - CLI_ARGS=--xformers + # - CLI_ARGS= # invoke-cpu: # <<: *invoke diff --git a/services/comfy/Dockerfile b/services/comfy/Dockerfile index 363df0b..ea02d16 100644 --- a/services/comfy/Dockerfile +++ b/services/comfy/Dockerfile @@ -3,14 +3,14 @@ FROM rocm/pytorch:rocm6.1_ubuntu22.04_py3.10_pytorch_2.1.2 ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 -RUN apt-get update && apt-get install -y git && apt-get clean +RUN apt-get update && apt-get install -y git cargo nasm && apt-get clean ENV ROOT=/stable-diffusion RUN --mount=type=cache,target=/root/.cache/pip,Z \ - git clone https://github.com/comfyanonymous/ComfyUI.git ${ROOT} && \ + git clone --recursive https://github.com/comfyanonymous/ComfyUI.git ${ROOT} && \ cd ${ROOT} && \ git checkout master && \ - git reset --hard d1f3637a5a944d0607b899babd8ff11d87100503 && \ +# git reset --hard d1f3637a5a944d0607b899babd8ff11d87100503 && \ pip install -r requirements.txt WORKDIR ${ROOT}