Adding things for outfit override
This commit is contained in:
+13
-3
@@ -10,7 +10,7 @@ from random_functions import *
|
||||
# insanity level controls randomness of propmt 0-10
|
||||
# forcesubject van be used to force a certain type of subject
|
||||
# Set artistmode to none, to exclude artists
|
||||
def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all", imagetype = "all", onlyartists = False, antivalues = "", prefixprompt = "", suffixprompt ="",promptcompounderlevel ="1", seperator = "comma", givensubject="",smartsubject = True,giventypeofimage="", imagemodechance = 20, gender = "all", subtypeobject="all", subtypehumanoid="all", subtypeconcept="all", advancedprompting=True, hardturnoffemojis=False, seed=-1):
|
||||
def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all", imagetype = "all", onlyartists = False, antivalues = "", prefixprompt = "", suffixprompt ="",promptcompounderlevel ="1", seperator = "comma", givensubject="",smartsubject = True,giventypeofimage="", imagemodechance = 20, gender = "all", subtypeobject="all", subtypehumanoid="all", subtypeconcept="all", advancedprompting=True, hardturnoffemojis=False, seed=-1, overrideoutfit=""):
|
||||
|
||||
# set seed
|
||||
# For use in ComfyUI (might bring to Automatic1111 as well)
|
||||
@@ -1608,6 +1608,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
# outfit builder
|
||||
if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, outfitchance) and generateoutfit == True and humanspecial != 1):
|
||||
completeprompt += " " + random.choice(buildoutfitlist) + ", "
|
||||
elif(overrideoutfit != ""):
|
||||
completeprompt += " " + random.choice(buildoutfitlist) + ", "
|
||||
|
||||
if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, posechance) and humanspecial != 1 and generatepose == True):
|
||||
completeprompt += random.choice(poselist) + ", "
|
||||
@@ -1957,11 +1959,19 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
# first some manual stuff for outfit
|
||||
|
||||
if(unique_dist(insanitylevel)): # sometimes, its just nice to have descriptor and a normal "outfit". We use mini outfits for this!
|
||||
completeprompt = completeprompt.replace("-outfit-", "-minioutfit-",1)
|
||||
completeprompt = completeprompt.replace("-outfit-", "-minioutfit-",1)
|
||||
if(rare_dist(insanitylevel)): # Use base outfit descriptor, until we are not.
|
||||
completeprompt = completeprompt.replace("-outfitdescriptor-", "-descriptor-",1)
|
||||
completeprompt = completeprompt.replace("-outfitdescriptor-", "-descriptor-",1)
|
||||
|
||||
if(overrideoutfit != ""):
|
||||
completeprompt = completeprompt.replace("-sameoutfit-", overrideoutfit)
|
||||
completeprompt = completeprompt.replace("-outfit-", overrideoutfit,1)
|
||||
completeprompt = completeprompt.replace("-minioutfit-", overrideoutfit,1)
|
||||
completeprompt = completeprompt.replace("-overrideoutfit-", overrideoutfit)
|
||||
|
||||
# If we don't have an override outfit, then remove this part
|
||||
completeprompt = completeprompt.replace("-overrideoutfit-", "")
|
||||
|
||||
|
||||
|
||||
# lol, this needs a rewrite :D
|
||||
|
||||
@@ -125,6 +125,7 @@ Incredibly Detailed
|
||||
Inspirational
|
||||
Intricate
|
||||
Kawaii
|
||||
Large
|
||||
Layered
|
||||
Light
|
||||
Lovely
|
||||
@@ -164,9 +165,11 @@ Sexy
|
||||
Shabby
|
||||
Shabby Chic
|
||||
Shiny
|
||||
Short
|
||||
Silky
|
||||
Simple
|
||||
Sleek
|
||||
Small
|
||||
Smart
|
||||
Smooth
|
||||
Snug
|
||||
|
||||
|
@@ -2,8 +2,8 @@
|
||||
, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit-
|
||||
, OR(wearing;dressed in;in;normal) OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare)
|
||||
, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon)
|
||||
, wearing OR(-material-;-color-)
|
||||
, wearing OR(-material-;-color-) -overrideoutfit-
|
||||
, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print-
|
||||
. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -outfit-. OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-) OR( OR(and has;. It has) OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- on it.; and is OR(made of;detailed with bits of) -material-;rare) OR(;.It looks -outfitdescriptor- on -himher-.;unique)
|
||||
. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-. OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-).;normal) OR(;.It looks -outfitdescriptor- on -himher-.;unique)
|
||||
. -heshe- is OR(wearing;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-. OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-).;normal) OR(;.It looks -outfitdescriptor- on -himher-.;unique)
|
||||
. -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) by -brand-. It is OR(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;. The -sameoutfit- looks -outfitdescriptor- on -himher-.;unique)
|
||||
|
+7
-5
@@ -10,7 +10,7 @@ from build_dynamic_prompt import *
|
||||
|
||||
|
||||
|
||||
def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", imagetype="all",onlyartists=False, workprompt="", antistring="",prefixprompt="", suffixprompt="", negativeprompt="",promptcompounderlevel = "1", seperator="comma",givensubject="",smartsubject=True,giventypeofimage="",imagemodechance=20, gender = "all", subtypeobject = "all", subtypehumanoid = "all", subtypeconcept = "all", advancedprompting = True, hardturnoffemojis=False):
|
||||
def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", imagetype="all",onlyartists=False, workprompt="", antistring="",prefixprompt="", suffixprompt="", negativeprompt="",promptcompounderlevel = "1", seperator="comma",givensubject="",smartsubject=True,giventypeofimage="",imagemodechance=20, gender = "all", subtypeobject = "all", subtypehumanoid = "all", subtypeconcept = "all", advancedprompting = True, hardturnoffemojis=False, seed=0, overrideoutfit=""):
|
||||
loops = int(amount) # amount of images to generate
|
||||
steps = 0
|
||||
|
||||
@@ -18,7 +18,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||
while steps < loops:
|
||||
# build prompt
|
||||
|
||||
result = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, onlyartists,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, subtypeobject, subtypehumanoid, subtypeconcept, advancedprompting, hardturnoffemojis)
|
||||
result = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, onlyartists,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, subtypeobject, subtypehumanoid, subtypeconcept, advancedprompting, hardturnoffemojis, seed, overrideoutfit)
|
||||
|
||||
print("")
|
||||
print("loop " + str(steps))
|
||||
@@ -51,6 +51,8 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||
print("")
|
||||
print("All done!")
|
||||
|
||||
generateprompts(10,9,"humanoid","all","all",False,"","","PREFIXPROMPT"
|
||||
,"SUFFIXPROMPT , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit-"
|
||||
,"",1,"","",True,"",100, "all", "all", "all", "all", False, True)
|
||||
generateprompts(10,5,"all","all","all",False,"","","PREFIXPROMPT"
|
||||
,"SUFFIXPROMPT"
|
||||
,"",1,"","",True,"",100, "all", "all", "all", "all", False, True, 0
|
||||
, "armor" #outfit override
|
||||
)
|
||||
Reference in New Issue
Block a user