From 0e0276980fc9107f250bf691d699f03c8a43fe49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20=20Sk=C3=B6ld?= Date: Wed, 5 Jun 2024 12:00:03 +0200 Subject: [PATCH] Added normal lora loader to favourites --- web/js/loraContextMenu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/js/loraContextMenu.js b/web/js/loraContextMenu.js index 0245de7..6d43d75 100644 --- a/web/js/loraContextMenu.js +++ b/web/js/loraContextMenu.js @@ -10,7 +10,7 @@ const settingDefinition = { }; const favouriteLoraId = "sn0w.FavouriteLoras" -let customLoraLoaders = ["Load Lora XL", "Load Lora 1.5"]; +let loraLoaders = ["Load Lora XL", "Load Lora 1.5", "LoraLoader"]; let existingList = []; app.registerExtension({ @@ -38,12 +38,12 @@ app.registerExtension({ } // Combine the existing custom loaders with the fetched ones - customLoraLoaders = customLoraLoaders.concat(customLoraLoadersXLArray, customLoraLoaders15Array); + loraLoaders = loraLoaders.concat(customLoraLoadersXLArray, customLoraLoaders15Array); const original_getNodeMenuOptions = app.canvas.getNodeMenuOptions; app.canvas.getNodeMenuOptions = function (node) { const options = original_getNodeMenuOptions.apply(this, arguments); - if (customLoraLoaders.includes(node.type)) { + if (loraLoaders.includes(node.type)) { const nullIndex = options.indexOf(null); // Check if the filename is in the existingList