Quellcode durchsuchen

Update UI to 82770bac

Abdullah Barhoum vor 4 Jahren
Ursprung
Commit
28fbfe4aa8
2 geänderte Dateien mit 10 neuen und 4 gelöschten Zeilen
  1. 9 2
      build/Dockerfile
  2. 1 2
      docker-compose.yml

+ 9 - 2
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 && \
 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  && \
   cp -t /stable-diffusion/scripts/  txt2img.yaml webui.py webui.yaml webui_playground.py  && \
   cd / && rm -rf stable-diffusion-webui
   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=""
 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 && \
   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/ && \
   ln -sf  /cache/weights/ /opt/conda/lib/python3.8/site-packages/facexlib/ && \
   # run, -u to not buffer stdout / stderr
   # 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}

+ 1 - 2
docker-compose.yml

@@ -11,8 +11,7 @@ services:
       - ./output:/output
       - ./output:/output
       - ./models:/models
       - ./models:/models
     environment:
     environment:
-      - CLI_ARGS=--outdir /output --save-metadata --ckpt /models/model.ckpt
-      #--extra-models-cpu --optimized
+      - CLI_ARGS=--extra-models-cpu
     deploy:
     deploy:
       resources:
       resources:
         reservations:
         reservations: