From 07b467e4bce8968db1b89b657ae4f42b00f56f47 Mon Sep 17 00:00:00 2001 From: Olivia Godone-Maresca Date: Sat, 1 Apr 2023 11:42:20 -0400 Subject: [PATCH] Add LoRA Strength to metadata files --- ui/easydiffusion/utils/save_utils.py | 2 +- ui/index.html | 2 +- ui/media/js/dnd.js | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/easydiffusion/utils/save_utils.py b/ui/easydiffusion/utils/save_utils.py index 950f04b0..b80d0806 100644 --- a/ui/easydiffusion/utils/save_utils.py +++ b/ui/easydiffusion/utils/save_utils.py @@ -28,7 +28,7 @@ TASK_TEXT_MAPPING = { "use_hypernetwork_model": "Hypernetwork model", "hypernetwork_strength": "Hypernetwork Strength", "use_lora_model": "LoRA model", - # "lora_alpha": "LoRA Strength", + "lora_alpha": "LoRA Strength", } diff --git a/ui/index.html b/ui/index.html index fed2b3b9..faf7bfeb 100644 --- a/ui/index.html +++ b/ui/index.html @@ -221,7 +221,7 @@ - +
diff --git a/ui/media/js/dnd.js b/ui/media/js/dnd.js index 98c5e26a..88a8b0c7 100644 --- a/ui/media/js/dnd.js +++ b/ui/media/js/dnd.js @@ -245,6 +245,14 @@ const TASK_MAPPING = { readUI: () => loraModelField.value, parse: (val) => val }, + lora_alpha: { name: 'LoRA Strength', + setUI: (lora_alpha) => { + loraAlphaField.value = lora_alpha + updateLoraAlphaSlider() + }, + readUI: () => parseFloat(loraAlphaField.value), + parse: (val) => parseFloat(val) + }, use_hypernetwork_model: { name: 'Hypernetwork model', setUI: (use_hypernetwork_model) => { const oldVal = hypernetworkModelField.value