From ea0748346505239d5ebd2651c27fb652f23aee28 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Fri, 1 Sep 2023 22:54:03 +0200 Subject: [PATCH 1/5] Error handling for models_dir --- ui/easydiffusion/app.py | 4 +++- ui/easydiffusion/model_manager.py | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ui/easydiffusion/app.py b/ui/easydiffusion/app.py index abd003d1..43d0e3c4 100644 --- a/ui/easydiffusion/app.py +++ b/ui/easydiffusion/app.py @@ -104,7 +104,9 @@ def init(): warnings.filterwarnings("ignore", category=UserWarning, message="TypedStorage is deprecated") config = getConfig() - MODELS_DIR = config.get("models_dir", MODELS_DIR) + config_models_dir = config.get("models_dir", None) + if (config_models_dir is not None and config_models_dir != ""): + MODELS_DIR = config_models_dir def init_render_threads(): diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py index 90daadba..f6e1e2d0 100644 --- a/ui/easydiffusion/model_manager.py +++ b/ui/easydiffusion/model_manager.py @@ -261,7 +261,24 @@ def make_model_folders(): for model_type in KNOWN_MODEL_TYPES: model_dir_path = os.path.join(app.MODELS_DIR, model_type) - os.makedirs(model_dir_path, exist_ok=True) + try: + os.makedirs(model_dir_path, exist_ok=True) + except Exception as e: + from rich.console import Console + from rich.panel import Panel + + Console().print( + Panel( + "\n" + + f"Error while creating the models directory: '{model_dir_path}'\n" + + f"Error: {e}\n\n" + + f"[white]Check the 'models_dir:' line in the file '{os.path.join(app.ROOT_DIR, 'config.yaml')}'.[/white]\n", + title="Fatal Error starting Easy Diffusion", + style="bold yellow on red", + ) + ) + input("Press Enter to terminate...") + exit(1) help_file_name = f"Place your {model_type} model files here.txt" help_file_contents = f'Supported extensions: {" or ".join(MODEL_EXTENSIONS.get(model_type))}' From ad1374af1dbbc13ac26d4b76177e696597f79d3e Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 2 Sep 2023 18:34:12 +0530 Subject: [PATCH 2/5] bring back config print --- 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 67077c88..6814f782 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -244,7 +244,7 @@ def setup_amd_environment(): def launch_uvicorn(): config = get_config() - # pprint(config) + pprint(config) with open("scripts/install_status.txt","a") as f: f.write("sd_weights_downloaded\n") From 58d3507155cc7ef0e66252e49cd3e11d7498cf2e Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 2 Sep 2023 19:30:27 +0530 Subject: [PATCH 3/5] sdkit 2.0.10 - SDXL ControlNet support; upgrade to diffusers 0.20.2 --- 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 6814f782..f5bf3a9a 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -21,7 +21,7 @@ os_name = platform.system() modules_to_check = { "torch": ("1.11.0", "1.13.1", "2.0.0", "2.0.1"), "torchvision": ("0.12.0", "0.14.1", "0.15.1", "0.15.2"), - "sdkit": "2.0.9", + "sdkit": "2.0.10", "stable-diffusion-sdkit": "2.1.4", "rich": "12.6.0", "uvicorn": "0.19.0", From 1075a5ed93fc2be9efb648ddec99f1e5d9d27ac2 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 2 Sep 2023 19:30:56 +0530 Subject: [PATCH 4/5] changelog --- CHANGES.md | 1 + ui/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 6f93f830..1382322d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ - **Major rewrite of the code** - We've switched to using diffusers under-the-hood, which allows us to release new features faster, and focus on making the UI and installer even easier to use. ### Detailed changelog +* 3.0.5 - 2 Sep 2023 - Support SDXL ControlNets. * 3.0.4 - 1 Sep 2023 - Fix incorrect metadata generated for embeddings, when the exact word doesn't match the case, or is part of a larger word. * 3.0.4 - 1 Sep 2023 - Simplify the installation for AMD users on Linux. Thanks @JeLuf. * 3.0.4 - 1 Sep 2023 - Allow using a different folder for models. This is useful if you want to share a models folder across different software, or on a different drive. You can change this path in the Settings tab. diff --git a/ui/index.html b/ui/index.html index 5542185c..b406a71f 100644 --- a/ui/index.html +++ b/ui/index.html @@ -35,7 +35,7 @@

Easy Diffusion - v3.0.4 + v3.0.5

From 120f9e567c5fb2eb9a7f30bc2f4038a4b156cd52 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Sun, 3 Sep 2023 13:49:30 +0200 Subject: [PATCH 5/5] Windows: Show GPU list and driver versions in log --- scripts/Start Stable Diffusion UI.cmd | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/Start Stable Diffusion UI.cmd b/scripts/Start Stable Diffusion UI.cmd index a10302ee..2bd54845 100644 --- a/scripts/Start Stable Diffusion UI.cmd +++ b/scripts/Start Stable Diffusion UI.cmd @@ -39,6 +39,7 @@ call where conda call conda --version echo . echo COMSPEC=%COMSPEC% +wmic path win32_VideoController get name,AdapterRAM,DriverDate,DriverVersion @rem Download the rest of the installer and UI call scripts\on_env_start.bat