From 27d69e2ac3c48a85e2312743e74bce80dc284fc9 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 28 Dec 2022 19:19:53 +0530 Subject: [PATCH] Upgrade stable-diffusion-sdkit during startup --- scripts/on_sd_start.bat | 8 +++++++- scripts/on_sd_start.sh | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 88c3de43..368a4ce1 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -103,7 +103,13 @@ if "%ERRORLEVEL%" EQU "0" ( ) ) -python -c "from importlib.metadata import version; print('sdkit version:', version('sdkit'))" +call python -c "from importlib.metadata import version; print('sdkit version:', version('sdkit'))" + +@rem upgrade stable-diffusion-sdkit +call pip install --upgrade stable-diffusion-sdkit -q || ( + echo "Error updating stable-diffusion-sdkit" +) +call python -c "from importlib.metadata import version; print('stable-diffusion version:', version('stable-diffusion-sdkit'))" @rem install rich call python ..\scripts\check_modules.py rich diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 01f2a9e2..c582b07f 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -92,6 +92,10 @@ fi python -c "from importlib.metadata import version; print('sdkit version:', version('sdkit'))" +# upgrade stable-diffusion-sdkit +pip install --upgrade stable-diffusion-sdkit -q +python -c "from importlib.metadata import version; print('stable-diffusion version:', version('stable-diffusion-sdkit'))" + # install rich if python ../scripts/check_modules.py rich; then echo "rich has already been installed."