mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-02-09 09:04:18 +01:00
hlky
This commit is contained in:
parent
2f55ccd7da
commit
0299edc47e
|
|
@ -22,21 +22,10 @@ conda clean -a -y
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
# Latent diffusion
|
|
||||||
RUN <<EOF
|
|
||||||
git clone --depth 1 https://github.com/Hafiidz/latent-diffusion.git
|
|
||||||
cd latent-diffusion
|
|
||||||
# hacks all the way down
|
|
||||||
mv ldm ldm_latent &&
|
|
||||||
sed -i -- 's/from ldm/from ldm_latent/g' *.py
|
|
||||||
# dont forget to update the yaml!!
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
# Note: don't update the sha of previous versions because the install will take forever
|
# Note: don't update the sha of previous versions because the install will take forever
|
||||||
# instead, update the repo state in a later step
|
# instead, update the repo state in a later step
|
||||||
# ARG BRANCH=master SHA=d0bb60a139d60e6c2b9be4e18e0e29a86aa5af59
|
# ARG BRANCH=master SHA=d0bb60a139d60e6c2b9be4e18e0e29a86aa5af59
|
||||||
ARG BRANCH=dev SHA=f585ab1923730339ea75d36b53ac1d5b6cbde500
|
ARG BRANCH=dev SHA=1fd28eed1ebc3aa04b9b00e2a899f3bf07f64bdc
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
cd stable-diffusion
|
cd stable-diffusion
|
||||||
git fetch
|
git fetch
|
||||||
|
|
@ -53,9 +42,9 @@ COPY . /docker/
|
||||||
RUN python /docker/info.py /stable-diffusion/frontend/frontend.py && chmod +x /docker/mount.sh
|
RUN python /docker/info.py /stable-diffusion/frontend/frontend.py && chmod +x /docker/mount.sh
|
||||||
|
|
||||||
WORKDIR /stable-diffusion
|
WORKDIR /stable-diffusion
|
||||||
ENV TRANSFORMERS_CACHE=/cache/transformers TORCH_HOME=/cache/torch PYTHONPATH="${PYTHONPATH}:/stable-diffusion" CLI_ARGS=""
|
ENV TRANSFORMERS_CACHE=/cache/transformers TORCH_HOME=/cache/torch PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""
|
||||||
EXPOSE 7860
|
EXPOSE 7860
|
||||||
# run, -u to not buffer stdout / stderr
|
# run, -u to not buffer stdout / stderr
|
||||||
CMD /docker/mount.sh && \
|
CMD /docker/mount.sh && \
|
||||||
python3 -u scripts/webui.py --outdir /output --ckpt /cache/models/model.ckpt --ldsr-dir /latent-diffusion ${CLI_ARGS}
|
python3 -u scripts/webui.py --outdir /output --ckpt /cache/models/model.ckpt ${CLI_ARGS}
|
||||||
# STREAMLIT_SERVER_PORT=7860 python -m streamlit run scripts/webui_streamlit.py --theme.base dark
|
# STREAMLIT_SERVER_PORT=7860 python -m streamlit run scripts/webui_streamlit.py --theme.base dark
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ ROOT=/stable-diffusion/src
|
||||||
MODELS["${ROOT}/gfpgan/experiments/pretrained_models/GFPGANv1.3.pth"]=GFPGANv1.3.pth
|
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.pth"]=RealESRGAN_x4plus.pth
|
||||||
MODELS["${ROOT}/realesrgan/experiments/pretrained_models/RealESRGAN_x4plus_anime_6B.pth"]=RealESRGAN_x4plus_anime_6B.pth
|
MODELS["${ROOT}/realesrgan/experiments/pretrained_models/RealESRGAN_x4plus_anime_6B.pth"]=RealESRGAN_x4plus_anime_6B.pth
|
||||||
MODELS["/latent-diffusion/experiments/pretrained_models/model.ckpt"]=LDSR.ckpt
|
MODELS["${ROOT}/latent-diffusion/experiments/pretrained_models/model.ckpt"]=LDSR.ckpt
|
||||||
# MODELS["/latent-diffusion/experiments/pretrained_models/project.yaml"]=LDSR.yaml
|
MODELS["${ROOT}/latent-diffusion/experiments/pretrained_models/project.yaml"]=LDSR.yaml
|
||||||
|
|
||||||
MODELS_DIR=/cache/models
|
MODELS_DIR=/cache/models
|
||||||
|
|
||||||
|
|
@ -25,11 +25,6 @@ for path in "${!MODELS[@]}"; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# hack for latent-diffusion
|
|
||||||
if test -f "${MODELS_DIR}/LDSR.yaml"; then
|
|
||||||
sed 's/ldm\./ldm_latent\./g' "${MODELS_DIR}/LDSR.yaml" >/latent-diffusion/experiments/pretrained_models/project.yaml
|
|
||||||
fi
|
|
||||||
|
|
||||||
# force facexlib cache
|
# force facexlib cache
|
||||||
mkdir -p /cache/weights/ /stable-diffusion/gfpgan/
|
mkdir -p /cache/weights/ /stable-diffusion/gfpgan/
|
||||||
ln -sf /cache/weights/ /stable-diffusion/gfpgan/
|
ln -sf /cache/weights/ /stable-diffusion/gfpgan/
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
general:
|
general:
|
||||||
outdir: /outputs
|
outdir: /outputs
|
||||||
default_model: "Stable Diffusion v1.4"
|
default_model: "Stable Diffusion v1.4"
|
||||||
default_model_path: "/cache/models/model.ckpt"
|
default_model_path: /cache/models/model.ckpt
|
||||||
outdir_txt2img: /outputs/txt2img-samples
|
outdir_txt2img: /outputs/txt2img-samples
|
||||||
outdir_img2img: /outputs/img2img-samples
|
outdir_img2img: /outputs/img2img-samples
|
||||||
optimized_turbo: true
|
optimized: True
|
||||||
enable_minimal_memory_usage : True
|
optimized_turbo: True
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue