diff --git a/scripts/Start Stable Diffusion UI.cmd b/scripts/Start Stable Diffusion UI.cmd index 7f7d0539..231a6c3d 100644 --- a/scripts/Start Stable Diffusion UI.cmd +++ b/scripts/Start Stable Diffusion UI.cmd @@ -1,5 +1,6 @@ @echo off +cd /d %~dp0 set PATH=C:\Windows\System32;%PATH% @rem set legacy installer's PATH, if it exists diff --git a/scripts/bootstrap.bat b/scripts/bootstrap.bat index 27004ca2..e334deb9 100644 --- a/scripts/bootstrap.bat +++ b/scripts/bootstrap.bat @@ -37,6 +37,12 @@ if "%PACKAGES_TO_INSTALL%" NEQ "" ( mkdir "%MAMBA_ROOT_PREFIX%" call curl -L "%MICROMAMBA_DOWNLOAD_URL%" > "%MAMBA_ROOT_PREFIX%\micromamba.exe" + if "%ERRORLEVEL%" NEQ "0" ( + echo "There was a problem downloading micromamba. Cannot continue." + pause + exit /b + ) + @rem test the mamba binary echo Micromamba version: call "%MAMBA_ROOT_PREFIX%\micromamba.exe" --version diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 3b7ed0ca..b82d48dd 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -343,6 +343,9 @@ call python --version @set SD_UI_PATH=%cd%\ui @cd stable-diffusion -@uvicorn server:app --app-dir "%SD_UI_PATH%" --port 9000 --host 0.0.0.0 +@if NOT DEFINED SD_UI_BIND_PORT set SD_UI_BIND_PORT=9000 +@if NOT DEFINED SD_UI_BIND_IP set SD_UI_BIND_PORT=0.0.0.0 +@uvicorn server:app --app-dir "%SD_UI_PATH%" --port %SD_UI_BIND_PORT% --host %SD_UI_BIND_IP% + @pause diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index a5c6c8d4..da0f2357 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -283,6 +283,6 @@ cd .. export SD_UI_PATH=`pwd`/ui cd stable-diffusion -uvicorn server:app --app-dir "$SD_UI_PATH" --port ${SDUI_BIND_PORT:-9000} --host ${SDUI_BIND_IP:-0.0.0.0} +uvicorn server:app --app-dir "$SD_UI_PATH" --port ${SD_UI_BIND_PORT:-9000} --host ${SD_UI_BIND_IP:-0.0.0.0} read -p "Press any key to continue"