|
|
|
@@ -88,6 +88,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
manwomanrelationlist = csv_to_list(csvfilename="manwomanrelations",antilist=antilist,skipheader=True,gender=gender)
|
|
|
|
|
waterlocationlist = csv_to_list("waterlocations", antilist)
|
|
|
|
|
containerlist = csv_to_list("containers", antilist)
|
|
|
|
|
firstnamelist = csv_to_list(csvfilename="firstnames",antilist=antilist,skipheader=True,gender=gender)
|
|
|
|
|
|
|
|
|
|
humanlist = fictionallist + nonfictionallist + humanoidlist
|
|
|
|
|
objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist
|
|
|
|
@@ -163,6 +164,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
generatenonfictionalcharacter = True
|
|
|
|
|
generatehumanoids = True
|
|
|
|
|
generatejob = True
|
|
|
|
|
generatefirstnames = True
|
|
|
|
|
generatelandscape = True
|
|
|
|
|
generateevent = True
|
|
|
|
|
generateconcepts = True
|
|
|
|
@@ -270,6 +272,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
generatehumanoids = False
|
|
|
|
|
if item[0] == 'subject_job' and item[1] != 'on':
|
|
|
|
|
generatejob = False
|
|
|
|
|
if item[0] == 'subject_firstnames' and item[1] != 'on':
|
|
|
|
|
generatefirstnames = False
|
|
|
|
|
# landscape
|
|
|
|
|
if item[0] == 'subject_landscape' and item[1] != 'on':
|
|
|
|
|
generatelandscape = False
|
|
|
|
@@ -459,7 +463,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
generatemanwoman = bool(manwomanlist) and generatemanwoman
|
|
|
|
|
generatemanwomanrelation = bool(manwomanrelationlist) and generatemanwomanrelation
|
|
|
|
|
generatejob = bool(joblist) and generatejob
|
|
|
|
|
generatehumanoid = generatefictionalcharacter or generatenonfictionalcharacter or generatehumanoids or generatemanwoman or generatejob or generatemanwomanrelation
|
|
|
|
|
generatefirstnames = bool(firstnamelist) and generatefirstnames
|
|
|
|
|
generatehumanoid = generatefictionalcharacter or generatenonfictionalcharacter or generatehumanoids or generatemanwoman or generatejob or generatemanwomanrelation or generatefirstnames
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(generatefictionalcharacter):
|
|
|
|
@@ -488,6 +493,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
|
|
|
|
|
if(generatehumanoid):
|
|
|
|
|
mainchooserlist.append("humanoid")
|
|
|
|
|
|
|
|
|
|
if(generatefirstnames):
|
|
|
|
|
humanoidsubjectchooserlist.append("firstname")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
generateanimal = bool(animallist) and generateanimal
|
|
|
|
@@ -870,7 +878,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
else:
|
|
|
|
|
subjectchooser = "animal as human"
|
|
|
|
|
if(mainchooser == "humanoid"):
|
|
|
|
|
#humanoidsubjectchooserlist = ["human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation"]
|
|
|
|
|
#humanoidsubjectchooserlist = ["human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"]
|
|
|
|
|
subjectchooser = random.choice(humanoidsubjectchooserlist)
|
|
|
|
|
if(subtypehumanoid != "all"):
|
|
|
|
|
if(subtypehumanoid == "generic humans"):
|
|
|
|
@@ -885,6 +893,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
subjectchooser = "humanoid"
|
|
|
|
|
if(subtypehumanoid == "based on job or title"):
|
|
|
|
|
subjectchooser = "job"
|
|
|
|
|
if(subtypehumanoid == "based on first name"):
|
|
|
|
|
subjectchooser = "firstname"
|
|
|
|
|
if(mainchooser == "landscape"):
|
|
|
|
|
subjectchooser = "landscape"
|
|
|
|
|
if(mainchooser == "concept"):
|
|
|
|
@@ -1204,10 +1214,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True):
|
|
|
|
|
completeprompt += "-descriptor- "
|
|
|
|
|
|
|
|
|
|
if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation"] and chance_roll(insanitylevel, subjectbodytypechance) and generatebodytype == True):
|
|
|
|
|
if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, subjectbodytypechance) and generatebodytype == True):
|
|
|
|
|
completeprompt += "-bodytype- "
|
|
|
|
|
|
|
|
|
|
if(subjectchooser in ["object","animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation"] and chance_roll(insanitylevel, subjectculturechance) and generatedescriptors == True):
|
|
|
|
|
if(subjectchooser in ["object","animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, subjectculturechance) and generatedescriptors == True):
|
|
|
|
|
completeprompt += "-culture- "
|
|
|
|
|
|
|
|
|
|
if(mainchooser == "object"):
|
|
|
|
@@ -1344,6 +1354,21 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
completeprompt += ":" + random.choice(hybridhumanlist) + ":" + str(random.randint(1,5)) + "] "
|
|
|
|
|
hybridorswap = ""
|
|
|
|
|
|
|
|
|
|
if(subjectchooser == "firstname"):
|
|
|
|
|
if rare_dist(insanitylevel):
|
|
|
|
|
hybridorswaplist = ["hybrid", "swap"]
|
|
|
|
|
hybridorswap = random.choice(hybridorswaplist)
|
|
|
|
|
completeprompt += "["
|
|
|
|
|
|
|
|
|
|
completeprompt += "-firstname- "
|
|
|
|
|
|
|
|
|
|
if(hybridorswap == "hybrid"):
|
|
|
|
|
completeprompt += "|" + "-firstname-" + "] "
|
|
|
|
|
if(hybridorswap == "swap"):
|
|
|
|
|
completeprompt += ":" + "-firstname-" + ":" + str(random.randint(1,5)) + "] "
|
|
|
|
|
hybridorswap = ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
completeprompt += " " + givensubject + " "
|
|
|
|
|
|
|
|
|
@@ -1412,7 +1437,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# riding an animal, holding an object or driving a vehicle, rare
|
|
|
|
|
if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation"] and chance_roll(insanitylevel, humanadditionchance) and generatehumanaddition == True):
|
|
|
|
|
if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, humanadditionchance) and generatehumanaddition == True):
|
|
|
|
|
humanspecial = 1
|
|
|
|
|
completeprompt += "-humanaddition- "
|
|
|
|
|
|
|
|
|
@@ -1428,7 +1453,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
|
|
|
|
|
# SD understands emoji's. Can be used to manipulate facial expressions.
|
|
|
|
|
# emoji, legendary
|
|
|
|
|
if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation"] and chance_roll(insanitylevel, emojichance) and generateemoji== True):
|
|
|
|
|
if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, emojichance) and generateemoji== True):
|
|
|
|
|
completeprompt += "-emoji-, "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1439,7 +1464,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
# Job
|
|
|
|
|
# either go job or activity, not both
|
|
|
|
|
|
|
|
|
|
if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation"] and chance_roll(insanitylevel, joboractivitychance) and humanspecial != 1 and generatesubject == True):
|
|
|
|
|
if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, joboractivitychance) and humanspecial != 1 and generatesubject == True):
|
|
|
|
|
joboractivitylist = [joblist,humanactivitylist]
|
|
|
|
|
completeprompt += random.choice(random.choice(joboractivitylist)) + ", "
|
|
|
|
|
|
|
|
|
@@ -1458,16 +1483,16 @@ 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"] and chance_roll(insanitylevel, outfitchance) and generateoutfit == True and humanspecial != 1):
|
|
|
|
|
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 += ", wearing " + random.choice(buildoutfitlist) + ", "
|
|
|
|
|
|
|
|
|
|
if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation"] and chance_roll(insanitylevel, posechance) and humanspecial != 1 and generatepose == True):
|
|
|
|
|
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) + ", "
|
|
|
|
|
|
|
|
|
|
if(subjectchooser in ["human","job","fictional", "non fictional", "humanoid", "manwomanrelation"] and chance_roll(insanitylevel, hairchance) and generatehairstyle == True):
|
|
|
|
|
if(subjectchooser in ["human","job","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, hairchance) and generatehairstyle == True):
|
|
|
|
|
completeprompt += random.choice(buildhairlist) + ", "
|
|
|
|
|
|
|
|
|
|
if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation"] and chance_roll(insanitylevel, accessorychance) and generateaccessorie == True and generateaccessories == True):
|
|
|
|
|
if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, accessorychance) and generateaccessorie == True and generateaccessories == True):
|
|
|
|
|
completeprompt += random.choice(buildaccessorielist) + ", "
|
|
|
|
|
|
|
|
|
|
if(chance_roll(insanitylevel, humanoidinsideshotchance) and subjectchooser not in ["landscape", "concept"] and generateinsideshot == True):
|
|
|
|
@@ -1871,9 +1896,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
|
|
|
|
"-styletilora-" in completeprompt or
|
|
|
|
|
"-manwomanrelation-" in completeprompt or
|
|
|
|
|
"-waterlocation-" in completeprompt or
|
|
|
|
|
"-container-" in completeprompt):
|
|
|
|
|
allwildcardslistnohybrid = [ "-color-","-object-", "-animal-", "-fictional-","-nonfictional-","-building-","-vehicle-","-location-","-conceptprefix-","-food-","-haircolor-","-hairstyle-","-job-", "-accessory-", "-humanoid-", "-manwoman-", "-human-", "-colorscheme-", "-mood-", "-genderdescription-", "-artmovement-", "-malefemale-", "-bodytype-", "-minilocation-", "-minilocationaddition-", "-pose-", "-season-", "-minioutfit-", "-elaborateoutfit-", "-minivomit-", "-vomit-", "-rpgclass-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-addontolocationinside-", "-addontolocation-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-"]
|
|
|
|
|
allwildcardslistnohybridlists = [colorlist, objectlist, animallist, fictionallist, nonfictionallist, buildinglist, vehiclelist, locationlist,conceptprefixlist,foodlist,haircolorlist, hairstylelist,joblist, accessorielist, humanoidlist, manwomanlist, humanlist, colorschemelist, moodlist, genderdescriptionlist, artmovementlist, malefemalelist, bodytypelist, minilocationlist, minilocationadditionslist, poselist, seasonlist, minioutfitlist, elaborateoutfitlist, minivomitlist, vomitlist, rpgclasslist, customsubjectslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, addontolocationinsidelist, addontolocationlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist]
|
|
|
|
|
"-container-" in completeprompt or
|
|
|
|
|
"-firstname-" in completeprompt):
|
|
|
|
|
allwildcardslistnohybrid = [ "-color-","-object-", "-animal-", "-fictional-","-nonfictional-","-building-","-vehicle-","-location-","-conceptprefix-","-food-","-haircolor-","-hairstyle-","-job-", "-accessory-", "-humanoid-", "-manwoman-", "-human-", "-colorscheme-", "-mood-", "-genderdescription-", "-artmovement-", "-malefemale-", "-bodytype-", "-minilocation-", "-minilocationaddition-", "-pose-", "-season-", "-minioutfit-", "-elaborateoutfit-", "-minivomit-", "-vomit-", "-rpgclass-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-addontolocationinside-", "-addontolocation-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-"]
|
|
|
|
|
allwildcardslistnohybridlists = [colorlist, objectlist, animallist, fictionallist, nonfictionallist, buildinglist, vehiclelist, locationlist,conceptprefixlist,foodlist,haircolorlist, hairstylelist,joblist, accessorielist, humanoidlist, manwomanlist, humanlist, colorschemelist, moodlist, genderdescriptionlist, artmovementlist, malefemalelist, bodytypelist, minilocationlist, minilocationadditionslist, poselist, seasonlist, minioutfitlist, elaborateoutfitlist, minivomitlist, vomitlist, rpgclasslist, customsubjectslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, addontolocationinsidelist, addontolocationlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist]
|
|
|
|
|
|
|
|
|
|
allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-"]
|
|
|
|
|
allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist]
|
|
|
|
|