84f9cb84e7
AUTOMATIC1111/stable-diffusion-webui@9e892d9 lstein/stable-diffusion@9bcb0df transformers==4.22 for caching Refs #78
31 lines
816 B
Bash
Executable File
31 lines
816 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
ROOT=/stable-diffusion
|
|
|
|
mkdir -p "${ROOT}/models/ldm/stable-diffusion-v1/"
|
|
ln -sf /cache/models/model.ckpt "${ROOT}/models/ldm/stable-diffusion-v1/model.ckpt"
|
|
|
|
if test -f /cache/models/GFPGANv1.3.pth; then
|
|
base="${ROOT}/src/gfpgan/experiments/pretrained_models/"
|
|
mkdir -p "${base}"
|
|
ln -sf /cache/models/GFPGANv1.3.pth "${base}/GFPGANv1.3.pth"
|
|
echo "Mounted GFPGANv1.3.pth"
|
|
fi
|
|
|
|
# facexlib
|
|
FACEX_WEIGHTS=/opt/conda/lib/python3.9/site-packages/facexlib/weights
|
|
|
|
rm -rf "${FACEX_WEIGHTS}"
|
|
mkdir -p /cache/weights
|
|
ln -sf -T /cache/weights "${FACEX_WEIGHTS}"
|
|
|
|
REALESRGAN_WEIGHTS=/opt/conda/lib/python3.9/site-packages/realesrgan/weights
|
|
rm -rf "${REALESRGAN_WEIGHTS}"
|
|
ln -sf -T /cache/weights "${REALESRGAN_WEIGHTS}"
|
|
|
|
if "${PRELOAD}" == "true"; then
|
|
python3 -u scripts/preload_models.py
|
|
fi
|