From d9dacd9f13fde610894bc4df86f4de802b4cda3e Mon Sep 17 00:00:00 2001 From: AIrjen Date: Fri, 2 Jun 2023 19:41:31 +0200 Subject: [PATCH] checkin for now --- build_dynamic_prompt.py | 37 +++++++++++++++++---- csvfiles/accessories.csv | 4 ++- csvfiles/elaborateoutfits.csv | 26 +++++++++++++++ csvfiles/imagetypequality.csv | 8 +++++ csvfiles/locations.csv | 3 +- csvfiles/minivomit.csv | 19 +++++++++++ csvfiles/outfits.csv | 3 +- csvfiles/poses.csv | 3 +- csvfiles/special_lists/humanadditions.csv | 9 +++-- csvfiles/special_lists/overalladditions.csv | 5 +-- csvfiles/vomit.csv | 6 +++- prompttester.py | 2 +- random_functions.py | 2 +- 13 files changed, 108 insertions(+), 19 deletions(-) create mode 100644 csvfiles/elaborateoutfits.csv create mode 100644 csvfiles/imagetypequality.csv create mode 100644 csvfiles/minivomit.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 66efa26..92b304d 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -71,6 +71,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all minilocationlist = csv_to_list("minilocations", antilist) minioutfitlist = csv_to_list("minioutfits", antilist) seasonlist = csv_to_list("seasons", antilist) + elaborateoutfitlist = csv_to_list("elaborateoutfits", antilist) + minivomitlist = csv_to_list("minivomit", antilist) + imagetypequalitylist = csv_to_list("imagetypequality", antilist) humanlist = fictionallist + nonfictionallist + humanoidlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist @@ -257,8 +260,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all generateanimaladdition = bool(animaladditionlist) and not templatemode generateaccessories = bool(buildaccessorielist) and not templatemode generategreatwork = bool(greatworklist) and not templatemode - + generateminilocationaddition = bool(minilocationadditionslist) and not templatemode + generateminivomit = bool(minivomitlist) and not templatemode + generateimagetypequality = bool(imagetypequalitylist) and not templatemode # Smart subject logic @@ -607,6 +612,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(giventypeofimage=="" and generatetype == True): if(imagetype != "all" and imagetype != "all - force multiple" and imagetype != "only other types"): + completeprompt += " " + imagetype + ", " elif(imagetype == "all - force multiple" or unique_dist(insanitylevel)): amountofimagetypes = random.randint(2,3) @@ -617,13 +623,17 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(imagetype == "all" and normal_dist(insanitylevel) and amountofimagetypes <= 1): amountofimagetypes = 1 + + for i in range(amountofimagetypes): # one in 6 images is a complex/other type + if(rare_dist(insanitylevel) and generateimagetypequality): + completeprompt += random.choice(imagetypequalitylist) + " " if(random.randint(0,5) < 5): - completeprompt += ", " + random.choice(imagetypelist) + " " + completeprompt += " " + random.choice(imagetypelist) + ", " else: othertype = 1 - completeprompt += ", " + random.choice(othertypelist) + " " + completeprompt += " " + random.choice(othertypelist) + ", " if(othertype==1): completeprompt += " of a " @@ -643,6 +653,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all generateartmovement = False completeprompt += " -artmovement-, " + if(rare_dist(insanitylevel) and generateminivomit == True): + completeprompt += " -minivomit-, " + + if(unique_dist(insanitylevel) and generateminivomit == True): + completeprompt += " -minivomit-, " + # start shot size if(mainchooser in ["object", "animal", "humanoid", "concept"] and othertype == 0 and "portrait" not in completeprompt and generateshot == True and uncommon_dist(insanitylevel)): @@ -882,9 +898,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(uncommon_dist(insanitylevel)): completeprompt += random.choice(custominputmidlist) + ", " + # add in some more mini vomits + if(unique_dist(insanitylevel) and generateminivomit == True): + completeprompt += " -minivomit-, " # outfit builder - if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid"] and normal_dist(insanitylevel) and generateoutfit == True): + if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid"] and normal_dist(insanitylevel) and generateoutfit == True and humanspecial != 1): completeprompt += ", wearing " + random.choice(buildoutfitlist) + ", " if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid"] and uncommon_dist(insanitylevel) and humanspecial != 1 and generatepose == True): @@ -929,6 +948,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(normal_dist(insanitylevel) and generatemood == True): completeprompt += random.choice(moodlist) + ", " + # add in some more mini vomits + if(unique_dist(insanitylevel) and generateminivomit == True): + completeprompt += " -minivomit-, " + if(normal_dist(insanitylevel) and generateartmovement == True): completeprompt += random.choice(artmovementlist) + ", " @@ -1092,9 +1115,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # completeprompt = completeprompt.replace('-outfit-', hybridorswapreplacementvalue,1) # lol, this needs a rewrite :D - while "-color-" in completeprompt or "-material-" in completeprompt or "-animal-" in completeprompt or "-object-" in completeprompt or "-fictional-" in completeprompt or "-nonfictional-" in completeprompt or "-conceptsuffix-" in completeprompt or "-building-" in completeprompt or "-vehicle-" in completeprompt or "-outfit-" in completeprompt or "-location-" in completeprompt or "-conceptprefix-" in completeprompt or "-descriptor-" in completeprompt or "-food-" in completeprompt or "-haircolor-" in completeprompt or "-hairstyle-" in completeprompt or "-job-" in completeprompt or "-culture-" in completeprompt or "-accessory-" in completeprompt or "-humanoid-" in completeprompt or "manwoman" in completeprompt or "-human-" in completeprompt or "-colorscheme-" in completeprompt or "-mood-" in completeprompt or "-genderdescription-" in completeprompt or "-artmovement-" in completeprompt or "-malefemale-" in completeprompt or "-objecttotal-" in completeprompt or "-bodytype-" in completeprompt or "-minilocation-" in completeprompt or "-minilocationaddition-" in completeprompt or "-pose-" in completeprompt or "-season-" in completeprompt or "-minioutfit-" 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-" ] - 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] + while "-color-" in completeprompt or "-material-" in completeprompt or "-animal-" in completeprompt or "-object-" in completeprompt or "-fictional-" in completeprompt or "-nonfictional-" in completeprompt or "-conceptsuffix-" in completeprompt or "-building-" in completeprompt or "-vehicle-" in completeprompt or "-outfit-" in completeprompt or "-location-" in completeprompt or "-conceptprefix-" in completeprompt or "-descriptor-" in completeprompt or "-food-" in completeprompt or "-haircolor-" in completeprompt or "-hairstyle-" in completeprompt or "-job-" in completeprompt or "-culture-" in completeprompt or "-accessory-" in completeprompt or "-humanoid-" in completeprompt or "manwoman" in completeprompt or "-human-" in completeprompt or "-colorscheme-" in completeprompt or "-mood-" in completeprompt or "-genderdescription-" in completeprompt or "-artmovement-" in completeprompt or "-malefemale-" in completeprompt or "-objecttotal-" in completeprompt or "-bodytype-" in completeprompt or "-minilocation-" in completeprompt or "-minilocationaddition-" in completeprompt or "-pose-" in completeprompt or "-season-" in completeprompt or "-minioutfit-" in completeprompt or "-elaborateoutfit-" in completeprompt or "-minivomit-" in completeprompt or "-vomit-" 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-" ] + 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] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-"] allwildcardslistwithhybridlists =[materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist] diff --git a/csvfiles/accessories.csv b/csvfiles/accessories.csv index 9a080d6..02a7564 100644 --- a/csvfiles/accessories.csv +++ b/csvfiles/accessories.csv @@ -118,4 +118,6 @@ empty eyes dashed eyes heart-shaped eyes amphibian eyes -tartan scarf \ No newline at end of file +tartan scarf +Braces +Wizard hat \ No newline at end of file diff --git a/csvfiles/elaborateoutfits.csv b/csvfiles/elaborateoutfits.csv new file mode 100644 index 0000000..bf97a18 --- /dev/null +++ b/csvfiles/elaborateoutfits.csv @@ -0,0 +1,26 @@ +wizard -minioutfit- and wizard hat, background is wizard tower, -minilocationaddition- +witch hat, cauldron, -mood- -minilocationaddition- +party hat, balloons, confetti, party +yoga -minioutfit-, doing yoga pose, stretching, yoga mat, yoga school +shell bikini and mermaid tail, under water, underground -minilocation- +superhero -minioutfit-, flying through the city, superhero pose +kung fu -minioutfit-, fighting pose, shaolin background, asian temple +atompunk torn -minioutfit-, post apocalyptic -descriptor- city, explosions in background, yellow hue +royal -descriptor- regalia, -descriptor- crown, sitting on a -descriptor- throne, majestic, -minivomit-, -minivomit-, castle +Cyberpunk metal -minioutfit- with -color- neon lines, cyberpunk city street, nighttime, neon -color- lights, nebula, metals +Emopunk goth -minioutfit-, sad, angry, alone, inside +super mario outfit, jumping, mushroom kingdom, huge mushrooms, video game, game art, nintencore +holy raiments, religious icons, cathedral, stained glass windows, colorful light through stained glass windows +exotic -minioutfit-, -descriptor-, tropical island, ocean, beach, sunny, daylight +orientalism -minioutfit-, oriental location, daylight, sun in the sky, outside, -mood- +-culture- warrior -minioutfit-, fighting stance, -minilocationaddition-, epic, fantasy +burlesque -minioutfit-, dancing, performing on stage, dynamic composition +white holy -minioutfit- made of silks and cloth, halo, sitting on a cloud, happy, tranquil +dark red evil -minioutfit- made of spikes and scales, in dungeon, bones and skulls, deathpunk, sinister +pirate -minioutfit-, on a ship, ocean, pirate island in background, tropical, palmtrees, waves +rogue -minioutfit-, -descriptor-, fantasy, epic, back alley in medieval town, sinister, smirk, evil +thief -material- -minioutfit-, -descriptor-, fantasy, epic, stealing gold from treasure chest, sinister, laughing, -mood-, gold, gems +knight metal -minioutfit- with -material- details, fantasy, castle, -minilocationaddition-, shield +necromancer -minioutfit- adorned with skulls, deathpunk vibes, evil green magic, casting magic pose +barbarian -minioutfit-, cloth and leather, muscles, strong, screaming to attack, fighting pose +barbie doll -minioutfit-, pink and pastel colors, barbies dream house, smiling, happy, frolicking diff --git a/csvfiles/imagetypequality.csv b/csvfiles/imagetypequality.csv new file mode 100644 index 0000000..901c148 --- /dev/null +++ b/csvfiles/imagetypequality.csv @@ -0,0 +1,8 @@ +professional +epic +masterpiece +fantasy +grand +masterwork +detailed +mundane \ No newline at end of file diff --git a/csvfiles/locations.csv b/csvfiles/locations.csv index 1fdb7d7..99889a3 100644 --- a/csvfiles/locations.csv +++ b/csvfiles/locations.csv @@ -678,4 +678,5 @@ Labyrinth color field alternate dimensions jupiter clouds -crack in the earth \ No newline at end of file +crack in the earth +Mushroom Kingdom \ No newline at end of file diff --git a/csvfiles/minivomit.csv b/csvfiles/minivomit.csv new file mode 100644 index 0000000..904eaeb --- /dev/null +++ b/csvfiles/minivomit.csv @@ -0,0 +1,19 @@ +behance +majestic +elegant +-descriptor- +masterpiece +-vomit- +-mood- +highly detailed +surreal +insane details +intricate details +hyperdetailed +intricate background +fairy tale +concept art +(-color- theme:0.7) +Golden ratio +Rule of Thirds +awardwinning \ No newline at end of file diff --git a/csvfiles/outfits.csv b/csvfiles/outfits.csv index 3dcba64..f834668 100644 --- a/csvfiles/outfits.csv +++ b/csvfiles/outfits.csv @@ -491,4 +491,5 @@ Armor Short skirt and a long jacket -material- outfit Band shirt -Holy raiment \ No newline at end of file +Holy raiment +Witch hat \ No newline at end of file diff --git a/csvfiles/poses.csv b/csvfiles/poses.csv index 8d56483..d78271e 100644 --- a/csvfiles/poses.csv +++ b/csvfiles/poses.csv @@ -70,4 +70,5 @@ Meditation pose perched on a cloud captivating pose confident stance -royal pose \ No newline at end of file +royal pose +frolicking in a -minilocation- \ No newline at end of file diff --git a/csvfiles/special_lists/humanadditions.csv b/csvfiles/special_lists/humanadditions.csv index f2082b8..152bae6 100644 --- a/csvfiles/special_lists/humanadditions.csv +++ b/csvfiles/special_lists/humanadditions.csv @@ -6,10 +6,13 @@ visiting -location- with a -animal- surrounded by -object-s eating -food- -and -fictional- -and -nonfictional- +and -human- +holding hands with -human- cosplaying as -fictional- with -color- skin with -material- skin feeling -mood- -bathing in a river \ No newline at end of file +bathing in a river +-pose- under a waterfall +torn -minioutfit- +wearing -elaborateoutfit- \ No newline at end of file diff --git a/csvfiles/special_lists/overalladditions.csv b/csvfiles/special_lists/overalladditions.csv index dfecc1e..afc5f2d 100644 --- a/csvfiles/special_lists/overalladditions.csv +++ b/csvfiles/special_lists/overalladditions.csv @@ -7,5 +7,6 @@ de dia los muertos mechanical lord of the rings scenery landscape between the stars -dreamy -concept art \ No newline at end of file +surrounded by fire +-season- +-color- smoke \ No newline at end of file diff --git a/csvfiles/vomit.csv b/csvfiles/vomit.csv index df951d7..e51fe24 100644 --- a/csvfiles/vomit.csv +++ b/csvfiles/vomit.csv @@ -82,4 +82,8 @@ Movie concept art taiji dreamy concept art -silhouette \ No newline at end of file +silhouette +fairy tale +(-color- and -color-:0.7) +quantum wavetracing +de dia los muertos \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 3b0a7fa..d33f9d6 100644 --- a/prompttester.py +++ b/prompttester.py @@ -35,4 +35,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,7,"all","all","only templates",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","") \ No newline at end of file +generateprompts(10,5,"humanoid","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","") \ No newline at end of file diff --git a/random_functions.py b/random_functions.py index f8adf7b..6440cd5 100644 --- a/random_functions.py +++ b/random_functions.py @@ -9,7 +9,7 @@ def uncommon_dist(insanitylevel): return (random.randint(1, 18)= 10) def rare_dist(insanitylevel): - roll = (random.randint(1, 30)= 10) + roll = (random.randint(1, 30)= 11) if(roll): print("adding something rare to the prompt") return roll