diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index b82d48dd..5666c267 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -71,6 +71,8 @@ if exist "Open Developer Console.cmd" del "Open Developer Console.cmd" set TMP=%cd%\tmp set TEMP=%cd%\tmp + set PYTHONPATH=%cd%;%cd%\env\lib\site-packages + @call conda env create --prefix env -f environment.yaml || ( @echo. & echo "Error installing the packages necessary for Stable Diffusion. Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. pause @@ -108,6 +110,8 @@ set PATH=C:\Windows\System32;%PATH% set TMP=%cd%\tmp set TEMP=%cd%\tmp + set PYTHONPATH=%cd%;%cd%\env\lib\site-packages + @call pip install -e git+https://github.com/TencentARC/GFPGAN#egg=GFPGAN || ( @echo. & echo "Error installing the packages necessary for GFPGAN (Face Correction). Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. pause @@ -141,6 +145,8 @@ set PATH=C:\Windows\System32;%PATH% set TMP=%cd%\tmp set TEMP=%cd%\tmp + set PYTHONPATH=%cd%;%cd%\env\lib\site-packages + @call pip install -e git+https://github.com/xinntao/Real-ESRGAN#egg=realesrgan || ( @echo. & echo "Error installing the packages necessary for ESRGAN (Resolution Upscaling). Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. pause @@ -168,6 +174,8 @@ set PATH=C:\Windows\System32;%PATH% set TMP=%cd%\tmp set TEMP=%cd%\tmp + set PYTHONPATH=%cd%;%cd%\env\lib\site-packages + @call conda install -c conda-forge -y --prefix env uvicorn fastapi || ( echo "Error installing the packages necessary for Stable Diffusion UI. Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" pause diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index da0f2357..ff18df13 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -64,6 +64,7 @@ else # prevent conda from using packages from the user's home directory, to avoid conflicts export PYTHONNOUSERSITE=1 + export PYTHONPATH="$(pwd):$(pwd)/env/lib/site-packages" if conda env create --prefix env --force -f environment.yaml ; then echo "Installed. Testing.." @@ -93,6 +94,7 @@ else printf "\n\nDownloading packages necessary for GFPGAN (Face Correction)..\n" export PYTHONNOUSERSITE=1 + export PYTHONPATH="$(pwd):$(pwd)/env/lib/site-packages" if pip install -e git+https://github.com/TencentARC/GFPGAN#egg=GFPGAN ; then echo "Installed. Testing.." @@ -117,6 +119,7 @@ else printf "\n\nDownloading packages necessary for ESRGAN (Resolution Upscaling)..\n" export PYTHONNOUSERSITE=1 + export PYTHONPATH="$(pwd):$(pwd)/env/lib/site-packages" if pip install -e git+https://github.com/xinntao/Real-ESRGAN#egg=realesrgan ; then echo "Installed. Testing.." @@ -138,6 +141,7 @@ else printf "\n\nDownloading packages necessary for Stable Diffusion UI..\n\n" export PYTHONNOUSERSITE=1 + export PYTHONPATH="$(pwd):$(pwd)/env/lib/site-packages" if conda install -c conda-forge --prefix ./env -y uvicorn fastapi ; then echo "Installed. Testing.." diff --git a/ui/index.html b/ui/index.html index ea9a088a..f99f156c 100644 --- a/ui/index.html +++ b/ui/index.html @@ -24,6 +24,7 @@
| |
| |