diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index fc82160..a56d458 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -1647,13 +1647,12 @@ def cleanup(completeprompt): # first, move LoRA's to the back dynamically # Find all occurrences of text between < and > using regex - matches = re.findall(r"<[^>]+>", completeprompt) + allLoRA = re.findall(r"<[^>]+>", completeprompt) # Remove the extracted matches from completeprompt completeprompt = re.sub(r"<[^>]+>", "", completeprompt) - # Move the extracted matches to the end of completeprompt - completeprompt += " " + " ".join(matches) + # sometimes if there are not enough artist, we get left we things formed as (:1.2) completeprompt = re.sub('\(\:\d+\.\d+\)', '', completeprompt) @@ -1695,7 +1694,8 @@ def cleanup(completeprompt): completeprompt = re.sub('(?