From b3d422f0b9fc943fecec93c608b33f3e1cd451be Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Thu, 28 Sep 2023 21:36:22 +0200 Subject: [PATCH] Update build_dynamic_prompt.py Turned off Lora movements, until I have time to make it an option --- build_dynamic_prompt.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index faa4dba..a4b29b9 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -2603,13 +2603,15 @@ def replace_match(match): def cleanup(completeprompt, advancedprompting): + # This part is turned off, will bring it back later as an option + # first, move LoRA's to the back dynamically # Find all occurrences of text between < and > using regex - allLoRA = re.findall(r"<[^>]+>", completeprompt) + # allLoRA = re.findall(r"<[^>]+>", completeprompt) # Remove the extracted matches from completeprompt - completeprompt = re.sub(r"<[^>]+>", "", completeprompt) + # completeprompt = re.sub(r"<[^>]+>", "", completeprompt) # if we are not using advanced prompting, remove any hybrid stuff: @@ -2664,7 +2666,7 @@ def cleanup(completeprompt, advancedprompting): completeprompt = re.sub('\)(?![\s)])', ') ', completeprompt) # Move the extracted LoRA's to the end of completeprompt - completeprompt += " " + " ".join(allLoRA) + #completeprompt += " " + " ".join(allLoRA) completeprompt = completeprompt.strip(", ")