From 4444525c01cd4d86f2eb137ab718d3f7c6beb58d Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 12 Sep 2022 23:06:51 +0530 Subject: [PATCH 1/5] Set the PYTHONPATH explicitly for the conda env --- scripts/on_sd_start.bat | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 1fe15934..91ce0dcc 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -278,6 +278,13 @@ call WHERE uvicorn > .tmp @echo. & echo "Stable Diffusion is ready!" & echo. +@set SD_DIR=%cd% + +@cd env\lib\site-packages +@set PYTHONPATH=%SD_DIR%;%cd% +@cd ..\..\.. +@echo PYTHONPATH=%PYTHONPATH% + @cd .. @set SD_UI_PATH=%cd%\ui @cd stable-diffusion From 30974482c5bfc73ba0e63724855b0d3269f44b51 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 12 Sep 2022 23:15:41 +0530 Subject: [PATCH 2/5] The seed displayed in the UI was wrong --- ui/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/index.html b/ui/index.html index 21dbc759..b7d557a4 100644 --- a/ui/index.html +++ b/ui/index.html @@ -671,10 +671,12 @@ async function doMakeImage(reqBody) { for (let idx in res.output) { let imgBody = '' + let seed = 0 try { let imgData = res.output[idx] imgBody = imgData.data + seed = imgData.seed } catch (e) { console.log(imgBody) setStatus('request', 'invalid image', 'error') From 852875b44063e73cc481c52d9f003d37cee228a9 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 12 Sep 2022 23:42:48 +0530 Subject: [PATCH 3/5] Try force installing basicsr 1.4.2 --- scripts/on_sd_start.bat | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 91ce0dcc..14e68078 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -80,6 +80,12 @@ exit /b ) + @call pip install basicsr=1.4.2 || ( + @echo. & echo "Error installing the basicsr package 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/blob/main/Troubleshooting.md" & 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 + exit /b + ) + for /f "tokens=*" %%a in ('python -c "from gfpgan import GFPGANer; print(42)"') do if "%%a" NEQ "42" ( @echo. & echo "Dependency test failed! 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/blob/main/Troubleshooting.md" & 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 From 812a0a14fc04b9963819ed661d169ba9dc96847c Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 13 Sep 2022 10:36:50 +0530 Subject: [PATCH 4/5] Export PYTHONPATH on linux --- scripts/on_sd_start.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index b1c6bf79..5195f9ab 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -279,6 +279,10 @@ fi printf "\n\nStable Diffusion is ready!\n\n" +SD_PATH=`pwd` +export PYTHONPATH="$SD_PATH;$SD_PATH/env/lib/python3.8/site-packages" +echo "PYTHONPATH=$PYTHONPATH" + cd .. export SD_UI_PATH=`pwd`/ui cd stable-diffusion From db1fbad0dbf79b6b363982babea6511105135f19 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 13 Sep 2022 11:00:55 +0530 Subject: [PATCH 5/5] Force install basicsr, investigating a support query --- scripts/on_sd_start.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 14e68078..0102f41f 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -80,7 +80,7 @@ exit /b ) - @call pip install basicsr=1.4.2 || ( + @call pip install basicsr==1.4.2 || ( @echo. & echo "Error installing the basicsr package 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/blob/main/Troubleshooting.md" & 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 exit /b