From 14e88706dff716765ea4fb7b6da8c359ba97d3ea Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 18 Oct 2022 09:46:25 +0530 Subject: [PATCH 1/6] Set and use a local profile directory for new installations - does not affect existing installations --- scripts/on_sd_start.bat | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 17f9f8ac..feb73468 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -10,6 +10,10 @@ if exist "Open Developer Console.cmd" del "Open Developer Console.cmd" @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');" +if exist "%cd%\profile" ( + set USERPROFILE=%cd%\profile +) + @>nul grep -c "sd_git_cloned" scripts\install_status.txt @if "%ERRORLEVEL%" EQU "0" ( @echo "Stable Diffusion's git repository was already installed. Updating.." @@ -59,6 +63,7 @@ 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 USERPROFILE=%cd%\profile set TMP=%cd%\tmp set TEMP=%cd%\tmp @@ -95,6 +100,7 @@ set PATH=C:\Windows\System32;%PATH% @set PYTHONNOUSERSITE=1 + set USERPROFILE=%cd%\profile set TMP=%cd%\tmp set TEMP=%cd%\tmp @@ -127,6 +133,7 @@ set PATH=C:\Windows\System32;%PATH% @set PYTHONNOUSERSITE=1 + set USERPROFILE=%cd%\profile set TMP=%cd%\tmp set TEMP=%cd%\tmp @@ -153,6 +160,7 @@ set PATH=C:\Windows\System32;%PATH% @set PYTHONNOUSERSITE=1 + set USERPROFILE=%cd%\profile set TMP=%cd%\tmp set TEMP=%cd%\tmp From 48b63a26c8bf67c4c736a4ad30805d6f43e73ddf Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 18 Oct 2022 14:49:39 +0530 Subject: [PATCH 2/6] Don't disable the random field when the output image is used as the new init image --- ui/media/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/media/main.js b/ui/media/main.js index 2ad668e3..832b67f6 100644 --- a/ui/media/main.js +++ b/ui/media/main.js @@ -347,9 +347,9 @@ function getUseAsInputHandler(imageItemElem) { // maskSetting.style.display = 'block' - randomSeedField.checked = false - seedField.value = imageSeed - seedField.disabled = false + // randomSeedField.checked = false + // seedField.value = imageSeed + // seedField.disabled = false } } From a1e2eca802abff4d280278eb27bc3f5065e80715 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 18 Oct 2022 15:11:28 +0530 Subject: [PATCH 3/6] Use python 3.10 --- ui/sd_internal/env_yaml.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/sd_internal/env_yaml.patch b/ui/sd_internal/env_yaml.patch index cc140ef1..d4024cf0 100644 --- a/ui/sd_internal/env_yaml.patch +++ b/ui/sd_internal/env_yaml.patch @@ -1,7 +1,16 @@ diff --git a/environment.yaml b/environment.yaml -index 7f25da8..306750f 100644 +index 7f25da8..11e761d 100644 --- a/environment.yaml +++ b/environment.yaml +@@ -3,7 +3,7 @@ channels: + - pytorch + - defaults + dependencies: +- - python=3.8.5 ++ - python=3.10 + - pip=20.3 + - cudatoolkit=11.3 + - pytorch=1.11.0 @@ -23,6 +23,8 @@ dependencies: - torch-fidelity==0.3.0 - transformers==4.19.2 From 1dff19af26e804ac773ddd9112a9523c4b67febe Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 18 Oct 2022 15:15:12 +0530 Subject: [PATCH 4/6] Revert "Use python 3.10" This reverts commit a1e2eca802abff4d280278eb27bc3f5065e80715. --- ui/sd_internal/env_yaml.patch | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ui/sd_internal/env_yaml.patch b/ui/sd_internal/env_yaml.patch index d4024cf0..cc140ef1 100644 --- a/ui/sd_internal/env_yaml.patch +++ b/ui/sd_internal/env_yaml.patch @@ -1,16 +1,7 @@ diff --git a/environment.yaml b/environment.yaml -index 7f25da8..11e761d 100644 +index 7f25da8..306750f 100644 --- a/environment.yaml +++ b/environment.yaml -@@ -3,7 +3,7 @@ channels: - - pytorch - - defaults - dependencies: -- - python=3.8.5 -+ - python=3.10 - - pip=20.3 - - cudatoolkit=11.3 - - pytorch=1.11.0 @@ -23,6 +23,8 @@ dependencies: - torch-fidelity==0.3.0 - transformers==4.19.2 From c8420e152fa2749a314e443f9fab12eac85603e1 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 18 Oct 2022 15:34:37 +0530 Subject: [PATCH 5/6] Use python 3.9 --- ui/sd_internal/env_yaml.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/sd_internal/env_yaml.patch b/ui/sd_internal/env_yaml.patch index cc140ef1..2ae309f6 100644 --- a/ui/sd_internal/env_yaml.patch +++ b/ui/sd_internal/env_yaml.patch @@ -1,7 +1,16 @@ diff --git a/environment.yaml b/environment.yaml -index 7f25da8..306750f 100644 +index 7f25da8..9ed680e 100644 --- a/environment.yaml +++ b/environment.yaml +@@ -3,7 +3,7 @@ channels: + - pytorch + - defaults + dependencies: +- - python=3.8.5 ++ - python=3.9 + - pip=20.3 + - cudatoolkit=11.3 + - pytorch=1.11.0 @@ -23,6 +23,8 @@ dependencies: - torch-fidelity==0.3.0 - transformers==4.19.2 From 52daf6b864c3c8586b5a4a54a28e9e643069336a Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 18 Oct 2022 15:37:02 +0530 Subject: [PATCH 6/6] Revert "Use python 3.9" This reverts commit c8420e152fa2749a314e443f9fab12eac85603e1. --- ui/sd_internal/env_yaml.patch | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ui/sd_internal/env_yaml.patch b/ui/sd_internal/env_yaml.patch index 2ae309f6..cc140ef1 100644 --- a/ui/sd_internal/env_yaml.patch +++ b/ui/sd_internal/env_yaml.patch @@ -1,16 +1,7 @@ diff --git a/environment.yaml b/environment.yaml -index 7f25da8..9ed680e 100644 +index 7f25da8..306750f 100644 --- a/environment.yaml +++ b/environment.yaml -@@ -3,7 +3,7 @@ channels: - - pytorch - - defaults - dependencies: -- - python=3.8.5 -+ - python=3.9 - - pip=20.3 - - cudatoolkit=11.3 - - pytorch=1.11.0 @@ -23,6 +23,8 @@ dependencies: - torch-fidelity==0.3.0 - transformers==4.19.2