From 8154a5709b7ee195d30a212ca566bf7771bbc215 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 24 Dec 2022 14:01:33 +0530 Subject: [PATCH] disable the legacy src and ldm folder (otherwise this prevents installing gfpgan and realesrgan) --- scripts/on_sd_start.bat | 8 ++++---- scripts/on_sd_start.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index b086485b..73a22472 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -45,6 +45,10 @@ if exist "env" ( call conda activate .\env ) +@rem disable the legacy src and ldm folder (otherwise this prevents installing gfpgan and realesrgan) +if exist src rename src src-old +if exist ldm rename ldm ldm-old + @rem install torch and torchvision call python ..\scripts\check_modules.py torch torchvision if "%ERRORLEVEL%" EQU "0" ( @@ -300,10 +304,6 @@ call python --version @set SD_UI_PATH=%cd%\ui @cd stable-diffusion -@rem disable the legacy src and ldm folder -if exist src rename src src-old -if exist ldm rename ldm ldm-old - @if NOT DEFINED SD_UI_BIND_PORT set SD_UI_BIND_PORT=9000 @if NOT DEFINED SD_UI_BIND_IP set SD_UI_BIND_IP=0.0.0.0 @uvicorn server:server_api --app-dir "%SD_UI_PATH%" --port %SD_UI_BIND_PORT% --host %SD_UI_BIND_IP% --log-level error diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index cc625ff6..dee314c3 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -39,6 +39,10 @@ if [ -e "env" ]; then conda activate ./env || fail "conda activate failed" fi +# disable the legacy src and ldm folder (otherwise this prevents installing gfpgan and realesrgan) +if [ -e "src" ]; then mv src src-old; fi +if [ -e "ldm" ]; then mv ldm ldm-old; fi + # install torch and torchvision if python ../scripts/check_modules.py torch torchvision; then echo "torch and torchvision have already been installed." @@ -255,10 +259,6 @@ cd .. export SD_UI_PATH=`pwd`/ui cd stable-diffusion -# disable the legacy src and ldm folder -if [ -e "src" ]; then mv src src-old; fi -if [ -e "ldm" ]; then mv ldm ldm-old; fi - uvicorn server:server_api --app-dir "$SD_UI_PATH" --port ${SD_UI_BIND_PORT:-9000} --host ${SD_UI_BIND_IP:-0.0.0.0} --log-level error read -p "Press any key to continue"