Fix for issue with SD next and regional prompter
and some minor other fixes
This commit is contained in:
@@ -2024,7 +2024,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
if(genjoboractivity and genjoboractivitylocation=="back"):
|
||||
joboractivitylist = [joblist,humanactivitylist]
|
||||
completeprompt += random.choice(random.choice(joboractivitylist)) + ", "
|
||||
completeprompt += ", " + random.choice(random.choice(joboractivitylist)) + ", "
|
||||
|
||||
|
||||
# if(subjectchooser in ["animal as human","human","job", "fictional", "non fictional", "humanoid"] and legendary_dist(insanitylevel)):
|
||||
@@ -3769,6 +3769,9 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5):
|
||||
completeprompt = re.sub('\(Womans', '(Women', completeprompt)
|
||||
completeprompt = re.sub('\(womans', '(women', completeprompt)
|
||||
|
||||
completeprompt = re.sub('-sameothersubject-', 'it', completeprompt)
|
||||
completeprompt = re.sub('-samehumansubject-', 'the person', completeprompt)
|
||||
|
||||
|
||||
completeprompt = re.sub('(?<!\()\s?\(', ' (', completeprompt)
|
||||
completeprompt = re.sub('\)(?![\s)])', ') ', completeprompt)
|
||||
|
||||
@@ -10,4 +10,5 @@
|
||||
, -heshe- is OR(wearing a;dressed in a) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired;forged) by -brand-, It is OR(;very;rare) OR(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;, The -sameoutfit- looks OR(;very;rare) -outfitdescriptor- on -himher-,;unique)
|
||||
, OR(wearing;dressed in;in;normal) OR(;a very;rare) OR(;-outfitdescriptor-;normal) OR(-minioutfit-;-outfit-;uncommon), OR(-hisher-;The;normal) -sameoutfit- -outfitvomit-
|
||||
, -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -outfit-, OR(-hisher-;The;normal) -sameoutfit- OR(is tailored by -fashiondesigner- OR(; and -fashiondesigner-;uncommon);is inspired by the -charactertype- OR(;and -charactertype-;uncommon))
|
||||
, -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -artmovement- fashion style -outfit-
|
||||
, -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -artmovement- fashion style -outfit-
|
||||
, OR(wearing;dressed in;in;normal) OR(;a very;rare) OR(;-outfitdescriptor-;normal) -outfit-
|
||||
|
+6
-6
@@ -39,7 +39,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||
print(result)
|
||||
break
|
||||
|
||||
if(overrideoutfit != "" and overrideoutfit not in result ):
|
||||
if(overrideoutfit != "" and overrideoutfit not in result and onlyartists == False):
|
||||
print("The outfit override is not showing up!")
|
||||
print("")
|
||||
print(result)
|
||||
@@ -88,15 +88,15 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||
print("")
|
||||
print("All done!")
|
||||
|
||||
generateprompts(10,5
|
||||
,"" # subject
|
||||
generateprompts(100,5
|
||||
,"all" # subject
|
||||
,"all" # artists
|
||||
,"all" # image type "only other types", "only templates mode", "art blaster mode", "quality vomit mode", "color cannon mode", "unique art mode", "massive madness mode", "photo fantasy mode", "subject only mode", "fixed styles mode"
|
||||
, True # only artists
|
||||
, False # only artists
|
||||
,"","","PREFIXPROMPT"
|
||||
,"SUFFIXPROMPT"
|
||||
,"",1,""
|
||||
,"" # subject override
|
||||
,"TESTSUBJECT" # subject override
|
||||
,True,
|
||||
"",20
|
||||
, "all" # gender
|
||||
@@ -106,5 +106,5 @@ generateprompts(10,5
|
||||
, False # prompt switching
|
||||
, True # Turn off emojis
|
||||
, 0 # seed
|
||||
, "TEST" #outfit override
|
||||
, "TESTOUTFIT" #outfit override
|
||||
)
|
||||
@@ -1093,14 +1093,20 @@ class Script(scripts.Script):
|
||||
print(" ")
|
||||
print(p.prompt)
|
||||
|
||||
# finally figured out how to do multiple batch sizes
|
||||
promptlist = []
|
||||
for i in range(batchsize):
|
||||
promptlist.append(p.prompt)
|
||||
if(batchsize>1):
|
||||
# finally figured out how to do multiple batch sizes
|
||||
|
||||
for i in range(batchsize):
|
||||
promptlist.append(p.prompt)
|
||||
|
||||
p.prompt = promptlist
|
||||
p.batch_size = batchsize
|
||||
p.hr_prompt = promptlist
|
||||
p.prompt = promptlist
|
||||
p.batch_size = batchsize
|
||||
p.hr_prompt = promptlist
|
||||
else:
|
||||
p.batch_size = batchsize
|
||||
p.hr_prompt = p.prompt
|
||||
|
||||
processed = process_images(p)
|
||||
images += processed.images
|
||||
infotexts += processed.infotexts
|
||||
|
||||
Reference in New Issue
Block a user