From 4fd91ec29fa7f4e723d01e4ba95059afc2dde5be Mon Sep 17 00:00:00 2001 From: AIrjen Date: Fri, 19 Jan 2024 10:14:40 +0100 Subject: [PATCH] fix for ruinedfooocus --- build_dynamic_prompt.py | 5 ++++- promptvarianttester.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 9435c21..91e4d77 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -3052,6 +3052,9 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender # first load the lists, all copied from above (can that be done better?) # do we want to use the same settings or keep it open?? + # strip the prompt, for EVO in ruinedfooocus: + prompt = prompt.strip() + # first build up a complete anti list. Those values are removing during list building # this uses the antivalues string AND the antilist.csv emptylist = [] @@ -3552,7 +3555,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender runs += 1 # If nothing changed... Lets do at least something - if(prompt == originaloriginalprompt): + if(prompt.lower().strip() == originaloriginalprompt.lower().strip()): if(random.randint(0,1)==0): prompt += basicenhance else: diff --git a/promptvarianttester.py b/promptvarianttester.py index 2f0103c..7c01e0e 100644 --- a/promptvarianttester.py +++ b/promptvarianttester.py @@ -37,5 +37,5 @@ def generatepromptvariants(amount = 1,prompt="",insanitylevel="5"): print("All done!") generatepromptvariants(10 - ,"a cute girl" #purple (galaxy) in a (bottle:1.2), , background is a lush jungle and a woman wearing a summer dress, -artmovement- - , 3) + ,"a cute woman" #purple (galaxy) in a (bottle:1.2), , background is a lush jungle and a woman wearing a summer dress, -artmovement- + , 1)