mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2025-12-06 02:15:19 -05:00
Refactor invoke (#405)
Fixes a problem with cross attention class missing from diffusers
models are now taken from the huggingFace cache.
50eb02f68b
This commit is contained in:
@@ -4,25 +4,25 @@ set -Eeuo pipefail
|
||||
|
||||
declare -A MOUNTS
|
||||
|
||||
mkdir -p ${CONFIG_DIR}
|
||||
|
||||
# cache
|
||||
MOUNTS["/root/.cache"]=/data/.cache/
|
||||
|
||||
# this is really just a hack to avoid migrations
|
||||
rm -rf ${HF_HOME}/diffusers
|
||||
|
||||
# ui specific
|
||||
MOUNTS["${ROOT}/models/codeformer"]=/data/Codeformer/
|
||||
|
||||
MOUNTS["${ROOT}/models/gfpgan/GFPGANv1.4.pth"]=/data/GFPGAN/GFPGANv1.4.pth
|
||||
MOUNTS["${ROOT}/models/gfpgan/weights"]=/data/.cache/
|
||||
|
||||
MOUNTS["${ROOT}/models/gfpgan/weights"]=/data/GFPGAN/
|
||||
MOUNTS["${ROOT}/models/realesrgan"]=/data/RealESRGAN/
|
||||
|
||||
MOUNTS["${ROOT}/models/bert-base-uncased"]=/data/.cache/huggingface/transformers/
|
||||
MOUNTS["${ROOT}/models/openai/clip-vit-large-patch14"]=/data/.cache/huggingface/transformers/
|
||||
MOUNTS["${ROOT}/models/CompVis/stable-diffusion-safety-checker"]=/data/.cache/huggingface/transformers/
|
||||
MOUNTS["${ROOT}/models/ldm"]=/data/.cache/invoke/ldm/
|
||||
|
||||
MOUNTS["${ROOT}/embeddings"]=/data/embeddings/
|
||||
|
||||
# hacks
|
||||
MOUNTS["${ROOT}/models/clipseg"]=/data/.cache/invoke/clipseg/
|
||||
|
||||
for to_path in "${!MOUNTS[@]}"; do
|
||||
set -Eeuo pipefail
|
||||
@@ -40,7 +40,8 @@ done
|
||||
|
||||
if "${PRELOAD}" == "true"; then
|
||||
set -Eeuo pipefail
|
||||
invokeai-configure --skip-sd-weights --root ${ROOT} --yes
|
||||
invokeai-configure --root ${ROOT} --yes
|
||||
cp ${ROOT}/configs/models.yaml ${CONFIG_DIR}/models.yaml
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user