diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 2bcf56d2..22e5d714 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -101,6 +101,19 @@ if NOT DEFINED test_sd2 set test_sd2=N @echo conda_sd_env_created >> ..\scripts\install_status.txt ) +@rem allow rolling back the sdkit-based changes +if exist "src-old" ( + if not exist "src" ( + rename "src-old" "src" + + if exist "ldm-old" ( + rd /s /q "ldm-old" + ) + + call pip uninstall -y sdkit stable-diffusion-sdkit + ) +) + set PATH=C:\Windows\System32;%PATH% @>nul findstr /m "conda_sd_gfpgan_deps_installed" ..\scripts\install_status.txt diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 8682c5cc..353a315e 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -87,6 +87,15 @@ else echo conda_sd_env_created >> ../scripts/install_status.txt fi +# allow rolling back the sdkit-based changes +if [ -e "src-old" ] && [ ! -e "src" ]; then + mv src-old src + + if [ -e "ldm-old" ]; then rm -r ldm-old; fi + + pip uninstall -y sdkit stable-diffusion-sdkit +fi + if [ `grep -c conda_sd_gfpgan_deps_installed ../scripts/install_status.txt` -gt "0" ]; then echo "Packages necessary for GFPGAN (Face Correction) were already installed" else diff --git a/ui/index.html b/ui/index.html index 0eea18cc..46f367d5 100644 --- a/ui/index.html +++ b/ui/index.html @@ -25,7 +25,7 @@