From 4c8d5a70771251ee28351a5b7740747b33d41d6d Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 29 Sep 2023 20:23:24 +0530 Subject: [PATCH 1/3] Allow setting the metadata field in the server settings, instead of forcing json whenever force_save_path is set --- ui/media/js/parameters.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/media/js/parameters.js b/ui/media/js/parameters.js index a3206167..454f2b31 100644 --- a/ui/media/js/parameters.js +++ b/ui/media/js/parameters.js @@ -525,6 +525,10 @@ async function getAppConfig() { customHeightField.step = IMAGE_STEP_SIZE } + if (config.force_save_metadata) { + metadataOutputFormatField.value = config.force_save_metadata + } + console.log("get config status response", config) return config @@ -737,7 +741,6 @@ async function getSystemInfo() { if (force == true) { saveToDiskField.checked = true metadataOutputFormatField.disabled = false - metadataOutputFormatField.value = "json" } saveToDiskField.disabled = force diskPathField.disabled = force From e999832c267b9fe2200dee5cf8104ddce78fad40 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 30 Sep 2023 20:11:28 +0530 Subject: [PATCH 2/3] Prevent the user from changing the metadata format if the server has set force_save_metadata --- ui/easydiffusion/server.py | 1 + ui/media/js/parameters.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/easydiffusion/server.py b/ui/easydiffusion/server.py index 5ca4f452..a251ede6 100644 --- a/ui/easydiffusion/server.py +++ b/ui/easydiffusion/server.py @@ -225,6 +225,7 @@ def read_web_data_internal(key: str = None, **kwargs): "hosts": app.getIPConfig(), "default_output_dir": output_dir, "enforce_output_dir": ("force_save_path" in config), + "enforce_output_metadata": ("force_save_metadata" in config), } system_info["devices"]["config"] = config.get("render_devices", "auto") return JSONResponse(system_info, headers=NOCACHE_HEADERS) diff --git a/ui/media/js/parameters.js b/ui/media/js/parameters.js index 454f2b31..97b7a96d 100644 --- a/ui/media/js/parameters.js +++ b/ui/media/js/parameters.js @@ -740,10 +740,13 @@ async function getSystemInfo() { force = res["enforce_output_dir"] if (force == true) { saveToDiskField.checked = true - metadataOutputFormatField.disabled = false + metadataOutputFormatField.disabled = res["enforce_output_metadata"] + diskPathField.disabled = true } saveToDiskField.disabled = force - diskPathField.disabled = force + } else { + diskPathField.disabled = !saveToDiskField.checked + metadataOutputFormatField.disabled = !saveToDiskField.checked } setDiskPath(res["default_output_dir"], force) } catch (e) { From 45facf64e55b444ff2fb2ea750cd99a6969566db Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 2 Oct 2023 12:08:58 +0530 Subject: [PATCH 3/3] sdkit 2.0.14 - pin transformers 4.33.2 (via sd 2.1.5) and acccelerate 0.23.0, and k-diffusion to 0.0.12 --- 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 8ffb844e..dbba03bb 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.12", + "sdkit": "2.0.14", "stable-diffusion-sdkit": "2.1.4", "rich": "12.6.0", "uvicorn": "0.19.0",