From ffcf46a371d66c9e8c9fa9758e3beae963b1e5d2 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sun, 9 Oct 2022 10:02:59 +0530 Subject: [PATCH] Set the custom temp variable only while installing --- scripts/on_sd_start.bat | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 9e5048a5..8c50ee45 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -8,9 +8,6 @@ @copy "sd-ui-files\scripts\Developer Console.cmd" . /Y if exist "Open Developer Console.cmd" del "Open Developer Console.cmd" -@rem set TMP=%cd%\tmp -@rem set TEMP=%cd%\tmp - @call python -c "import os; import shutil; frm = 'sd-ui-files\\ui\\hotfix\\9c24e6cd9f499d02c4f21a033736dabd365962dc80fe3aeb57a8f85ea45a20a3.26fead7ea4f0f843f6eb4055dfd25693f1a71f3c6871b184042d4b126244e142'; dst = os.path.join(os.path.expanduser('~'), '.cache', 'huggingface', 'transformers', '9c24e6cd9f499d02c4f21a033736dabd365962dc80fe3aeb57a8f85ea45a20a3.26fead7ea4f0f843f6eb4055dfd25693f1a71f3c6871b184042d4b126244e142'); shutil.copyfile(frm, dst) if os.path.exists(dst) else print(''); print('Hotfixed broken JSON file from OpenAI');" @>nul grep -c "sd_git_cloned" scripts\install_status.txt @@ -62,6 +59,9 @@ if exist "Open Developer Console.cmd" del "Open Developer Console.cmd" @REM prevent conda from using packages from the user's home directory, to avoid conflicts @set PYTHONNOUSERSITE=1 + set TMP=%cd%\tmp + set TEMP=%cd%\tmp + @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/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 @@ -95,6 +95,9 @@ set PATH=C:\Windows\System32;%PATH% @set PYTHONNOUSERSITE=1 + set TMP=%cd%\tmp + set TEMP=%cd%\tmp + @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/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 @@ -124,6 +127,9 @@ set PATH=C:\Windows\System32;%PATH% @set PYTHONNOUSERSITE=1 + set TMP=%cd%\tmp + set TEMP=%cd%\tmp + @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/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 @@ -147,6 +153,9 @@ set PATH=C:\Windows\System32;%PATH% @set PYTHONNOUSERSITE=1 + set TMP=%cd%\tmp + set TEMP=%cd%\tmp + @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/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!" pause