From ea7006eec40b966a5f804d39c9bd52dde17940e7 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 2 Nov 2022 19:45:49 +0530 Subject: [PATCH 1/3] Set the PYTHONPATH before installation to prevent conda from knowing about any system-wide python installations (and skipping package installs due to that) --- scripts/on_sd_start.bat | 8 ++++++++ scripts/on_sd_start.sh | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 3b7ed0ca..3df11d40 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 4bf5d79a..11d0d2e1 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.." @@ -99,6 +100,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.." @@ -124,6 +126,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.." @@ -149,6 +152,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.." From 63dcb8cfe180f28b23c1f125f207e429d3f2ab30 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Thu, 3 Nov 2022 20:39:08 +0100 Subject: [PATCH 2/3] Add a link to the wiki to the "Help & Community" dropdown. --- ui/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/index.html b/ui/index.html index ea9a088a..d827ef62 100644 --- a/ui/index.html +++ b/ui/index.html @@ -24,6 +24,7 @@