From 4fe4366765288485f01dba08ad8d95c43e6a9f2e Mon Sep 17 00:00:00 2001 From: slimerplanet Date: Thu, 19 Oct 2023 20:36:59 +0300 Subject: [PATCH] Update horde.js --- scripts/horde.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/horde.js b/scripts/horde.js index 450068c..27f9571 100644 --- a/scripts/horde.js +++ b/scripts/horde.js @@ -487,6 +487,15 @@ function horde_AddLora(name, id, tokens=[]) { label.textContent = 'Strength: ' + input.value; let _lora = horde_loras.find(lora => lora.name === id.toString()); + if(_lora == null){ + _lora = { + "name": id.toString(), + "model": 1, + "clip": 1, + } + horde_loras.push(_lora); + } + _lora.model = parseFloat(input.value); _lora.clip = parseFloat(input.value); })