mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-19 17:39:16 +02:00
Merge dad9f7b7262dc7df25ba64da0b510317b84259d0 into 8380ba97c5f377f855cfa60528feabeb3be11796
This commit is contained in:
commit
2bfef4fa9b
@ -82,7 +82,9 @@
|
||||
}
|
||||
|
||||
// Clean up the prompt string, e.g. from "apple, banana, <lora:...>, orange, <lora:...> , pear <lora:...>, <lora:...>" to "apple, banana, orange, pear"
|
||||
let cleanedPrompt = prompt.replace(regex, '').replace(/(\s*,\s*(?=\s*,|$))|(^\s*,\s*)|\s+/g, ' ').trim();
|
||||
// let cleanedPrompt = prompt.replace(regex, '').replace(/(\s*,\s*(?=\s*,|$))|(^\s*,\s*)|\s+/g, ' ').trim();
|
||||
// This line keeps /n in prompts. Good if you want to make prompt with multiple sub-prompts. Previous line would merge sub-prompts into one big prompt
|
||||
let cleanedPrompt = prompt.replace(regex, '').trim();
|
||||
//console.log('Matches: ' + JSON.stringify(matches));
|
||||
|
||||
// Return the array of matches and cleaned prompt string
|
||||
|
Loading…
x
Reference in New Issue
Block a user