diff --git a/README.md b/README.md
index 6ad2abd..f26df66 100644
--- a/README.md
+++ b/README.md
@@ -24,11 +24,12 @@ A simple user guide for first time use and settings is available [here](https://
- __Compound__ multiple prompts together for unexpected results. ==> [guide to prompt compounder](https://github.com/AIrjen/OneButtonPrompt/blob/main/user_guides/prompt_compounder_and_regional_prompter_to_create_insane_images.md)
- Use __wildcards__, or __combine with Dynamic Prompts__ extension ==> [guide to using wildcards and Dynamic Prompts](https://github.com/AIrjen/OneButtonPrompt/blob/main/user_guides/wildcards_and_dynamic_prompts_extension.md)
- Has a set of __template prompts__ from various sources, __fully wildcarded__ and usable with Subject Override ==> [guide to prompt templates](https://github.com/AIrjen/OneButtonPrompt/blob/main/user_guides/templates.md)
+- Has multiple __prompt generation modes__ to choose from ==> [guide to prompt generation modes](https://github.com/AIrjen/OneButtonPrompt/blob/main/user_guides/prompt_generation_modes.md)
## How to use in automatic1111
In TXT2IMG or IMG2IMG, select the script "One Button Prompt".
-
+
Leave the prompts empty:
@@ -46,6 +47,8 @@ Enjoy creating awesome pictures:
Please be aware, that not each picture will be awesome due to the randomness of the prompt, artist and model used.
You might get an epic landscape, or a photo of an Aggregavated Trout. In my experience, about 1 in 5 is good. Everyone of them is interesting.
+Don't get overwhelmed by the options, they will become more clear once you use it more.
+
Some more examples below. And check the first time user guide [here](https://github.com/AIrjen/OneButtonPrompt/blob/main/user_guides/my_first_generation.md).
### Some details
@@ -53,7 +56,7 @@ It will generate between 0 and 3 artists, and add those the prompt.
It can generate the following subjects, while building a prompt:
-1. object - Can be a random object, a building or a vehicle.
+1. object - Can be a random object, a building ,a vehicle, some food or objects from space.
2. animal - A random (fictional) animal. Has a chance to have human characteristics, such as clothing added.
@@ -99,6 +102,8 @@ You can turn it off. Add your own artists to the prompt, and they will be added
Type of image can be used to force a certian direction. For example when using Realistic Vision, it might be a good idea to set it to photograph. For an anime model, you might want to use "Anime key visual"
+Special image type modes have chance to trigger. Those follow different rules of prompt generation.
+
When you fill in the Overwrite subject field, that subject will be used to build the dynamic prompt around. It is best, if you set the subject type to match the subject. For example, set it to humanoid if you place a person in the override subject field.
This way, you can create unlimited variants of a subject.
@@ -112,7 +117,7 @@ Add a prompt prefix, suffix and the negative prompt in the respective fields. Th
These can be used to add textual inversion and LoRA's. They can also be used to add your models trigger words.
-
+
diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py
index d8c2bd4..701347a 100644
--- a/build_dynamic_prompt.py
+++ b/build_dynamic_prompt.py
@@ -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=""):
+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):
# first build up a complete anti list. Those values are removing during list building
@@ -82,13 +82,14 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist
# build artists list
+ artistlist = []
# create artist list to use in the code, maybe based on category or personal lists
if(artists != "all" and artists != "none" and artists.startswith("personal_artists") == False and artists.startswith("personal artists") == False):
artistlist = artist_category_csv_to_list("artists_and_category",artists)
elif(artists.startswith("personal_artists") == True or artists.startswith("personal artists") == True):
artists = artists.replace(" ","_",-1) # add underscores back in
artistlist = csv_to_list(artists,antilist,"./userfiles/")
- else:
+ elif(artists != "none"):
artistlist = csv_to_list("artists",antilist)
@@ -119,8 +120,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
buildaccessorielist = csv_to_list("buildaccessorie", antilist,"./csvfiles/special_lists/")
minilocationadditionslist = csv_to_list("minilocationadditions", antilist,"./csvfiles/special_lists/")
overalladditionlist = csv_to_list("overalladditions", antilist,"./csvfiles/special_lists/")
-
-
+ imagetypemodelist = csv_to_list("imagetypemodes", antilist,"./csvfiles/special_lists/")
# subjects
@@ -228,55 +228,106 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
if(generateconcept):
mainchooserlist.append("concept")
- # determine wether we should go for a template or not. Not hooked up to insanitylevel
+ # determine wether we have a special mode or not
+ if(random.randint(1,int(imagemodechance)) == 1 and imagetype == "all" and giventypeofimage == ""):
+ imagetype = random.choice(imagetypemodelist) # override imagetype with a random "mode" value
+
+
+ specialmode = False
templatemode = False
- if(random.randint(1, 75) == 1 or imagetype == "only templates"):
+ artblastermode = False
+ qualityvomitmode = False
+ uniqueartmode = False
+ colorcannonmode = False
+ photofantasymode = False
+ massivemadnessmode = False
+ onlysubjectmode = False
+ # determine wether we should go for a template or not. Not hooked up to insanitylevel
+ if(imagetype == "only templates mode"):
+ specialmode = True
templatemode = True
print("Running with a randomized template instead of a randomized prompt")
+ if(imagetype == "art blaster mode"):
+ specialmode = True
+ artblastermode = True
+ print("Running in art blaster mode")
+
+ if(imagetype == "unique art mode"):
+ specialmode = True
+ uniqueartmode = True
+ print("Running in unique art mode")
+
+ if(imagetype == "quality vomit mode"):
+ specialmode = True
+ qualityvomitmode = True
+ print("Running in quality vomit mode")
+
+ if(imagetype == "color cannon mode"):
+ specialmode = True
+ colorcannonmode = True
+ print("Running in color cannon mode")
+
+ if(imagetype == "photo fantasy mode"):
+ specialmode = True
+ photofantasymode = True
+ print("Running in photo fantasy mode")
+
+ if(imagetype == "massive madness mode"):
+ specialmode = True
+ massivemadnessmode = True
+ print("Running in massive madness mode")
+ print("Are you ready for this?")
+
+ if(imagetype == "subject only mode"):
+ specialmode = True
+ onlysubjectmode = True
+ print("Running in only subject mode")
+
# main stuff
- generatetype = not templatemode
+ generatetype = not specialmode
generatesubject = not templatemode
# normals
- generateartist = bool(artistlist) and not templatemode
+ generateartist = bool(artistlist) and not specialmode
generateoutfit = bool(outfitlist) and not templatemode
generatebodytype = bool(bodytypelist) and not templatemode
- generateaccessorie = bool(accessorielist) and not templatemode
- generateartmovement = bool(artmovementlist) and not templatemode
- generatecamera = bool(cameralist) and not templatemode
- generatecolorscheme = bool(colorschemelist) and not templatemode
+ generateaccessorie = bool(accessorielist) and not specialmode
+ generateartmovement = bool(artmovementlist) and not specialmode
+ generatecamera = bool(cameralist) and not specialmode
+ generatecolorscheme = bool(colorschemelist) and not specialmode
generatedescriptors = bool(descriptorlist) and not templatemode
- generatedirection = bool(directionlist) and not templatemode
- generatefocus = bool(focuslist) and not templatemode
+ generatedirection = bool(directionlist) and not specialmode
+ generatefocus = bool(focuslist) and not specialmode
generatehairstyle = bool(hairstylelist) and not templatemode
- generatelens = bool(lenslist) and not templatemode
- generatelighting = bool(lightinglist) and not templatemode
- generatemood = bool(moodlist) and not templatemode
+ generatelens = bool(lenslist) and not specialmode
+ generatelighting = bool(lightinglist) and not specialmode
+ generatemood = bool(moodlist) and not specialmode
generatepose = bool(poselist) and not templatemode
- generatevomit = bool(vomitlist) and not templatemode
- generatequality = bool(qualitylist) and not templatemode
- generateshot = bool(shotsizelist) and not templatemode
- generatetimeperiod = bool(timeperiodlist) and not templatemode
+ generatevomit = bool(vomitlist) and not specialmode
+ generatequality = bool(qualitylist) and not specialmode
+ generateshot = bool(shotsizelist) and not specialmode
+ generatetimeperiod = bool(timeperiodlist) and not specialmode
generateemoji = bool(emojilist) and not templatemode
# specials:
- generatebackground = bool(backgroundtypelist) and not templatemode
- generateinsideshot = bool(insideshotlist) and not templatemode
- generatephotoaddition = bool(photoadditionlist) and not templatemode
+ generatebackground = bool(backgroundtypelist) and not specialmode
+ generateinsideshot = bool(insideshotlist) and not specialmode
+ generatephotoaddition = bool(photoadditionlist) and not specialmode
generatehairstyle = bool(buildhairlist) and not templatemode
generateoutfit = bool(buildoutfitlist) and not templatemode
generateobjectaddition = bool(objectadditionslist) and not templatemode
generatehumanaddition = bool(humanadditionlist) and not templatemode
generateanimaladdition = bool(animaladditionlist) and not templatemode
generateaccessories = bool(buildaccessorielist) and not templatemode
- generategreatwork = bool(greatworklist) and not templatemode
+ generategreatwork = bool(greatworklist) and not specialmode
- generateminilocationaddition = bool(minilocationadditionslist) and not templatemode
- generateminivomit = bool(minivomitlist) and not templatemode
- generateimagetypequality = bool(imagetypequalitylist) and not templatemode
- generateoveralladdition = bool(overalladditionlist) and not templatemode
+ generateminilocationaddition = bool(minilocationadditionslist) and not specialmode
+ generateminivomit = bool(minivomitlist) and not specialmode
+ generateimagetypequality = bool(imagetypequalitylist) and not specialmode
+ generateoveralladdition = bool(overalladditionlist) and not specialmode
+ generateimagetype = bool(imagetypelist) and not specialmode
# Smart subject logic
@@ -526,9 +577,140 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
subjectchooser = random.choice(eventsubjectchooserlist)
- #hybridlist = ["-animal-", "-object-", "-fictional-", "-nonfictional-", "-building-", "-vehicle-","-food-"]
- #hybridhumanlist = ["-fictional-", "-nonfictional-"]
+ # special modes
+
+ # start art blaster here
+ if(artblastermode==True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(artistlist)):
+ completeprompt += "-artist-, "
+ if(uncommon_dist(insanitylevel) and bool(artmovementlist)):
+ completeprompt += "-artmovement-, "
+ if(unique_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(unique_dist(insanitylevel) and bool(imagetypelist)):
+ completeprompt += "-imagetype-, "
+ if(unique_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ step = step + 1
+
+ # start unique art here
+ if(uniqueartmode==True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(othertypelist)):
+ completeprompt += "-othertype-, "
+ if(uncommon_dist(insanitylevel) and bool(artmovementlist)):
+ completeprompt += "-artmovement-, "
+ if(uncommon_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ if(rare_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(rare_dist(insanitylevel) and bool(lightinglist)):
+ completeprompt += "-lighting-, "
+ if(unique_dist(insanitylevel) and bool(imagetypelist)):
+ completeprompt += "-imagetype-, "
+ if(unique_dist(insanitylevel) and bool(qualitylist)):
+ completeprompt += "-quality-, "
+
+ step = step + 1
+
+ # start quality vomit here
+ if(qualityvomitmode==True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(uncommon_dist(insanitylevel) and bool(qualitylist)):
+ completeprompt += "-quality-, "
+ if(unique_dist(insanitylevel) and bool(minivomitlist)):
+ completeprompt += "-minivomit-, "
+ if(unique_dist(insanitylevel) and bool(artmovementlist)):
+ completeprompt += "-artmovement-, "
+ if(unique_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ step = step + 1
+
+ # start mood color here
+ if(colorcannonmode == True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(moodlist)):
+ completeprompt += "-mood-, "
+ if(uncommon_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ if(rare_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(unique_dist(insanitylevel) and bool(artmovementlist)):
+ completeprompt += "-artmovement-, "
+ if(unique_dist(insanitylevel) and bool(lightinglist)):
+ completeprompt += "-lighting-, "
+ step = step + 1
+
+ # start photo fantasy here
+ if(photofantasymode == True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ if(common_dist(insanitylevel)):
+ if(uncommon_dist(insanitylevel)):
+ completeprompt += "-imagetypequality- "
+ completeprompt += " photograph, "
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(lightinglist)):
+ completeprompt += "-lighting-, "
+ if(uncommon_dist(insanitylevel) and bool(cameralist)):
+ completeprompt += "-camera-, "
+ if(rare_dist(insanitylevel) and bool(lenslist)):
+ completeprompt += "-lens-, "
+ if(unique_dist(insanitylevel) and bool(moodlist)):
+ completeprompt += "-mood-, "
+ if(unique_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ step = step + 1
+
+ # start massive madness here
+ if(massivemadnessmode == True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(rare_dist(insanitylevel) and bool(artistlist)):
+ completeprompt += "-artist-, "
+ if(rare_dist(insanitylevel) and bool(descriptorlist)):
+ completeprompt += "-descriptor-, "
+ if(rare_dist(insanitylevel) and bool(moodlist)):
+ completeprompt += "-mood-, "
+ if(rare_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ if(rare_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(rare_dist(insanitylevel) and bool(artmovementlist)):
+ completeprompt += "-artmovement-, "
+ if(rare_dist(insanitylevel) and bool(lightinglist)):
+ completeprompt += "-lighting-, "
+ if(rare_dist(insanitylevel) and bool(minilocationadditionslist)):
+ completeprompt += "-minilocationaddition-, "
+ if(rare_dist(insanitylevel) and bool(materiallist)):
+ completeprompt += "-material-, "
+ if(rare_dist(insanitylevel) and bool(conceptsuffixlist)):
+ completeprompt += "-conceptsuffix-, "
+ if(rare_dist(insanitylevel) and bool(qualitylist)):
+ completeprompt += "-quality-, "
+ if(rare_dist(insanitylevel) and bool(cameralist)):
+ completeprompt += "-camera-, "
+ if(rare_dist(insanitylevel) and bool(lenslist)):
+ completeprompt += "-lens-, "
+ if(rare_dist(insanitylevel) and bool(imagetypelist)):
+ completeprompt += "-imagetype-, "
+ step = step + 1
+ completeprompt += " ("
+
+
# start artist part
@@ -578,7 +760,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
completeprompt += " ("
#completeprompt = add_from_csv(completeprompt, "artists", 0, "art by ","")
- completeprompt += "art by " + random.choice(artistlist)
+ completeprompt += "-artist-"
if isweighted == 1:
completeprompt += ":" + str(1 + (random.randint(-3,3)/10)) + ")"
@@ -641,12 +823,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
for i in range(amountofimagetypes):
# one in 6 images is a complex/other type
if(rare_dist(insanitylevel) and generateimagetypequality):
- completeprompt += random.choice(imagetypequalitylist) + " "
+ completeprompt += "-imagetypequality- "
if(random.randint(0,5) < 5):
- completeprompt += " " + random.choice(imagetypelist) + ", "
+ completeprompt += " -imagetype-, "
else:
othertype = 1
- completeprompt += " " + random.choice(othertypelist) + ", "
+ completeprompt += " -othertype-, "
if(othertype==1):
completeprompt += " of a "
@@ -983,7 +1165,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
completeprompt += random.choice(artmovementlist) + ", "
if(normal_dist(insanitylevel) and generatelighting == True):
- completeprompt += random.choice(lightinglist) + ", "
+ completeprompt += "-lighting-, "
# determine wether we have a photo or not
if("photo" in completeprompt.lower()):
@@ -997,7 +1179,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
if(normal_dist(insanitylevel) or isphoto == 1):
if(generatelens == True):
- completeprompt += random.choice(lenslist) + ", "
+ completeprompt += "-lens-, "
if(normal_dist(insanitylevel) and generatecolorscheme == True):
completeprompt += random.choice(colorschemelist) + ", "
@@ -1014,10 +1196,134 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
# everyone loves the adding quality. The better models don't need this, but lets add it anyway
if(uncommon_dist(insanitylevel) and generatequality == True):
- completeprompt += random.choice(qualitylist) + ", "
+ completeprompt += "-quality-, "
if(uncommon_dist(insanitylevel)):
- completeprompt += random.choice(qualitylist) + ", "
+ completeprompt += "-quality-, "
+
+
+ # start second part of art blaster here
+ if(artblastermode==True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(artistlist)):
+ completeprompt += "-artist-, "
+ if(uncommon_dist(insanitylevel) and bool(artmovementlist)):
+ completeprompt += "-artmovement-, "
+ if(unique_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(unique_dist(insanitylevel) and bool(imagetypelist)):
+ completeprompt += "-imagetype-, "
+ if(unique_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ step = step + 1
+
+ # start second part of unique art here
+ if(uniqueartmode==True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(artmovementlist)):
+ completeprompt += "-artmovement-, "
+ if(uncommon_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ if(rare_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(rare_dist(insanitylevel) and bool(lightinglist)):
+ completeprompt += "-lighting-, "
+ if(unique_dist(insanitylevel) and bool(qualitylist)):
+ completeprompt += "-quality-, "
+ if(unique_dist(insanitylevel) and bool(artistlist)):
+ completeprompt += "-artist-, "
+
+ step = step + 1
+
+
+ # start second part of quality vomit here
+ if(qualityvomitmode==True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(uncommon_dist(insanitylevel) and bool(qualitylist)):
+ completeprompt += "-quality-, "
+ if(unique_dist(insanitylevel) and bool(minivomitlist)):
+ completeprompt += "-minivomit-, "
+ if(unique_dist(insanitylevel) and bool(artmovementlist)) :
+ completeprompt += "-artmovement-, "
+ if(unique_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ step = step + 1
+
+ # start second part of mood color here
+ if(colorcannonmode == True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(moodlist)):
+ completeprompt += "-mood-, "
+ if(uncommon_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ if(rare_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(unique_dist(insanitylevel) and bool(artmovementlist)):
+ completeprompt += "-artmovement-, "
+ if(unique_dist(insanitylevel) and bool(lightinglist)):
+ completeprompt += "-lighting-, "
+ step = step + 1
+
+
+ # start second part of photo fantasy here
+ if(photofantasymode == True):
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(uncommon_dist(insanitylevel) and bool(lightinglist)):
+ completeprompt += "-lighting-, "
+ if(uncommon_dist(insanitylevel) and bool(cameralist)):
+ completeprompt += "-camera-, "
+ if(rare_dist(insanitylevel) and bool(lenslist)):
+ completeprompt += "-lens-, "
+ if(unique_dist(insanitylevel) and bool(moodlist)):
+ completeprompt += "-mood-, "
+ if(unique_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ step = step + 1
+
+ # start second part of massive madness here
+ if(massivemadnessmode == True):
+ completeprompt += ":1.3), "
+ step = 0
+ end = random.randint(1, insanitylevel) + 1
+ while step < end:
+ if(rare_dist(insanitylevel) and bool(artistlist)):
+ completeprompt += "-artist-, "
+ if(rare_dist(insanitylevel) and bool(descriptorlist)):
+ completeprompt += "-descriptor-, "
+ if(rare_dist(insanitylevel) and bool(moodlist)):
+ completeprompt += "-mood-, "
+ if(rare_dist(insanitylevel) and bool(colorschemelist)):
+ completeprompt += "-colorscheme-, "
+ if(rare_dist(insanitylevel) and bool(vomitlist)):
+ completeprompt += "-vomit-, "
+ if(rare_dist(insanitylevel) and bool(artmovementlist)):
+ completeprompt += "-artmovement-, "
+ if(rare_dist(insanitylevel) and bool(lightinglist)):
+ completeprompt += "-lighting-, "
+ if(rare_dist(insanitylevel) and bool(minilocationadditionslist)):
+ completeprompt += "-minilocationaddition-, "
+ if(rare_dist(insanitylevel) and bool(materiallist)):
+ completeprompt += "-material-, "
+ if(rare_dist(insanitylevel) and bool(conceptsuffixlist)):
+ completeprompt += "-conceptsuffix-, "
+ if(rare_dist(insanitylevel) and bool(qualitylist)):
+ completeprompt += "-quality-, "
+ if(rare_dist(insanitylevel) and bool(cameralist)):
+ completeprompt += "-camera-, "
+ step = step + 1
+
# custom style list
if(uncommon_dist(insanitylevel) and generatestyle == True):
completeprompt += random.choice(stylestiloralist) + ", "
@@ -1073,7 +1379,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
completeprompt += " ("
#completeprompt = add_from_csv(completeprompt, "artists", 0, "art by ","")
- completeprompt += "art by " + random.choice(artistlist)
+ completeprompt += "-artist-"
if isweighted == 1:
completeprompt += ":" + str(1 + (random.randint(-3,3)/10)) + ")"
@@ -1127,12 +1433,14 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
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("-artist-", "art by -artist-")
# 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 or "-elaborateoutfit-" in completeprompt or "-minivomit-" in completeprompt or "-vomit-" in completeprompt or "-rpgclass-" in completeprompt or "-subjectfromfile-" in completeprompt or "-brand-" in completeprompt or "-space-" 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-"]
- 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]
+ 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 or "-rpgclass-" in completeprompt or "-subjectfromfile-" in completeprompt or "-brand-" in completeprompt or "-space-" in completeprompt or "-artist-" in completeprompt or "-imagetype-" in completeprompt or "-othertype-" in completeprompt or "-quality-" in completeprompt or "-lighting-" in completeprompt or "-camera-" in completeprompt or "-lens-" in completeprompt or "-imagetypequality-" 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-"]
+ 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]
+
allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-"]
allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist]
@@ -1146,6 +1454,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
attachedlist = allwildcardslistwithhybridlists[allwildcardslistwithhybrid.index(wildcard)]
completeprompt = replacewildcard(completeprompt, insanitylevel, wildcard, attachedlist,True)
+
# clean it up
@@ -1212,6 +1521,7 @@ def cleanup(completeprompt):
completeprompt = re.sub(' :', ':', completeprompt)
completeprompt = re.sub(',::', '::', completeprompt)
+ completeprompt = re.sub(',:', ':', completeprompt)
completeprompt = re.sub(',,', ', ', completeprompt)
completeprompt = re.sub(',,,', ', ', completeprompt)
diff --git a/csvfiles/special_lists/imagetypemodes.csv b/csvfiles/special_lists/imagetypemodes.csv
new file mode 100644
index 0000000..e657d92
--- /dev/null
+++ b/csvfiles/special_lists/imagetypemodes.csv
@@ -0,0 +1,8 @@
+only templates mode
+art blaster mode
+quality vomit mode
+color cannon mode
+unique art mode
+massive madness mode
+photo fantasy mode
+subject only mode
\ No newline at end of file
diff --git a/main.py b/main.py
index ef016f4..a77db0a 100644
--- a/main.py
+++ b/main.py
@@ -12,7 +12,7 @@ from call_extras import *
from model_lists import *
-def generateimages(amount = 1, size = "all",model = "currently selected model",samplingsteps = "40",cfg= "7",hiresfix = True,hiressteps ="0",denoisestrength="0.6",samplingmethod="DPM++ SDE Karras", upscaler="R-ESRGAN 4x+", hiresscale="2",apiurl="http://127.0.0.1:7860",qualitygate=False,quality="7.6",runs="5",insanitylevel="5",subject="all", artist="all", imagetype="all",silentmode=False, workprompt="", antistring="",prefixprompt="", suffixprompt="", negativeprompt="",promptcompounderlevel = "1", seperator="comma", img2imgbatch = "1", img2imgsamplingsteps = "20", img2imgcfg = "7", img2imgsamplingmethod = "DPM++ SDE Karras", img2imgupscaler = "R-ESRGAN 4x+", img2imgmodel = "currently selected model", img2imgactivate = False, img2imgscale = "2", img2imgpadding = "64",img2imgdenoisestrength="0.3",ultimatesdupscale=False,usdutilewidth = "512", usdutileheight = "0", usdumaskblur = "8", usduredraw ="Linear", usduSeamsfix = "None", usdusdenoise = "0.35", usduswidth = "64", usduspadding ="32", usdusmaskblur = "8",controlnetenabled=False, controlnetmodel="",img2imgdenoisestrengthmod="-0.05",enableextraupscale = False,controlnetblockymode = False,extrasupscaler1 = "all",extrasupscaler2 ="all",extrasupscaler2visiblity="0.5",extrasupscaler2gfpgan="0",extrasupscaler2codeformer="0.15",extrasupscaler2codeformerweight="0.1",extrasresize="2",onlyupscale="false",givensubject="",smartsubject=True,giventypeofimage=""):
+def generateimages(amount = 1, size = "all",model = "currently selected model",samplingsteps = "40",cfg= "7",hiresfix = True,hiressteps ="0",denoisestrength="0.6",samplingmethod="DPM++ SDE Karras", upscaler="R-ESRGAN 4x+", hiresscale="2",apiurl="http://127.0.0.1:7860",qualitygate=False,quality="7.6",runs="5",insanitylevel="5",subject="all", artist="all", imagetype="all",silentmode=False, workprompt="", antistring="",prefixprompt="", suffixprompt="", negativeprompt="",promptcompounderlevel = "1", seperator="comma", img2imgbatch = "1", img2imgsamplingsteps = "20", img2imgcfg = "7", img2imgsamplingmethod = "DPM++ SDE Karras", img2imgupscaler = "R-ESRGAN 4x+", img2imgmodel = "currently selected model", img2imgactivate = False, img2imgscale = "2", img2imgpadding = "64",img2imgdenoisestrength="0.3",ultimatesdupscale=False,usdutilewidth = "512", usdutileheight = "0", usdumaskblur = "8", usduredraw ="Linear", usduSeamsfix = "None", usdusdenoise = "0.35", usduswidth = "64", usduspadding ="32", usdusmaskblur = "8",controlnetenabled=False, controlnetmodel="",img2imgdenoisestrengthmod="-0.05",enableextraupscale = False,controlnetblockymode = False,extrasupscaler1 = "all",extrasupscaler2 ="all",extrasupscaler2visiblity="0.5",extrasupscaler2gfpgan="0",extrasupscaler2codeformer="0.15",extrasupscaler2codeformerweight="0.1",extrasresize="2",onlyupscale="false",givensubject="",smartsubject=True,giventypeofimage="",imagemodechance=20):
loops = int(amount) # amount of images to generate
steps = 0
upscalefilelist=[]
@@ -70,7 +70,7 @@ def generateimages(amount = 1, size = "all",model = "currently selected model",s
print(workprompt)
else:
- randomprompt = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, False,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage)
+ randomprompt = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, False,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance)
# make the filename, from from a to the first comma
start_index = randomprompt.find("of a ") + len("of a ")
diff --git a/prompttester.py b/prompttester.py
index 97c3a98..3ae879e 100644
--- a/prompttester.py
+++ b/prompttester.py
@@ -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=""):
+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):
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)
+ result = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, onlyartists,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance)
print("")
print("loop " + str(steps))
@@ -46,4 +46,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
print("")
print("All done!")
-generateprompts(10,5,"object","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","HELLO, , ")
\ No newline at end of file
+generateprompts(10,9,"all","none","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","",True,"",1)
\ No newline at end of file
diff --git a/scripts/onebuttonprompt.py b/scripts/onebuttonprompt.py
index f3d374a..8a6adc0 100644
--- a/scripts/onebuttonprompt.py
+++ b/scripts/onebuttonprompt.py
@@ -16,7 +16,7 @@ from model_lists import *
subjects = ["all","object","animal","humanoid", "landscape", "concept"]
artists = ["all", "none", "popular", "greg mode", "3D", "abstract", "angular", "anime" ,"architecture", "art nouveau", "art deco", "baroque", "bauhaus", "cartoon", "character", "children's illustration", "cityscape", "clean", "cloudscape", "collage", "colorful", "comics", "cubism", "dark", "detailed", "digital", "expressionism", "fantasy", "fashion", "fauvism", "figurativism", "gore", "graffiti", "graphic design", "high contrast", "horror", "impressionism", "installation", "landscape", "light", "line drawing", "low contrast", "luminism", "magical realism", "manga", "melanin", "messy", "monochromatic", "nature", "nudity", "photography", "pop art", "portrait", "primitivism", "psychedelic", "realism", "renaissance", "romanticism", "scene", "sci-fi", "sculpture", "seascape", "space", "stained glass", "still life", "storybook realism", "street art", "streetscape", "surrealism", "symbolism", "textile", "ukiyo-e", "vibrant", "watercolor", "whimsical"]
-imagetypes = ["all", "all - force multiple", "photograph", "octane render","digital art","concept art", "painting", "portrait", "anime key visual", "only other types", "only templates"]
+imagetypes = ["all", "all - force multiple", "photograph", "octane render","digital art","concept art", "painting", "portrait", "anime key visual", "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"]
promptmode = ["at the back", "in the front"]
promptcompounder = ["1", "2", "3", "4", "5"]
ANDtogglemode = ["none", "automatic", "prefix AND prompt + suffix", "prefix + prefix + prompt + suffix"]
@@ -76,12 +76,12 @@ class Script(scripts.Script):
def ui(self, is_img2img):
- def gen_prompt(insanitylevel, subject, artist, imagetype, antistring, prefixprompt, suffixprompt, promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage):
+ def gen_prompt(insanitylevel, subject, artist, imagetype, antistring, prefixprompt, suffixprompt, promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage, imagemodechance):
promptlist = []
for i in range(5):
- promptlist.append(build_dynamic_prompt(insanitylevel,subject,artist, imagetype, False, antistring,prefixprompt,suffixprompt,promptcompounderlevel,seperator,givensubject,smartsubject, giventypeofimage))
+ promptlist.append(build_dynamic_prompt(insanitylevel,subject,artist, imagetype, False, antistring,prefixprompt,suffixprompt,promptcompounderlevel,seperator,givensubject,smartsubject, giventypeofimage, imagemodechance))
return promptlist
@@ -115,9 +115,13 @@ class Script(scripts.Script):
with gr.Column(scale=1, variant="compact"):
artist = gr.Dropdown(
artists, label="Artists", value="all")
+ with gr.Row():
with gr.Column(scale=2, variant="compact"):
imagetype = gr.Dropdown(
imagetypes, label="type of image", value="all")
+ with gr.Column(scale=2, variant="compact"):
+ imagemodechance = gr.Slider(
+ 1, 100, value="20", step=1, label="One in X chance to use special image type mode")
with gr.Row():
gr.Markdown("""
@@ -218,10 +222,34 @@ class Script(scripts.Script):
8. only other types --> Will pick only from the more unique types, such as stained glass window or a funko pop
- 9. only templates --> Will only choose from a set of wildcarded prompt templates. Templates have been gathered from various sources, such as CivitAI, prompthero, promptbook, etc.
+ All modes below are considered a special image type mode.
- only templates is perfect for beginners, who want to see some good results fast.
+ 9. only templates mode --> Will only choose from a set of wildcarded prompt templates. Templates have been gathered from various sources, such as CivitAI, prompthero, promptbook, etc.
+ only templates mode is perfect for beginners, who want to see some good results fast.
+
+ 10. art blaster mode --> Special generation mode that focusses on art movements, stylings and artists.
+
+ 11. quality vomit mode --> Special generation mode that focusses on qualifiers and stylings.
+
+ 12. color cannon mode --> Special generation mode that focusses on color scheme's and moods.
+
+ 13. unique art mode --> Special generation mode that focusses on other image types, art movements, stylings and lighting.
+
+ 14. massive madness mode --> Special generation mode, creates prompt soup. Almost pure randomness.
+
+ 15. photo fantasy mode --> Special generation mode that focusses on photographs, cameras, lenses and lighting.
+
+ 16. subject only mode --> Will only generate a subject, with no additional frills.
+
+ ### One in X chance to use special image type mode
+
+
+ This controls how often it will pick a special generation mode. It is a 1 in X chance. So lower means more often. This will only be applied of "type of image" is set to "all" and there is no Overwrite type of image set.
+
+ When set to 1, it will always pick a random special generation mode. When set to 20, it is a 1 in 20 chance this will happen.
+
+
### Overwrite subject
When you fill in the Overwrite subject field, that subject will be used to build the dynamic prompt around. It is best, if you set the subject type to match the subject. For example, set it to humanoid if you place a person in the override subject field.
@@ -514,7 +542,7 @@ class Script(scripts.Script):
extrasupscaler2codeformerweight = gr.Slider(0, 1, value="0.1", step=0.05, label="CodeFormer weight", visible = False)
- genprom.click(gen_prompt, inputs=[insanitylevel,subject, artist, imagetype, antistring,prefixprompt, suffixprompt,promptcompounderlevel, seperator, givensubject,smartsubject,giventypeofimage], outputs=[prompt1, prompt2, prompt3,prompt4,prompt5])
+ genprom.click(gen_prompt, inputs=[insanitylevel,subject, artist, imagetype, antistring,prefixprompt, suffixprompt,promptcompounderlevel, seperator, givensubject,smartsubject,giventypeofimage,imagemodechance], outputs=[prompt1, prompt2, prompt3,prompt4,prompt5])
prompt1toworkflow.click(prompttoworkflowprompt, inputs=prompt1, outputs=workprompt)
prompt2toworkflow.click(prompttoworkflowprompt, inputs=prompt2, outputs=workprompt)
@@ -522,7 +550,7 @@ class Script(scripts.Script):
prompt4toworkflow.click(prompttoworkflowprompt, inputs=prompt4, outputs=workprompt)
prompt5toworkflow.click(prompttoworkflowprompt, inputs=prompt5, outputs=workprompt)
- startmain.click(generateimages, inputs=[amountofimages,size,model,samplingsteps,cfg,hiresfix,hiressteps,denoisestrength,samplingmethod, upscaler,hiresscale, apiurl, qualitygate, quality, runs,insanitylevel,subject, artist, imagetype, silentmode, workprompt, antistring, prefixprompt, suffixprompt,negativeprompt,promptcompounderlevel, seperator, img2imgbatch, img2imgsamplingsteps, img2imgcfg, img2imgsamplingmethod, img2imgupscaler, img2imgmodel,img2imgactivate, img2imgscale, img2imgpadding,img2imgdenoisestrength,ultimatesdupscale,usdutilewidth, usdutileheight, usdumaskblur, usduredraw, usduSeamsfix, usdusdenoise, usduswidth, usduspadding, usdusmaskblur, controlnetenabled, controlnetmodel,img2imgdenoisestrengthmod,enableextraupscale,controlnetblockymode,extrasupscaler1,extrasupscaler2,extrasupscaler2visiblity,extrasupscaler2gfpgan,extrasupscaler2codeformer,extrasupscaler2codeformerweight,extrasresize,onlyupscale,givensubject,smartsubject,giventypeofimage])
+ startmain.click(generateimages, inputs=[amountofimages,size,model,samplingsteps,cfg,hiresfix,hiressteps,denoisestrength,samplingmethod, upscaler,hiresscale, apiurl, qualitygate, quality, runs,insanitylevel,subject, artist, imagetype, silentmode, workprompt, antistring, prefixprompt, suffixprompt,negativeprompt,promptcompounderlevel, seperator, img2imgbatch, img2imgsamplingsteps, img2imgcfg, img2imgsamplingmethod, img2imgupscaler, img2imgmodel,img2imgactivate, img2imgscale, img2imgpadding,img2imgdenoisestrength,ultimatesdupscale,usdutilewidth, usdutileheight, usdumaskblur, usduredraw, usduSeamsfix, usdusdenoise, usduswidth, usduspadding, usdusmaskblur, controlnetenabled, controlnetmodel,img2imgdenoisestrengthmod,enableextraupscale,controlnetblockymode,extrasupscaler1,extrasupscaler2,extrasupscaler2visiblity,extrasupscaler2gfpgan,extrasupscaler2codeformer,extrasupscaler2codeformerweight,extrasresize,onlyupscale,givensubject,smartsubject,giventypeofimage,imagemodechance])
automatedoutputsfolderbutton.click(openfolder)
@@ -628,12 +656,12 @@ class Script(scripts.Script):
- return [insanitylevel,subject, artist, imagetype, prefixprompt,suffixprompt,negativeprompt, promptcompounderlevel, ANDtoggle, silentmode, workprompt, antistring, seperator, givensubject, smartsubject, giventypeofimage]
+ return [insanitylevel,subject, artist, imagetype, prefixprompt,suffixprompt,negativeprompt, promptcompounderlevel, ANDtoggle, silentmode, workprompt, antistring, seperator, givensubject, smartsubject, giventypeofimage, imagemodechance]
- def run(self, p, insanitylevel, subject, artist, imagetype, prefixprompt,suffixprompt,negativeprompt, promptcompounderlevel, ANDtoggle, silentmode, workprompt, antistring,seperator, givensubject, smartsubject, giventypeofimage):
+ def run(self, p, insanitylevel, subject, artist, imagetype, prefixprompt,suffixprompt,negativeprompt, promptcompounderlevel, ANDtoggle, silentmode, workprompt, antistring,seperator, givensubject, smartsubject, giventypeofimage, imagemodechance):
images = []
infotexts = []
@@ -705,7 +733,7 @@ class Script(scripts.Script):
#Here is where we build a "normal" prompt
- preppedprompt += build_dynamic_prompt(insanitylevel,subject,artist, imagetype, False, antistring, prefixprompt, suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage)
+ preppedprompt += build_dynamic_prompt(insanitylevel,subject,artist, imagetype, False, antistring, prefixprompt, suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance)
# set the artist mode back when done (for automatic mode)
artist = artistcopy
diff --git a/user_guides/prompt_generation_modes.md b/user_guides/prompt_generation_modes.md
new file mode 100644
index 0000000..384982a
--- /dev/null
+++ b/user_guides/prompt_generation_modes.md
@@ -0,0 +1,179 @@
+# Special prompt generation modes
+
+Currently in One Button Prompt there are 9 different prompt generation modes. There is the stanard mode, but additional modes have been added in.
+
+Hopefully, they can be used to inspire you even more. Maybe you will even use a favorite one.
+
+## Standard
+The default of One Button Prompt, and is used in most occasions to generate the prompt for you. While random, it is also very structured in the build of the prompt.
+
+In order to spice things up, there have been additional prompt generation modes added. Those generation modes are more random, and favor certain keywords above others.
+
+These modes will randomly show up, and are controlled by the "One in X chance to use special image type mode" slider. So lower means more often. When set to 1, it will always pick a random special generation mode. When set to 20, it is a 1 in 20 chance this will happen.
+
+These modes can also directly be selected from the "type of image" dropdown.
+
+
+
+
+## only templates mode
+This mode is even more special.
+
+Has a set of template prompts from various sources, fully wildcarded and usable with Subject Override. This has it's own user guide, which can be found here: [guide to prompt templates](https://github.com/AIrjen/OneButtonPrompt/blob/main/user_guides/templates.md)
+
+## art blaster mode
+Special generation mode that focusses on art movements, stylings and artists.
+
+As you can see in the example prompts, there is a favor in adding artists and art movements. This mode is best used with models that can handle those artists.
+
+Example prompts:
+
+
+
+
+> art by Greg Rutkowski, excessivism, Primary Colors, Nihilcore, Dual Kawaii, art by Artgerm, Engaging Art Nouveau Brother, wearing Feigned Art Nouveau Coat, Expressionism, Water color painting, Lightcore, Analytical art, art by Loish, Monochromatic Silver filter
+
+> art by Eyvind Earle, Alabaster hue, art by Eyvind Earle, Impressionism, Monochromatic Rainbow filter, Basilisk, Abstract Expressionism, Brocore
+
+
+
+
+> Electic Colors, Glistening Paranoid flyweight Princess Zelda, 😕, Modernism Art
+
+> art by Alphonse Mucha, CGI Art, Chalk painting, Neo, Stressed jupiter clouds, art by Ross Draws
+
+## quality vomit mode
+Special generation mode that focusses on qualifiers and stylings.
+
+This will add things like "masterpiece" and "High quality" to the prompt, while also adding stylings, such as "geometric patterns" or "flakes"
+
+This mode is best used with models that are more strict, such as some anime models.
+
+Example prompts:
+
+
+
+
+> Grindhouse, Calotype, Interplanetary dust, photolab, wallpaper, Folded octopus, dark violet lightning bolts, Fujifilm Superia, full of color, rich color
+
+> Crimson background, intricate details, Creepy Bewitching Female Gallery owner, Repulsive hair styled as Box cut, (dark indigo theme:0.7)
+
+
+
+
+> made of Clay, dslr, Pastel Goth Art, Zentangle, Surrealism Art, electric pink and copper flakes, Concept Art World, Bizarre Capricious Exotic Shorthair cat, expressive brush strokes
+
+> most beautiful artwork in the world, masterpiece, Light streaks, Highres, highly detailed, DayGlo flakes, Vamperic Weasel, Complex background
+
+## color cannon mode
+
+Special generation mode that focusses on color scheme's and moods.
+
+Doesn't always mean bright colors, it just means color scheme's are favored in the generation.
+
+Example prompts:
+
+
+
+
+> Bimbocore, dramatic lighting, Light, Technicolor, Thermos, Sad, Oversaturated, complementary colors, cosmic energy, Monochrome
+
+> Albumen, hair light, Guilty, psychedelic colors, Vivid Colors, triadic colors, Hypersaturated, Melancholy American Shorthair cat, loop lighting, Grayscale, Tranquil
+
+
+
+
+> Neo, Sweltering Trolley, Friendly fluorescent patterns, Light, Light sparkles
+
+> Sunlight, Guilty, Insensitive Barbie, 🤔, Crossed arms, Joyful, Saturated, Regret
+
+## unique art mode
+
+Special generation mode that focusses on other image types, art movements, stylings and lighting.
+
+Think of things like "stained glass" or "ice sculptures" to show up here.
+
+Example prompts:
+
+
+
+
+> league of legends splash art, Normcore Art, de dia los muertos, Ice statue of, Provia, backlight, Honorable French Uncle, 🤨, Mystic, Dark hair styled as French braid, contest winner, Cutecore, anaglyph effect
+
+> High Contrast, Athens, 60s kitsch and psychedelia, flat lighting, art by Dan Mumford, Modern European Ink Painting, Azure power aura
+
+
+
+
+> Afrofuturism, Mural, Desaturated, Film Washi, backlight, Terracotta, Lush Chile and TARDIS, trending on artstation, Magic the gathering
+
+> Fujicolor, soft light, 3D print model, Light streaks, weirdcore, Oversaturated, Abrasive Arena and Workshop, cosmic energy, Monochrome, Light streaks
+
+
+## massive madness mode
+
+Special generation mode, creates prompt soup. Almost pure randomness. Adds a lot of keywords, fully unbiased.
+
+This can create interesting results, and also very wierd results. Some examples below of some decent generations. This mode is also the most FUN!
+
+
+
+
+> Complex background, Magewave, art by André Masson, Masterpiece, flat lighting, Teal space, Kinemacolor, Fleece, 80mm, Joy, Serial Art, (Gruesome Divine cream :1.3), Grand, Fearful, [water|trees], Smug, Lomography, Bloom light, warm woods, Wealth, art by Rob Gonsalves, Light, Kodak portra 400
+
+> art by Alena Aenami, F/1.8, Maniacal, crisp lines, Hate, (Exquisite color field :1.3), Honest, Grim, Emerald, Green lighting, de dia los muertos, Explosions, Moody, Evil, Saturated, New Wave Art, Bloom light
+
+
+
+
+> Cutecore, F/1.8, Canon eos 5d mark 4, (Sakura "The Brain of Calculus":1.3), [vegetation|woods], lots of details, art by Roy Krenkel, Cloth, Radiance, [Humanity:Infinity:9]
+
+> Satisfying, Study, art by Emek Golan, Lustful, Lens Flare, dense vegetation, sfumato, Nostalgic lighting, Sharkskin, (Breathtaking Otherworldly "The River of Longing":1.3), Crystal, Peaceful, halation, Hemp, trending on artstation, art by Ando Fuchs, Agfacolor, silhouette, [beach|flower field], Fleece
+
+## photo fantasy mode
+
+Special generation mode that focusses on photographs, cameras, lenses and lighting.
+
+This will tend to create photographs with a lot of those keywords involved.
+
+Example prompts:
+
+
+
+
+> split lighting, Nikon d850, Hyper-Creative Greenhouse, Nostalgic lighting, Fuji superia 400, Relieving, broad lighting
+
+> Sunlight, Iphone X, Direct light, Angelic The Seychelles Islands, film camera, Gel lighting
+
+
+
+
+> photograph, Phase One XF IQ4 150MP, Canon eos 5d mark 4, F/5, Fresh Sad stout Male Monk
+
+> photograph, Embarrassing, Kodak portra 400, dramatic lighting, Canon RF, Bahamian Thetis, Thought-Provoking hair, Kodak portra 800, Fuji superia 400, BW, Depth of field 100mm
+
+## subject only mode
+
+Will only generate a subject, with no additional frills. The subjects will still be complicated, with the normal One Button Prompt logic for creating a subject. Note that all the specials surrounding the subject are still in!
+
+Best used for models with strong artstyles build in. For the examples in this one I used revAnimated model
+
+Example prompts:
+
+
+
+
+> Conscious Italian Shadow of Experience, Troubadour, Feminine Pose
+
+> Tranquil Universal Frodo Baggins
+
+
+
+
+> Evocative [Cyclops|kristy swanson], Chestnut hair styled as Blunt bangs
+
+> Chibi Holy Aunt, Traditional hair
+
+### Thank you
+
+I hope these new prompt modes will inspire you even more!