Просмотр исходного кода

Update (#54)

* Update hlky

* Update auto
AbdBarho 4 лет назад
Родитель
Сommit
725e1f39ba

+ 1 - 0
.github/workflows/docker.yml

@@ -12,3 +12,4 @@ jobs:
       - run: docker compose --profile auto build --progress plain
       - run: docker compose --profile hlky build --progress plain
       - run: docker compose --profile lstein build --progress plain
+      - run: docker compose --profile download build --progress plain

+ 1 - 1
docker-compose.yml

@@ -37,7 +37,7 @@ services:
     volumes:
       - *v1
       - *v2
-      - ./services/AUTOMATIC1111/config.json:/docker/config.json
+      - ./services/AUTOMATIC1111/config.json:/stable-diffusion-webui/config.json
     environment:
       - CLI_ARGS=--medvram --opt-split-attention
 

+ 5 - 4
services/AUTOMATIC1111/Dockerfile

@@ -2,10 +2,11 @@
 
 FROM alpine/git:2.36.2 as download
 RUN <<EOF
-# who knows
+# because taming-transformers is huge
 git config --global http.postBuffer 1048576000
 git clone https://github.com/sczhou/CodeFormer.git repositories/CodeFormer
 git clone https://github.com/CompVis/stable-diffusion.git repositories/stable-diffusion
+git clone https://github.com/salesforce/BLIP.git repositories/BLIP
 git clone https://github.com/CompVis/taming-transformers.git repositories/taming-transformers
 rm -rf repositories/taming-transformers/data repositories/taming-transformers/assets
 EOF
@@ -40,7 +41,7 @@ RUN pip install --prefer-binary --no-cache-dir -r ${ROOT}/repositories/CodeForme
 
 # Note: don't update the sha of previous versions because the install will take forever
 # instead, update the repo state in a later step
-ARG SHA=b5d1af11b7dc718d4d91d379c75e46f4bd2e2fe6
+ARG SHA=c249bbb4d41ecfb43cf4ba43f23a4c8b08d8c56e
 RUN <<EOF
 cd stable-diffusion-webui
 git pull --rebase
@@ -48,7 +49,7 @@ git reset --hard ${SHA}
 pip install --prefer-binary --no-cache-dir -r requirements.txt
 EOF
 
-RUN pip install --prefer-binary -U --no-cache-dir opencv-python-headless markupsafe==2.0.1
+RUN pip install --prefer-binary -U --no-cache-dir opencv-python-headless markupsafe==2.0.1 gfpgan==1.3.5
 
 ENV TRANSFORMERS_CACHE=/cache/transformers TORCH_HOME=/cache/torch CLI_ARGS=""
 
@@ -59,4 +60,4 @@ RUN chmod +x /docker/mount.sh && python3 /docker/info.py ${ROOT}/modules/ui.py
 WORKDIR ${WORKDIR}
 EXPOSE 7860
 # run, -u to not buffer stdout / stderr
-CMD /docker/mount.sh && python3 -u ../../webui.py --listen --port 7860 ${CLI_ARGS}
+CMD /docker/mount.sh && python3 -u ../../webui.py --listen --port 7860 --hide-ui-dir-config ${CLI_ARGS}

+ 48 - 1
services/AUTOMATIC1111/config.json

@@ -1 +1,48 @@
-{"outdir_samples": "/output", "outdir_txt2img_samples": "/output/txt2img-images", "outdir_img2img_samples": "/output/img2img-images", "outdir_extras_samples": "/output/extras-images", "outdir_txt2img_grids": "/output/txt2img-grids", "outdir_img2img_grids": "/output/img2img-grids", "outdir_save": "/output/saved", "__WARNING__": "DON'T CHANGE ANYTHING BEFORE THIS", "outdir_grids": "", "save_to_dirs": false, "save_to_dirs_prompt_len": 10, "samples_save": true, "samples_format": "png", "grid_save": true, "return_grid": true, "grid_format": "png", "grid_extended_filename": false, "grid_only_if_multiple": true, "n_rows": -1, "jpeg_quality": 80, "export_for_4chan": true, "enable_pnginfo": true, "font": "DejaVuSans.ttf", "enable_emphasis": true, "save_txt": false, "ESRGAN_tile": 192, "ESRGAN_tile_overlap": 8, "random_artist_categories": [], "upscale_at_full_resolution_padding": 16, "show_progressbar": true, "show_progress_every_n_steps": 5, "multiple_tqdm": true, "face_restoration_model": "CodeFormer", "code_former_weight": 0.5, "grid_save_to_dirs": false}
+{
+  "outdir_samples": "/output",
+  "outdir_txt2img_samples": "/output/txt2img-images",
+  "outdir_img2img_samples": "/output/img2img-images",
+  "outdir_extras_samples": "/output/extras-images",
+  "outdir_txt2img_grids": "/output/txt2img-grids",
+  "outdir_img2img_grids": "/output/img2img-grids",
+  "outdir_save": "/output/saved",
+  "font": "DejaVuSans.ttf",
+  "__WARNING__": "DON'T CHANGE ANYTHING BEFORE THIS",
+
+  "samples_filename_format": "",
+  "outdir_grids": "",
+  "save_to_dirs": false,
+  "grid_save_to_dirs": false,
+  "save_to_dirs_prompt_len": 10,
+  "samples_save": true,
+  "samples_format": "png",
+  "grid_save": true,
+  "return_grid": true,
+  "grid_format": "png",
+  "grid_extended_filename": false,
+  "grid_only_if_multiple": true,
+  "n_rows": -1,
+  "jpeg_quality": 80,
+  "export_for_4chan": true,
+  "enable_pnginfo": true,
+  "add_model_hash_to_info": false,
+  "enable_emphasis": true,
+  "save_txt": false,
+  "ESRGAN_tile": 192,
+  "ESRGAN_tile_overlap": 8,
+  "random_artist_categories": [],
+  "upscale_at_full_resolution_padding": 16,
+  "show_progressbar": true,
+  "show_progress_every_n_steps": 7,
+  "multiple_tqdm": true,
+  "face_restoration_model": null,
+  "code_former_weight": 0.5,
+  "save_images_before_face_restoration": false,
+  "face_restoration_unload": false,
+  "interrogate_keep_models_in_memory": false,
+  "interrogate_use_builtin_artists": true,
+  "interrogate_clip_num_beams": 1,
+  "interrogate_clip_min_length": 24,
+  "interrogate_clip_max_length": 48,
+  "interrogate_clip_dict_limit": 1500.0
+}

+ 1 - 1
services/AUTOMATIC1111/mount.sh

@@ -33,4 +33,4 @@ ln -sf -T /cache/weights ${ROOT}/repositories/CodeFormer/weights/CodeFormer
 ln -sf -T /cache/weights ${ROOT}/repositories/CodeFormer/weights/facelib
 
 # mount config
-ln -sf /docker/config.json ${WORKDIR}/config.json
+# ln -sf /docker/config.json ${WORKDIR}/config.json

+ 2 - 2
services/hlky/Dockerfile

@@ -15,7 +15,7 @@ RUN apt-get update && apt install fonts-dejavu-core rsync -y && apt-get clean
 RUN <<EOF
 git clone https://github.com/sd-webui/stable-diffusion-webui.git stable-diffusion
 cd stable-diffusion
-git reset --hard 2b1ac8daf7ea82c6c56eabab7e80ec1c33106a98
+git reset --hard 7623a5734740025d79b710f3744bff9276e1467b
 conda env update --file environment.yaml -n base
 conda clean -a -y
 EOF
@@ -26,7 +26,7 @@ RUN pip install -U --no-cache-dir pyperclip
 # Note: don't update the sha of previous versions because the install will take forever
 # instead, update the repo state in a later step
 ARG BRANCH=master
-ARG SHA=2236e8b5854092054e2c30edc559006ace53bf96
+ARG SHA=7623a5734740025d79b710f3744bff9276e1467b
 RUN <<EOF
 cd stable-diffusion
 git fetch