mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2025-11-28 14:44:17 -05:00
v2 (#108)
### Update versions
- auto:
3f417566b0
### Breaking changes:
* renamed `automatic-1111` service to `auto`
* the `cache` folder is now deprecated, replaced with `data` (see
migration guide below)
* `embeddings` folder has been moved to `data/embeddings`
* use GFPGAN 1.4
### Migration Guide
Note: in theory, running the command
```
docker compose --profile download up --build
```
is all you need to use the new version, however, this means you will
also have to download everything again. A new script is available under
`scripts/migratev1tov2.sh` that will copy models to the new structure
and should get you most of the way, run
```bash
./scripts/migratev1tov2.sh
```
or you can manually inspect the script and copy the files
After that, run
```
docker compose --profile download up --build
```
to validate everything.
This commit is contained in:
@@ -1,33 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -Eeuo pipefail
|
||||
|
||||
declare -A MODELS
|
||||
declare -A MOUNTS
|
||||
|
||||
ROOT=/stable-diffusion/src
|
||||
|
||||
MODELS["${ROOT}/gfpgan/experiments/pretrained_models/GFPGANv1.3.pth"]=GFPGANv1.3.pth
|
||||
MODELS["${ROOT}/realesrgan/experiments/pretrained_models/RealESRGAN_x4plus.pth"]=RealESRGAN_x4plus.pth
|
||||
MODELS["${ROOT}/realesrgan/experiments/pretrained_models/RealESRGAN_x4plus_anime_6B.pth"]=RealESRGAN_x4plus_anime_6B.pth
|
||||
MODELS["${ROOT}/latent-diffusion/experiments/pretrained_models/model.ckpt"]=LDSR.ckpt
|
||||
MODELS["${ROOT}/latent-diffusion/experiments/pretrained_models/project.yaml"]=LDSR.yaml
|
||||
# cache
|
||||
MOUNTS["/root/.cache"]=/data/.cache
|
||||
# ui specific
|
||||
MOUNTS["${ROOT}/gfpgan/experiments/pretrained_models/GFPGANv1.3.pth"]=/data/GFPGAN/GFPGANv1.4.pth
|
||||
MOUNTS["${ROOT}/realesrgan/experiments/pretrained_models"]=/data/RealESRGAN
|
||||
MOUNTS["${ROOT}/latent-diffusion/experiments/pretrained_models"]=/data/LDSR
|
||||
# hacks
|
||||
MOUNTS["/stable-diffusion/gfpgan/weights"]=/data/.cache
|
||||
|
||||
MODELS_DIR=/cache/models
|
||||
|
||||
for path in "${!MODELS[@]}"; do
|
||||
name=${MODELS[$path]}
|
||||
base=$(dirname "${path}")
|
||||
from_path="${MODELS_DIR}/${name}"
|
||||
if test -f "${from_path}"; then
|
||||
mkdir -p "${base}" && ln -sf "${from_path}" "${path}" && echo "Mounted ${name}"
|
||||
else
|
||||
echo "Skipping ${name}"
|
||||
fi
|
||||
for to_path in "${!MOUNTS[@]}"; do
|
||||
set -Eeuo pipefail
|
||||
from_path="${MOUNTS[${to_path}]}"
|
||||
rm -rf "${to_path}"
|
||||
mkdir -p "$(dirname "${to_path}")"
|
||||
ln -sT "${from_path}" "${to_path}"
|
||||
echo Mounted $(basename "${from_path}")
|
||||
done
|
||||
|
||||
# force facexlib cache
|
||||
mkdir -p /cache/weights/ /stable-diffusion/gfpgan/
|
||||
ln -sf /cache/weights/ /stable-diffusion/gfpgan/
|
||||
|
||||
# streamlit config
|
||||
ln -sf /docker/userconfig_streamlit.yaml /stable-diffusion/configs/webui/userconfig_streamlit.yaml
|
||||
|
||||
Reference in New Issue
Block a user