more fixes and tuning
This commit is contained in:
+27
-2
@@ -25,6 +25,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
originalartistchoice = artists
|
||||
doartistnormal = True
|
||||
outfitmode = 0
|
||||
|
||||
partlystylemode = False
|
||||
# load the config file
|
||||
@@ -1543,12 +1544,17 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
# start tokinator here
|
||||
if(thetokinatormode == True):
|
||||
tokinatorsubtype = ["personification", "human form", "object", "landscape", "OR(creature;beast;animal;myth;concept;world;planet)", "building", "location", "shape", "-token-"]
|
||||
if(chance_roll(insanitylevel,"normal")):
|
||||
if(chance_roll(insanitylevel,"normal")):
|
||||
completeprompt += "(OR(;-imagetypequality-;uncommon) OR(-imagetype-;-othertype-;rare):1.3) "
|
||||
else:
|
||||
completeprompt += "OR(;-imagetypequality-;uncommon) OR(-imagetype-;-othertype-;rare) "
|
||||
completeprompt += random.choice(tokinatorlist)
|
||||
completeprompt = completeprompt.replace("-tokensubtype-", random.choice(tokinatorsubtype))
|
||||
|
||||
if("subject" in givensubject and smartsubject):
|
||||
givensubject = givensubject.replace("subject", "-token-")
|
||||
|
||||
if(givensubject == "" and overrideoutfit == ""):
|
||||
completeprompt = completeprompt.replace("-subject-", "-token-")
|
||||
@@ -1668,10 +1674,28 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
# divider between subject and everything else
|
||||
completeprompt += " @ "
|
||||
|
||||
|
||||
if(generatesubject == True):
|
||||
# start with descriptive qualities
|
||||
|
||||
# outfit in front mode?
|
||||
# outfitmode = 0 = NO
|
||||
# outfitmode = 1 IN FRONT
|
||||
# outfitmode = 2 IS NORMAL
|
||||
if(overrideoutfit!=""):
|
||||
outfitmode = 2
|
||||
if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple", "firstname"] and chance_roll(insanitylevel, outfitchance) and generateoutfit == True and humanspecial != 1):
|
||||
if(random.randint(0,10)==0):
|
||||
outfitmode = 1
|
||||
else:
|
||||
outfitmode = 2
|
||||
|
||||
if(outfitmode == 1):
|
||||
completeprompt += "OR(wearing;dressed in;in;normal) OR(;OR(;a very;rare) -outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit-, "
|
||||
if(extraordinary_dist(insanitylevel)):
|
||||
completeprompt += " -outfitvomit-, "
|
||||
|
||||
|
||||
|
||||
if(subjectingivensubject):
|
||||
completeprompt += " " + givensubjectpromptlist[0] + " "
|
||||
@@ -2117,11 +2141,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
completeprompt += " -minivomit-, "
|
||||
|
||||
# outfit builder
|
||||
if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple", "firstname"] and chance_roll(insanitylevel, outfitchance) and generateoutfit == True and humanspecial != 1):
|
||||
#if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple", "firstname"] and chance_roll(insanitylevel, outfitchance) and generateoutfit == True and humanspecial != 1):
|
||||
if(outfitmode == 2):
|
||||
completeprompt += " " + random.choice(buildoutfitlist) + ", "
|
||||
if(extraordinary_dist(insanitylevel)):
|
||||
completeprompt += " -outfitvomit-, "
|
||||
elif(overrideoutfit != "" and imagetype != "only templates mode"):
|
||||
elif(outfitmode == 2 and overrideoutfit != "" and imagetype != "only templates mode"):
|
||||
completeprompt += " " + random.choice(buildoutfitlist) + ", "
|
||||
if(extraordinary_dist(insanitylevel)):
|
||||
completeprompt += " -outfitvomit-, "
|
||||
|
||||
+25
-1
@@ -219,4 +219,28 @@ def load_all_artist_and_category():
|
||||
|
||||
return artistlist, categorylist
|
||||
|
||||
|
||||
def sort_and_dedupe_csv_file():
|
||||
tokenlist = csv_to_list(csvfilename="tokens",skipheader=False)
|
||||
tokenlist = sorted(set(tokenlist))
|
||||
newlist = []
|
||||
for i in tokenlist:
|
||||
j = i.lower()
|
||||
result = all(c == i[0] for c in i)
|
||||
if result:
|
||||
print("String {} have all characters same".format(i))
|
||||
else:
|
||||
newlist.append(j)
|
||||
|
||||
|
||||
newlist = sorted(set(newlist))
|
||||
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
full_path = os.path.join(script_dir, "./csvfiles/special_lists/tokenwriter.csv" )
|
||||
with open(full_path, 'w', encoding="utf8") as fp:
|
||||
for item in newlist:
|
||||
# write each item on a new line
|
||||
fp.write("%s\n" % item)
|
||||
|
||||
|
||||
sort_and_dedupe_csv_file()
|
||||
@@ -1,14 +1,14 @@
|
||||
, OR(wearing;dressed in;in;normal) OR(;a very;rare) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- OR(;from the OR(-age-;the -agecalculator-);rare)
|
||||
, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit- OR(;from the OR(-age-;the -agecalculator-);rare)
|
||||
, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit- OR(; and OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit-;rare)
|
||||
, OR(wearing;dressed in;in;normal) OR(;OR(;a very;rare) -outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- OR(;from the OR(-age-;the -agecalculator-);rare)
|
||||
, OR(wearing;dressed in;in;normal) OR(;OR(;a very;rare) -outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit- OR(;from the OR(-age-;the -agecalculator-);rare)
|
||||
, OR(wearing;dressed in;in;normal) OR(;OR(;a very;rare) -outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit- OR(; and OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit-;rare)
|
||||
, 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(;OR(designed;made;inspired;forged) by OR(-brand-;-fashiondesigner-);uncommon)
|
||||
, OR(wearing;dressed in;in;normal) OR(;OR(;a very;rare) -outfitdescriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;OR(designed;made;inspired;forged) by OR(-brand-;-fashiondesigner-);uncommon)
|
||||
, wearing OR(-material-;-color-;-element-;uncommon) -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 OR(;very;rare) -outfitdescriptor- on -himher-,;unique)
|
||||
, -heshe- is OR(wearing;dressed in) OR(;-hisher-;rare) -culture- -outfit-, OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-),;normal) OR(;, It looks OR(;very;rare) -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;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-
|
||||
, OR(wearing;dressed in;in;normal) OR(;OR(;a very;rare) -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-
|
||||
, OR(wearing;dressed in;in;normal) OR(;a very;rare) OR(;-outfitdescriptor-;normal) -outfit-
|
||||
, OR(wearing;dressed in;in;normal) OR(;OR(;a very;rare) -outfitdescriptor-;normal) -outfit-
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,11 @@
|
||||
, a OR(;-token-;normal) -subject- that is -token-, in the background there is -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
of the personification of OR(;-token-;normal) -subject- wearing a -outfit-, background is made up of -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
, an OR(;-token-;normal) object in the shape of OR(;-token-;normal) -subject-, it is -token- and -token-, it is made of -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
, OR(;-token-;normal) -subject- object, very -token-, elements of -token-, in the background there is -token- and -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
, a landscape that features -subject- and -token-, the -token- is -token-, background has -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
of the -tokensubtype- of OR(;-token-;normal) -subject- wearing a -outfit-, background is made up of -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
, an OR(;-token-;normal) -tokensubtype- in the shape of OR(;-token-;normal) -subject-, it is -token- and -token-, it is made of -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
, OR(;-token-;normal) -subject- -tokensubtype-, very -token-, elements of -token-, in the background there is -token- and -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
, a -tokensubtype- that features -subject- and -token-, the -token- is -token-, background has -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
, shaped as a OR(;-token-;normal) -subject-, it is -token-, -token-, in a -outfit-, very -token-, -token-, OR(;-token-;normal)
|
||||
, -conceptprefix- of OR(;-token-;normal) -subject- on a -token-, -token- elements and detailed as -token-, has a -outfit-, in the back are -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
of a OR(;-token-;normal) OR(creature;beast;animal;myth;concept) based on -subject-, it is -token- and very -token-, has elements of OR(;-token-;normal) -outfit-, very -token-, -token-, OR(;-token-;normal)
|
||||
, -outfit- with human form of OR(;-token-;normal) -subject-, feeling like -token-, detailed with -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
of a OR(;-token-;normal) -tokensubtype- based on -subject-, it is -token- and very -token-, has elements of OR(;-token-;normal) -outfit-, very -token-, -token-, OR(;-token-;normal)
|
||||
, -outfit- with -tokensubtype- of OR(;-token-;normal) -subject-, feeling like -token-, detailed with -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
-tokensubtype-, -token-, -subject-, -token-, -outfit-, -token-, -token-, -token-, -token-, -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
a OR(;-token-;normal) -tokensubtype- -subject- adorned with -token- and -token-, the mood is -token-, has a -outfit- that is -token-, very -token-, -token-, OR(;-token-;normal)
|
||||
|
+291150
-515773
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -98,7 +98,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||
generateprompts(10,5
|
||||
,"all" # subject
|
||||
,"all" # artists
|
||||
,"the tokinator" # 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"
|
||||
,"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"
|
||||
, False # only artists
|
||||
,"","","PREFIXPROMPT"
|
||||
,"SUFFIXPROMPT"
|
||||
|
||||
Reference in New Issue
Block a user