From dc34db53e4c56784220a47c3095f7fb9bfe84130 Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Sat, 28 Jan 2023 22:30:04 +0100 Subject: [PATCH] Trim carriage return from hyp and lora txts --- javascript/tagAutocomplete.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index 43102ab..062de4c 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -1181,6 +1181,7 @@ async function setup() { try { hypernetworks = (await readFile(`${tagBasePath}/temp/hyp.txt?${new Date().getTime()}`)).split("\n") .filter(x => x.trim().length > 0) //Remove empty lines + .map(x => x.trim()); // Remove carriage returns and padding if it exists } catch (e) { console.error("Error loading hypernetworks.txt: " + e); } @@ -1190,6 +1191,7 @@ async function setup() { try { loras = (await readFile(`${tagBasePath}/temp/lora.txt?${new Date().getTime()}`)).split("\n") .filter(x => x.trim().length > 0) // Remove empty lines + .map(x => x.trim()); // Remove carriage returns and padding if it exists } catch (e) { console.error("Error loading lora.txt: " + e); }