From 4f2df2d1889a8289db4ce4bd63b0880dd2956e3a Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Sat, 8 Apr 2023 18:19:03 -0700 Subject: [PATCH 01/13] Properly reset LoRA selection from Use Settings --- ui/media/js/dnd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/js/dnd.js b/ui/media/js/dnd.js index 1ac967ae..ebcce132 100644 --- a/ui/media/js/dnd.js +++ b/ui/media/js/dnd.js @@ -350,7 +350,7 @@ function restoreTaskToUI(task, fieldsToSkip) { } if (!('use_lora_model' in task.reqBody)) { - loraModelField.value = "None" + loraModelField.value = "" loraModelField.dispatchEvent(new Event("change")) } From 5e45f3723264e99b3669ec525a5b18ef2ff35cfb Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Sun, 9 Apr 2023 15:33:05 -0700 Subject: [PATCH 02/13] Fix the tooltip display for long modifiers --- ui/media/css/modifier-thumbnails.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/media/css/modifier-thumbnails.css b/ui/media/css/modifier-thumbnails.css index 9b462e57..c6fb8107 100644 --- a/ui/media/css/modifier-thumbnails.css +++ b/ui/media/css/modifier-thumbnails.css @@ -153,6 +153,10 @@ position: absolute; z-index: 3; } +.modifier-card-overlay:hover ~ .modifier-card-container .modifier-card-label.tooltip .tooltip-text { + visibility: visible; + opacity: 1; +} .modifier-card:hover > .modifier-card-image-container .modifier-card-image-overlay { opacity: 1; } @@ -220,4 +224,4 @@ #modifier-settings-config textarea { width: 90%; height: 150px; -} \ No newline at end of file +} From 9ee38d0b7004aaee712dc22d232eda66351dee11 Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Sun, 9 Apr 2023 18:38:36 -0700 Subject: [PATCH 03/13] Fix the styling of disabled image modifiers Long custom modifiers in a disabled state (e.g. right-click on the image tag) are properly restored as disabled but are incorrectly shown as "active" in the UI. I somehow missed that in https://github.com/cmdr2/stable-diffusion-ui/pull/1062, so here is the fix for that. This change only applies to plugins that try to restore image modifiers, no change to the regular UI. --- ui/media/js/image-modifiers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/js/image-modifiers.js b/ui/media/js/image-modifiers.js index 194565c4..eaea07f6 100644 --- a/ui/media/js/image-modifiers.js +++ b/ui/media/js/image-modifiers.js @@ -230,7 +230,7 @@ function refreshInactiveTags(inactiveTags) { // update cards let overlays = document.querySelector('#editor-inputs-tags-list').querySelectorAll('.modifier-card-overlay') overlays.forEach (i => { - let modifierName = i.parentElement.getElementsByClassName('modifier-card-label')[0].getElementsByTagName("p")[0].innerText + let modifierName = i.parentElement.getElementsByClassName('modifier-card-label')[0].getElementsByTagName("p")[0].dataset.fullName if (inactiveTags?.find(element => element === modifierName) !== undefined) { i.parentElement.classList.add('modifier-toggle-inactive') } From 8a6cf3cfae7f69cc51decf34f220891e5dc6c8fd Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 10 Apr 2023 15:55:55 +0530 Subject: [PATCH 04/13] Remove redundant hotfix --- scripts/on_sd_start.bat | 2 +- scripts/on_sd_start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 5e94261a..75cea7ed 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -34,7 +34,7 @@ call conda activate @REM remove the old version of the dev console script, if it's still present 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');" +@REM @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');" @rem create the stable-diffusion folder, to work with legacy installations if not exist "stable-diffusion" mkdir stable-diffusion diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 9cbfa322..9138ed6b 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -18,7 +18,7 @@ if [ -e "open_dev_console.sh" ]; then rm "open_dev_console.sh" fi -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');" +# 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');" # Caution, this file will make your eyes and brain bleed. It's such an unholy mess. # Note to self: Please rewrite this in Python. For the sake of your own sanity. From 4cdb8a7d2a30cb3467bf48143e7d902d198eeaab Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 10 Apr 2023 16:29:30 +0530 Subject: [PATCH 05/13] sdkit 1.0.66 - lower VRAM usage for realesrgan upscaling --- scripts/on_sd_start.bat | 4 ++-- scripts/on_sd_start.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 75cea7ed..03f49212 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -95,7 +95,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install --upgrade sdkit==1.0.65 -q || ( + call python -m pip install --upgrade sdkit==1.0.66 -q || ( echo "Error updating sdkit" ) ) @@ -106,7 +106,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install sdkit==1.0.65 || ( + call python -m pip install sdkit==1.0.66 || ( echo "Error installing sdkit. 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 exit /b diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 9138ed6b..b058176c 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -103,7 +103,7 @@ if python ../scripts/check_modules.py sdkit sdkit.models ldm transformers numpy export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - python -m pip install --upgrade sdkit==1.0.65 -q + python -m pip install --upgrade sdkit==1.0.66 -q fi else echo "Installing sdkit: https://pypi.org/project/sdkit/" @@ -111,7 +111,7 @@ else export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - if python -m pip install sdkit==1.0.65 ; then + if python -m pip install sdkit==1.0.66 ; then echo "Installed." else fail "sdkit install failed" From b07046f6a278d5b315734b41bb6c0cf3e4842638 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 10 Apr 2023 16:31:24 +0530 Subject: [PATCH 06/13] gc between rendering images and applying filters --- ui/easydiffusion/renderer.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/easydiffusion/renderer.py b/ui/easydiffusion/renderer.py index c8004fee..8a155f82 100644 --- a/ui/easydiffusion/renderer.py +++ b/ui/easydiffusion/renderer.py @@ -10,7 +10,13 @@ from easydiffusion.utils import get_printable_request, save_images_to_disk, log from sdkit import Context from sdkit.generate import generate_images from sdkit.filter import apply_filters -from sdkit.utils import img_to_buffer, img_to_base64_str, latent_samples_to_images, diffusers_latent_samples_to_images +from sdkit.utils import ( + img_to_buffer, + img_to_base64_str, + latent_samples_to_images, + diffusers_latent_samples_to_images, + gc, +) context = Context() # thread-local """ @@ -62,7 +68,6 @@ def print_task_info(req: GenerateImageRequest, task_data: TaskData): def make_images_internal( req: GenerateImageRequest, task_data: TaskData, data_queue: queue.Queue, task_temp_images: list, step_callback ): - images, user_stopped = generate_images_internal( req, task_data, @@ -72,6 +77,7 @@ def make_images_internal( task_data.stream_image_progress, task_data.stream_image_progress_interval, ) + gc(context) filtered_images = filter_images(task_data, images, user_stopped) if task_data.save_to_disk_path is not None: From df806d5dfae680089cb193ed69254b6f282cfed6 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 10 Apr 2023 16:31:58 +0530 Subject: [PATCH 07/13] changelog --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index bde70f1e..f858700e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,6 +21,7 @@ Our focus continues to remain on an easy installation experience, and an easy user-interface. While still remaining pretty powerful, in terms of features and speed. ### Detailed changelog +* 2.5.31 - 10 Apr 2023 - Reduce VRAM usage while upscaling. * 2.5.31 - 6 Apr 2023 - Allow seeds upto `4,294,967,295`. Thanks @ogmaresca. * 2.5.31 - 6 Apr 2023 - Buttons to show the previous/next image in the image popup. Thanks @ogmaresca. * 2.5.30 - 5 Apr 2023 - Fix a bug where the JPEG image quality wasn't being respected when embedding the metadata into it. Thanks @JeLuf. From 210429a25900e56382e9982b0317848703c960ac Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 10 Apr 2023 17:59:14 +0530 Subject: [PATCH 08/13] sdkit 1.0.67 - detect black-images on model load and use fp32 attention precision or full precision if needed --- scripts/on_sd_start.bat | 4 ++-- scripts/on_sd_start.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 03f49212..256ef752 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -95,7 +95,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install --upgrade sdkit==1.0.66 -q || ( + call python -m pip install --upgrade sdkit==1.0.67 -q || ( echo "Error updating sdkit" ) ) @@ -106,7 +106,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install sdkit==1.0.66 || ( + call python -m pip install sdkit==1.0.67 || ( echo "Error installing sdkit. 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 exit /b diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index b058176c..1117ce00 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -103,7 +103,7 @@ if python ../scripts/check_modules.py sdkit sdkit.models ldm transformers numpy export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - python -m pip install --upgrade sdkit==1.0.66 -q + python -m pip install --upgrade sdkit==1.0.67 -q fi else echo "Installing sdkit: https://pypi.org/project/sdkit/" @@ -111,7 +111,7 @@ else export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - if python -m pip install sdkit==1.0.66 ; then + if python -m pip install sdkit==1.0.67 ; then echo "Installed." else fail "sdkit install failed" From 424ec40fa54b05581225041935ddb7d16dbb92cd Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 11 Apr 2023 12:00:03 +0530 Subject: [PATCH 09/13] sdkit 1.0.68 - fix brainfade --- scripts/on_sd_start.bat | 4 ++-- scripts/on_sd_start.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 256ef752..4d0340be 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -95,7 +95,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install --upgrade sdkit==1.0.67 -q || ( + call python -m pip install --upgrade sdkit==1.0.68 -q || ( echo "Error updating sdkit" ) ) @@ -106,7 +106,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install sdkit==1.0.67 || ( + call python -m pip install sdkit==1.0.68 || ( echo "Error installing sdkit. 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 exit /b diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 1117ce00..acff28f7 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -103,7 +103,7 @@ if python ../scripts/check_modules.py sdkit sdkit.models ldm transformers numpy export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - python -m pip install --upgrade sdkit==1.0.67 -q + python -m pip install --upgrade sdkit==1.0.68 -q fi else echo "Installing sdkit: https://pypi.org/project/sdkit/" @@ -111,7 +111,7 @@ else export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - if python -m pip install sdkit==1.0.67 ; then + if python -m pip install sdkit==1.0.68 ; then echo "Installed." else fail "sdkit install failed" From 8ba0b3485380d5c45750a57d4e0fb2caa3e02ac9 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 11 Apr 2023 15:13:41 +0530 Subject: [PATCH 10/13] Log the stack trace when the model fails to load --- ui/easydiffusion/model_manager.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py index a06c56cf..29f5f88e 100644 --- a/ui/easydiffusion/model_manager.py +++ b/ui/easydiffusion/model_manager.py @@ -44,8 +44,7 @@ def load_default_models(context: Context): load_model(context, model_type) except Exception as e: log.error(f"[red]Error while loading {model_type} model: {context.model_paths[model_type]}[/red]") - log.error(f"[red]Error: {e}[/red]") - log.error(f"[red]Consider removing the model from the model folder.[red]") + log.exception(e) def unload_all(context: Context): From a3d2c71ed6ff7d0303df8459bed21c56ea7c5839 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 11 Apr 2023 15:34:44 +0530 Subject: [PATCH 11/13] sdkit 1.0.69 - allow loading models without vae weights in diffusers --- scripts/on_sd_start.bat | 4 ++-- scripts/on_sd_start.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 4d0340be..f4bdc410 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -95,7 +95,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install --upgrade sdkit==1.0.68 -q || ( + call python -m pip install --upgrade sdkit==1.0.69 -q || ( echo "Error updating sdkit" ) ) @@ -106,7 +106,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install sdkit==1.0.68 || ( + call python -m pip install sdkit==1.0.69 || ( echo "Error installing sdkit. 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 exit /b diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index acff28f7..7b91cbfd 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -103,7 +103,7 @@ if python ../scripts/check_modules.py sdkit sdkit.models ldm transformers numpy export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - python -m pip install --upgrade sdkit==1.0.68 -q + python -m pip install --upgrade sdkit==1.0.69 -q fi else echo "Installing sdkit: https://pypi.org/project/sdkit/" @@ -111,7 +111,7 @@ else export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - if python -m pip install sdkit==1.0.68 ; then + if python -m pip install sdkit==1.0.69 ; then echo "Installed." else fail "sdkit install failed" From 03c8a0fca5e9d88de6be344524baa9ba681e30f4 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 12 Apr 2023 15:31:10 +0530 Subject: [PATCH 12/13] sdkit 1.0.70 - use plms for warming up the model, avoiding any non-deterministic effects from the default ancestral sampler --- scripts/on_sd_start.bat | 4 ++-- scripts/on_sd_start.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index f4bdc410..7efd4577 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -95,7 +95,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install --upgrade sdkit==1.0.69 -q || ( + call python -m pip install --upgrade sdkit==1.0.70 -q || ( echo "Error updating sdkit" ) ) @@ -106,7 +106,7 @@ if "%ERRORLEVEL%" EQU "0" ( set PYTHONNOUSERSITE=1 set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages - call python -m pip install sdkit==1.0.69 || ( + call python -m pip install sdkit==1.0.70 || ( echo "Error installing sdkit. 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 exit /b diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 7b91cbfd..fcf7dc53 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -103,7 +103,7 @@ if python ../scripts/check_modules.py sdkit sdkit.models ldm transformers numpy export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - python -m pip install --upgrade sdkit==1.0.69 -q + python -m pip install --upgrade sdkit==1.0.70 -q fi else echo "Installing sdkit: https://pypi.org/project/sdkit/" @@ -111,7 +111,7 @@ else export PYTHONNOUSERSITE=1 export PYTHONPATH="$INSTALL_ENV_DIR/lib/python3.8/site-packages" - if python -m pip install sdkit==1.0.69 ; then + if python -m pip install sdkit==1.0.70 ; then echo "Installed." else fail "sdkit install failed" From 4192f87d6b490b37b0fa416834eef1305bedaac3 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Fri, 14 Apr 2023 13:41:35 +0200 Subject: [PATCH 13/13] Don't scan safetensors files in load_default_models() (#1155) * Don't scan safetensors when loading them * Don't scan safetensors files * Update model_manager.py --------- Co-authored-by: cmdr2 --- ui/easydiffusion/model_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py index 29f5f88e..296c4192 100644 --- a/ui/easydiffusion/model_manager.py +++ b/ui/easydiffusion/model_manager.py @@ -41,12 +41,15 @@ def load_default_models(context: Context): for model_type in MODELS_TO_LOAD_ON_START: context.model_paths[model_type] = resolve_model_to_use(model_type=model_type) try: - load_model(context, model_type) + load_model( + context, + model_type, + scan_model = context.model_paths[model_type] != None and not context.model_paths[model_type].endswith('.safetensors') + ) except Exception as e: log.error(f"[red]Error while loading {model_type} model: {context.model_paths[model_type]}[/red]") log.exception(e) - def unload_all(context: Context): for model_type in KNOWN_MODEL_TYPES: unload_model(context, model_type)