From c659ed21550e3ae3c3bd2d8f0f4e566aeae7ecfd Mon Sep 17 00:00:00 2001 From: DominikDoom Date: Sun, 24 Dec 2023 14:11:19 +0100 Subject: [PATCH] Use x.toLowerCase().includes(searchTerm) || x.toLowerCase().replaceAll(" ", "_").includes(searchTerm); tempResults = lycos.filter(x => filterCondition(x[0])); // Filter by tagword } else { @@ -52,7 +52,8 @@ async function sanitize(tagType, text) { multiplier = info["preferred weight"]; } - return ``; + let prefix = TAC_CFG.useLoraPrefixForLycos ? "lora" : "lyco"; + return `<${prefix}:${text}:${multiplier}>`; } return null; } diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index 2d0b3fc..b25050e 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -217,6 +217,7 @@ async function syncOptions() { useHypernetworks: opts["tac_useHypernetworks"], useLoras: opts["tac_useLoras"], useLycos: opts["tac_useLycos"], + useLoraPrefixForLycos: opts["tac_useLoraPrefixForLycos"], showWikiLinks: opts["tac_showWikiLinks"], showExtraNetworkPreviews: opts["tac_showExtraNetworkPreviews"], modelSortOrder: opts["tac_modelSortOrder"], diff --git a/scripts/tag_autocomplete_helper.py b/scripts/tag_autocomplete_helper.py index 486056f..deccc0e 100644 --- a/scripts/tag_autocomplete_helper.py +++ b/scripts/tag_autocomplete_helper.py @@ -476,6 +476,7 @@ def on_ui_settings(): "tac_useHypernetworks": shared.OptionInfo(True, "Search for hypernetworks"), "tac_useLoras": shared.OptionInfo(True, "Search for Loras"), "tac_useLycos": shared.OptionInfo(True, "Search for LyCORIS/LoHa"), + "tac_useLoraPrefixForLycos": shared.OptionInfo(True, "Use the '