From 28fbfe4aa84699e393a2a3440c018de60bcfbd84 Mon Sep 17 00:00:00 2001 From: Abdullah Barhoum Date: Sat, 27 Aug 2022 18:09:02 +0100 Subject: [PATCH] Update UI to 82770bac --- build/Dockerfile | 11 +++++++++-- docker-compose.yml | 3 +-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 073429e..6a765c9 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -10,10 +10,17 @@ RUN conda env update --file stable-diffusion/environment.yaml --name base && con RUN git clone https://github.com/hlky/stable-diffusion-webui.git && cd stable-diffusion-webui && \ - git reset --hard b2dc4539d4171ab4fc78471a5bb9425d6a5d5445 && \ + git reset --hard 82770bacae08f3b41a0df3eee9fca214d6b7fae6 && \ cp -t /stable-diffusion/scripts/ txt2img.yaml webui.py webui.yaml webui_playground.py && \ cd / && rm -rf stable-diffusion-webui +# newer versions of the UI uses arial as font, which needs to be installed +# https://github.com/hlky/stable-diffusion-webui/blob/82770bacae08f3b41a0df3eee9fca214d6b7fae6/webui.py#L364 +# this might change in the future, so we can remove it later +WORKDIR /tmp/ +RUN apt-get update && apt install cabextract wget && wget https://www.freedesktop.org/software/fontconfig/webfonts/webfonts.tar.gz &&\ + tar -xzf webfonts.tar.gz && cd msfonts/ && cabextract *.exe && cp Arial.TTF /stable-diffusion/arial.ttf &&\ + apt-get clean && rm -rf /tmp/ ENV TRANSFORMERS_CACHE=/cache/transformers TORCH_HOME=/cache/torch CLI_ARGS="" @@ -28,4 +35,4 @@ CMD ln -sf /models/model.ckpt /stable-diffusion/models/ldm/stable-diffusion-v1/m mkdir -p /cache/weights/ && rm -rf /opt/conda/lib/python3.8/site-packages/facexlib/weights && \ ln -sf /cache/weights/ /opt/conda/lib/python3.8/site-packages/facexlib/ && \ # run, -u to not buffer stdout / stderr - python3 -u scripts/webui.py ${CLI_ARGS} + python3 -u scripts/webui.py --outdir /output --save-metadata --ckpt /models/model.ckpt ${CLI_ARGS} diff --git a/docker-compose.yml b/docker-compose.yml index 69184fc..7f59af7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,8 +11,7 @@ services: - ./output:/output - ./models:/models environment: - - CLI_ARGS=--outdir /output --save-metadata --ckpt /models/model.ckpt - #--extra-models-cpu --optimized + - CLI_ARGS=--extra-models-cpu deploy: resources: reservations: