Support an arbitrary number of custom models, placed in the models/stable-diffusion folder. Shows an option in the UI to select which model to use

This commit is contained in:
cmdr2
2022-10-06 14:28:02 +05:30
parent 703f987825
commit 201a053025
7 changed files with 165 additions and 15 deletions

View File

@ -165,6 +165,8 @@ call WHERE uvicorn > .tmp
if not exist "..\models\stable-diffusion" mkdir "..\models\stable-diffusion"
@if exist "sd-v1-4.ckpt" (
for %%I in ("sd-v1-4.ckpt") do if "%%~zI" EQU "4265380512" (
echo "Data files (weights) necessary for Stable Diffusion were already downloaded. Using the HuggingFace 4 GB Model."

View File

@ -159,6 +159,8 @@ fi
mkdir -p "../models/stable-diffusion"
if [ -f "sd-v1-4.ckpt" ]; then
model_size=`find "sd-v1-4.ckpt" -printf "%s"`