From d47816e7b94e9450653b49384a68cac41a631327 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 3 Aug 2023 18:47:58 +0530 Subject: [PATCH 01/10] sdkit 1.0.166 - check for lora to SD model compatibility only for text-based loras --- scripts/check_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 04d1309b..89291293 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -18,7 +18,7 @@ os_name = platform.system() modules_to_check = { "torch": ("1.11.0", "1.13.1", "2.0.0"), "torchvision": ("0.12.0", "0.14.1", "0.15.1"), - "sdkit": "1.0.165", + "sdkit": "1.0.166", "stable-diffusion-sdkit": "2.1.4", "rich": "12.6.0", "uvicorn": "0.19.0", From fcb59c68d4ebf14ca71d3667e5d91bd178fbd96a Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 3 Aug 2023 19:42:56 +0530 Subject: [PATCH 02/10] sdkit 1.0.167 - fix reversing loras --- scripts/check_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 89291293..a5edf5f5 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -18,7 +18,7 @@ os_name = platform.system() modules_to_check = { "torch": ("1.11.0", "1.13.1", "2.0.0"), "torchvision": ("0.12.0", "0.14.1", "0.15.1"), - "sdkit": "1.0.166", + "sdkit": "1.0.167", "stable-diffusion-sdkit": "2.1.4", "rich": "12.6.0", "uvicorn": "0.19.0", From 2d2a75f23ca6ec9ec7f4cbc7c91be2732f4a8696 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 3 Aug 2023 20:01:27 +0530 Subject: [PATCH 03/10] v2.6.0 (beta) - switch beta to use diffusers by default --- ui/easydiffusion/app.py | 3 ++- ui/easydiffusion/runtime.py | 2 +- ui/easydiffusion/server.py | 2 +- ui/easydiffusion/utils/save_utils.py | 2 +- ui/index.html | 2 +- ui/media/js/main.js | 4 ---- ui/media/js/parameters.js | 11 +++++++---- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ui/easydiffusion/app.py b/ui/easydiffusion/app.py index e181f9b8..aa1c5ba7 100644 --- a/ui/easydiffusion/app.py +++ b/ui/easydiffusion/app.py @@ -60,6 +60,7 @@ APP_CONFIG_DEFAULTS = { "ui": { "open_browser_on_start": True, }, + "test_diffusers": True, } IMAGE_EXTENSIONS = [ @@ -115,7 +116,7 @@ def getConfig(default_val=APP_CONFIG_DEFAULTS): def set_config_on_startup(config: dict): if getConfig.__test_diffusers_on_startup is None: - getConfig.__test_diffusers_on_startup = config.get("test_diffusers", False) + getConfig.__test_diffusers_on_startup = config.get("test_diffusers", True) config["config_on_startup"] = {"test_diffusers": getConfig.__test_diffusers_on_startup} if os.path.isfile(config_yaml_path): diff --git a/ui/easydiffusion/runtime.py b/ui/easydiffusion/runtime.py index 4098ee8e..8d2f0186 100644 --- a/ui/easydiffusion/runtime.py +++ b/ui/easydiffusion/runtime.py @@ -31,7 +31,7 @@ def init(device): app_config = app.getConfig() context.test_diffusers = ( - app_config.get("test_diffusers", False) and app_config.get("update_branch", "main") != "main" + app_config.get("test_diffusers", True) and app_config.get("update_branch", "main") != "main" ) log.info("Device usage during initialization:") diff --git a/ui/easydiffusion/server.py b/ui/easydiffusion/server.py index a8f848fd..1ecbbbd3 100644 --- a/ui/easydiffusion/server.py +++ b/ui/easydiffusion/server.py @@ -63,7 +63,7 @@ class SetAppConfigRequest(BaseModel, extra=Extra.allow): ui_open_browser_on_start: bool = None listen_to_network: bool = None listen_port: int = None - test_diffusers: bool = False + test_diffusers: bool = True def init(): diff --git a/ui/easydiffusion/utils/save_utils.py b/ui/easydiffusion/utils/save_utils.py index 89dae991..090aef0f 100644 --- a/ui/easydiffusion/utils/save_utils.py +++ b/ui/easydiffusion/utils/save_utils.py @@ -219,7 +219,7 @@ def get_printable_request(req: GenerateImageRequest, task_data: TaskData, output task_data_metadata.update(output_format.dict()) app_config = app.getConfig() - using_diffusers = app_config.get("test_diffusers", False) + using_diffusers = app_config.get("test_diffusers", True) # Save the metadata in the order defined in TASK_TEXT_MAPPING metadata = {} diff --git a/ui/index.html b/ui/index.html index 856150c6..da074f90 100644 --- a/ui/index.html +++ b/ui/index.html @@ -32,7 +32,7 @@

Easy Diffusion - v2.5.48 + v2.6.0

diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 802cfb55..6ed8d506 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -2648,10 +2648,6 @@ embeddingsCollapsiblesBtn.addEventListener("click", (e) => { } }) -if (testDiffusers.checked) { - document.getElementById("embeddings-container").classList.remove("displayNone") -} - /* Pause function */ document.querySelectorAll(".tab").forEach(linkTabContents) diff --git a/ui/media/js/parameters.js b/ui/media/js/parameters.js index 671451eb..bda2f99b 100644 --- a/ui/media/js/parameters.js +++ b/ui/media/js/parameters.js @@ -229,11 +229,11 @@ var PARAMETERS = [ { id: "test_diffusers", type: ParameterType.checkbox, - label: "Test Diffusers", + label: "Use the new v2.6 engine (diffusers)", note: - "Experimental! Can have bugs! Use upcoming features (like LoRA) in our new engine. Please press Save, then restart the program after changing this.", + "Use our new v2.6 engine, with additional features like LoRA, ControlNet, Embeddings, Tiling and lots more! Please press Save, then restart the program after changing this.", icon: "fa-bolt", - default: false, + default: true, saveInAppConfig: true, }, { @@ -454,7 +454,10 @@ async function getAppConfig() { listenPortField.value = config.net.listen_port } - const testDiffusersEnabled = config.test_diffusers && config.update_branch !== "main" + let testDiffusersEnabled = config.update_branch !== "main" + if (config.test_diffusers === false) { + testDiffusersEnabled = false + } testDiffusers.checked = testDiffusersEnabled if (config.config_on_startup) { From abdf0b67195e1cfc1579d1c3781c4badae6e9681 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 3 Aug 2023 20:02:52 +0530 Subject: [PATCH 04/10] changelog --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 141c0773..477067b1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,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.6.0 - 3 Aug 2023 - Enabled diffusers for everyone by default. The old v2.5 engine can be used by disabling the "Use v2.6 engine" option in the Settings tab. * 2.5.48 - 1 Aug 2023 - (beta-only) Full support for ControlNets. You can select a control image to guide the AI. You can pick a filter to pre-process the image, and one of the known (or custom) controlnet models. Supports `OpenPose`, `Canny`, `Straight Lines`, `Depth`, `Line Art`, `Scribble`, `Soft Edge`, `Shuffle` and `Segment`. * 2.5.47 - 30 Jul 2023 - An option to use `Strict Mask Border` while inpainting, to avoid touching areas outside the mask. But this might show a slight outline of the mask, which you will have to touch up separately. * 2.5.47 - 29 Jul 2023 - (beta-only) Fix long prompts with SDXL. From df518f822c3d44305531cbd3273cee9ea6d5f1f2 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 3 Aug 2023 20:11:27 +0530 Subject: [PATCH 05/10] SDXL --- ui/media/js/parameters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/js/parameters.js b/ui/media/js/parameters.js index bda2f99b..2678bb91 100644 --- a/ui/media/js/parameters.js +++ b/ui/media/js/parameters.js @@ -231,7 +231,7 @@ var PARAMETERS = [ type: ParameterType.checkbox, label: "Use the new v2.6 engine (diffusers)", note: - "Use our new v2.6 engine, with additional features like LoRA, ControlNet, Embeddings, Tiling and lots more! Please press Save, then restart the program after changing this.", + "Use our new v2.6 engine, with additional features like LoRA, ControlNet, SDXL, Embeddings, Tiling and lots more! Please press Save, then restart the program after changing this.", icon: "fa-bolt", default: true, saveInAppConfig: true, From 3216a68d63aa97d6404f7b82a8b83bdcea65928f Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 3 Aug 2023 21:01:21 +0530 Subject: [PATCH 06/10] Fix regression with new installations not being able to start ED --- ui/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/main.py b/ui/main.py index f5998622..8647b9ff 100644 --- a/ui/main.py +++ b/ui/main.py @@ -1,11 +1,12 @@ from easydiffusion import model_manager, app, server from easydiffusion.server import server_api # required for uvicorn +app.init() + server.init() # Init the app model_manager.init() -app.init() app.init_render_threads() # start the browser ui From 7d71c353b29cef2a7c02334bce6bd319ac11ddf0 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 4 Aug 2023 11:19:35 +0530 Subject: [PATCH 07/10] changelog --- CHANGES.md | 2 +- ui/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 477067b1..9e72b44f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,7 +22,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.6.0 - 3 Aug 2023 - Enabled diffusers for everyone by default. The old v2.5 engine can be used by disabling the "Use v2.6 engine" option in the Settings tab. +* 3.0.0 - 3 Aug 2023 - Enabled diffusers for everyone by default. The old v2 engine can be used by disabling the "Use v3 engine" option in the Settings tab. * 2.5.48 - 1 Aug 2023 - (beta-only) Full support for ControlNets. You can select a control image to guide the AI. You can pick a filter to pre-process the image, and one of the known (or custom) controlnet models. Supports `OpenPose`, `Canny`, `Straight Lines`, `Depth`, `Line Art`, `Scribble`, `Soft Edge`, `Shuffle` and `Segment`. * 2.5.47 - 30 Jul 2023 - An option to use `Strict Mask Border` while inpainting, to avoid touching areas outside the mask. But this might show a slight outline of the mask, which you will have to touch up separately. * 2.5.47 - 29 Jul 2023 - (beta-only) Fix long prompts with SDXL. diff --git a/ui/index.html b/ui/index.html index da074f90..d5ee2ae6 100644 --- a/ui/index.html +++ b/ui/index.html @@ -32,7 +32,7 @@

Easy Diffusion - v2.6.0 + v3.0.0

From b6e512e65f10e04ffbaeaa150bfeecfd89b98398 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 4 Aug 2023 11:21:31 +0530 Subject: [PATCH 08/10] v3 engine name --- ui/media/js/parameters.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/media/js/parameters.js b/ui/media/js/parameters.js index 2678bb91..c66aedc1 100644 --- a/ui/media/js/parameters.js +++ b/ui/media/js/parameters.js @@ -229,9 +229,9 @@ var PARAMETERS = [ { id: "test_diffusers", type: ParameterType.checkbox, - label: "Use the new v2.6 engine (diffusers)", + label: "Use the new v3 engine (diffusers)", note: - "Use our new v2.6 engine, with additional features like LoRA, ControlNet, SDXL, Embeddings, Tiling and lots more! Please press Save, then restart the program after changing this.", + "Use our new v3 engine, with additional features like LoRA, ControlNet, SDXL, Embeddings, Tiling and lots more! Please press Save, then restart the program after changing this.", icon: "fa-bolt", default: true, saveInAppConfig: true, From 20b06db35985a77107a02ee76d30c5c4db226c9e Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 4 Aug 2023 19:46:37 +0530 Subject: [PATCH 09/10] Include onnx and polygraphy for TRT, and allow skipping the wheels for TRT --- ui/easydiffusion/package_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/easydiffusion/package_manager.py b/ui/easydiffusion/package_manager.py index c246c54d..6a0521b2 100644 --- a/ui/easydiffusion/package_manager.py +++ b/ui/easydiffusion/package_manager.py @@ -25,7 +25,7 @@ installing = [] # remove this once TRT releases on pypi if platform.system() == "Windows": trt_dir = os.path.join(app.ROOT_DIR, "tensorrt") - if os.path.exists(trt_dir): + if os.path.exists(trt_dir) and os.path.isdir(trt_dir) and len(os.listdir(trt_dir)) > 0: files = os.listdir(trt_dir) packages = manifest["tensorrt"]["install"] @@ -61,6 +61,10 @@ def install(module_name): raise RuntimeError(f"Can't install unknown package: {module_name}!") commands = manifest[module_name]["install"] + if module_name == "tensorrt": + commands += [ + "protobuf==3.20.3 polygraphy==0.47.1 onnx==1.14.0 --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com" + ] commands = [f"python -m pip install --upgrade {cmd}" for cmd in commands] installing.append(module_name) From 50dea4cb52a593f46710006596b075825e9c2537 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 4 Aug 2023 19:48:24 +0530 Subject: [PATCH 10/10] Use --pre for trt installs --- ui/easydiffusion/package_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/easydiffusion/package_manager.py b/ui/easydiffusion/package_manager.py index 6a0521b2..de64b66c 100644 --- a/ui/easydiffusion/package_manager.py +++ b/ui/easydiffusion/package_manager.py @@ -12,9 +12,9 @@ from easydiffusion import app manifest = { "tensorrt": { "install": [ - "nvidia-cudnn --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com", - "tensorrt-libs --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com", - "tensorrt --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com", + "nvidia-cudnn --pre --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com", + "tensorrt-libs --pre --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com", + "tensorrt --pre --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com", ], "uninstall": ["tensorrt"], # TODO also uninstall tensorrt-libs and nvidia-cudnn, but do it upon restarting (avoid 'file in use' error)