From de189d639f741c927aa2836c36d19a079698ef1c Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 23 Sep 2023 09:51:02 +0200 Subject: [PATCH 01/42] Made an OR() parser --- build_dynamic_prompt.py | 70 +++++++++++++++++++++++++++++++++++++++++ prompttester.py | 2 +- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index faa4dba..ebb262a 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -1921,6 +1921,15 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all #end of the while loop, now clean up the prompt + # first, we are going to parse any custom functions we have build in + # these are + # OR() + # and + # CHANCEROLL() + completeprompt = parse_custom_functions(completeprompt) + + + # first some manual stuff for outfit if(unique_dist(insanitylevel)): # sometimes, its just nice to have descriptor and a normal "outfit". We use mini outfits for this! @@ -2668,4 +2677,65 @@ def cleanup(completeprompt, advancedprompting): completeprompt = completeprompt.strip(", ") + return completeprompt + +def custom_or(values): + # Check if the last element is one of the specific values + last_element = values[-1] + first_element = values[0] + + if last_element in ['always', 'common', 'normal','uncommon', 'rare', 'legendary','unique', 'extraordinary', 'novel', 'never']: + # If we do not hit the change roll, then take the first element. + if not(chance_roll(5, last_element)): + return first_element + # Else anything but the first or last element + else: + values.remove(first_element) + values.remove(last_element) + selected_value = random.choice(values) + return selected_value + + + else: + # Randomly select one element from the list + selected_value = random.choice(values) + return selected_value + +def parse_custom_functions(completeprompt): + + # Regular expression pattern to match 'or()' function calls and their arguments + ORpattern = r'OR\((.*?)\)' + ORbasesearch = 'OR(' + + + + while re.findall(ORpattern, completeprompt): + + # basically start from right to left to start replacing, so we can do nesting + # probably not very stable, but seems to work :) + startofOR = completeprompt.rfind(ORbasesearch) + + lastpartofcompleteprompt = completeprompt[startofOR:] + + # Find all 'or()' function calls and their arguments in the text + matches = re.findall(ORpattern, lastpartofcompleteprompt) + + # Sort the matches based on the length of the OR expressions + matches.sort(key=len) + + + match = matches[0] # get the first value, so smallest goes first! + + or_replacement = "" + + + # Split the arguments by ',' + arguments = [arg.strip() for arg in match.split(',')] + + # Evaluate the 'or()' function and append the result to the results list + or_replacement = custom_or(arguments) + completematch = 'OR(' + match + ')' + completeprompt = completeprompt.replace(completematch, or_replacement) + + return completeprompt \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 740e767..c072f2d 100644 --- a/prompttester.py +++ b/prompttester.py @@ -46,4 +46,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,8,"all","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(1,8,"all","all","all",False,"","","PREFIXPROMPT" ,"OR(SUFFIX, SUFFIXPROMPT)","",1,"","OR(HELLO , OR(THERE,BACK), EVERYONE, uncommon)",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 7a9676c6d84d24680fce9dfac975f8a954123981 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 23 Sep 2023 10:12:04 +0200 Subject: [PATCH 02/42] Added RNG function --- build_dynamic_prompt.py | 71 +++++++++++++++++++++++++++++++++++++---- prompttester.py | 2 +- 2 files changed, 65 insertions(+), 8 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index ebb262a..8b274bd 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -1924,9 +1924,17 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # first, we are going to parse any custom functions we have build in # these are # OR() + + # OR(foo;bar;bla) --> randomly take foo, bar or bla + # OR(foo;bar;bla;uncommon) --> Take foo, unless it hits uncommon roll. Then take bar or bla + # and - # CHANCEROLL() - completeprompt = parse_custom_functions(completeprompt) + # RNG() + # RNG(foo;uncommon) --> Take foo when it hits uncommon roll, else empty + + + + completeprompt = parse_custom_functions(completeprompt, insanitylevel) @@ -2679,14 +2687,14 @@ def cleanup(completeprompt, advancedprompting): return completeprompt -def custom_or(values): +def custom_or(values, insanitylevel = 5): # Check if the last element is one of the specific values last_element = values[-1] first_element = values[0] if last_element in ['always', 'common', 'normal','uncommon', 'rare', 'legendary','unique', 'extraordinary', 'novel', 'never']: # If we do not hit the change roll, then take the first element. - if not(chance_roll(5, last_element)): + if not(chance_roll(insanitylevel, last_element)): return first_element # Else anything but the first or last element else: @@ -2701,7 +2709,24 @@ def custom_or(values): selected_value = random.choice(values) return selected_value -def parse_custom_functions(completeprompt): +def custom_rng(values, insanitylevel = 5): + # Check if the last element is one of the specific values + last_element = values[-1] + + if last_element in ['always', 'common', 'normal','uncommon', 'rare', 'legendary','unique', 'extraordinary', 'novel', 'never']: + # If we do not hit the change roll, then do nothing + if not(chance_roll(insanitylevel, last_element)): + return "" + # Else return the first element + else: + return values[0] + + + else: + print("RNG function failed. invalid config!") + return "" + +def parse_custom_functions(completeprompt, insanitylevel = 5): # Regular expression pattern to match 'or()' function calls and their arguments ORpattern = r'OR\((.*?)\)' @@ -2730,12 +2755,44 @@ def parse_custom_functions(completeprompt): # Split the arguments by ',' - arguments = [arg.strip() for arg in match.split(',')] + arguments = [arg.strip() for arg in match.split(';')] # Evaluate the 'or()' function and append the result to the results list - or_replacement = custom_or(arguments) + or_replacement = custom_or(arguments, insanitylevel) completematch = 'OR(' + match + ')' completeprompt = completeprompt.replace(completematch, or_replacement) + # Then parse the RNG function + # Regular expression pattern to match 'RNG()' function calls and their arguments + RNGpattern = r'RNG\((.*?)\)' + RNGbasesearch = 'RNG(' + + while re.findall(RNGpattern, completeprompt): + + # basically start from right to left to start replacing, so we can do nesting + # probably not very stable, but seems to work :) + startofRNG = completeprompt.rfind(RNGbasesearch) + + lastpartofcompleteprompt = completeprompt[startofRNG:] + + # Find all 'or()' function calls and their arguments in the text + matches = re.findall(RNGpattern, lastpartofcompleteprompt) + + # Sort the matches based on the length of the OR expressions + matches.sort(key=len) + + + match = matches[0] # get the first value, so smallest goes first! + + rng_replacement = "" + + + # Split the arguments by ';' + arguments = [arg.strip() for arg in match.split(';')] + + # Evaluate the 'or()' function and append the result to the results list + rng_replacement = custom_rng(arguments, insanitylevel) + completematch = 'RNG(' + match + ')' + completeprompt = completeprompt.replace(completematch, rng_replacement) return completeprompt \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index c072f2d..3bbd7c5 100644 --- a/prompttester.py +++ b/prompttester.py @@ -46,4 +46,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(1,8,"all","all","all",False,"","","PREFIXPROMPT" ,"OR(SUFFIX, SUFFIXPROMPT)","",1,"","OR(HELLO , OR(THERE,BACK), EVERYONE, uncommon)",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(1,8,"all","all","all",False,"","","PREFIXPROMPT" ,"OR(SUFFIX, SUFFIXPROMPT)","",1,"","RNG(-descriptor-;uncommon), BLA",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 221d00c925f896c4ce019c379e0dc51957cad542 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 23 Sep 2023 11:23:09 +0200 Subject: [PATCH 03/42] Working on rewriting builders with OR function --- build_dynamic_prompt.py | 116 +++++------------- .../special_lists/animalsuffixadditions.csv | 19 ++- csvfiles/special_lists/backgroundtypes.csv | 31 +---- csvfiles/special_lists/buildaccessorie.csv | 12 +- prompttester.py | 2 +- 5 files changed, 47 insertions(+), 133 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 8b274bd..72055c4 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -143,22 +143,22 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all customsubjectslist = csv_to_list("custom_subjects",antilist,"./userfiles/") # special lists - backgroundtypelist = csv_to_list("backgroundtypes", antilist,"./csvfiles/special_lists/") - insideshotlist = csv_to_list("insideshots", antilist,"./csvfiles/special_lists/") - photoadditionlist = csv_to_list("photoadditions", antilist,"./csvfiles/special_lists/") - buildhairlist = csv_to_list("buildhair", antilist,"./csvfiles/special_lists/") - buildoutfitlist = csv_to_list("buildoutfit", antilist,"./csvfiles/special_lists/") - objectadditionslist = csv_to_list("objectadditions", antilist,"./csvfiles/special_lists/") - humanadditionlist = csv_to_list("humanadditions", antilist,"./csvfiles/special_lists/") - animaladditionlist = csv_to_list("animaladditions", antilist,"./csvfiles/special_lists/") - 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/") - miniactivitylist = csv_to_list("miniactivity", antilist,"./csvfiles/special_lists/") - animalsuffixadditionlist = csv_to_list("animalsuffixadditions", antilist,"./csvfiles/special_lists/") + backgroundtypelist = csv_to_list("backgroundtypes", antilist,"./csvfiles/special_lists/",0,"?") + insideshotlist = csv_to_list("insideshots", antilist,"./csvfiles/special_lists/",0,"?") + photoadditionlist = csv_to_list("photoadditions", antilist,"./csvfiles/special_lists/",0,"?") + buildhairlist = csv_to_list("buildhair", antilist,"./csvfiles/special_lists/",0,"?") + buildoutfitlist = csv_to_list("buildoutfit", antilist,"./csvfiles/special_lists/",0,"?") + objectadditionslist = csv_to_list("objectadditions", antilist,"./csvfiles/special_lists/",0,"?") + humanadditionlist = csv_to_list("humanadditions", antilist,"./csvfiles/special_lists/",0,"?") + animaladditionlist = csv_to_list("animaladditions", antilist,"./csvfiles/special_lists/",0,"?") + buildaccessorielist = csv_to_list("buildaccessorie", antilist,"./csvfiles/special_lists/",0,"?") + minilocationadditionslist = csv_to_list("minilocationadditions", antilist,"./csvfiles/special_lists/",0,"?") + overalladditionlist = csv_to_list("overalladditions", antilist,"./csvfiles/special_lists/",0,"?") + imagetypemodelist = csv_to_list("imagetypemodes", antilist,"./csvfiles/special_lists/",0,"?") + miniactivitylist = csv_to_list("miniactivity", antilist,"./csvfiles/special_lists/",0,"?") + animalsuffixadditionlist = csv_to_list("animalsuffixadditions", antilist,"./csvfiles/special_lists/",0,"?") - styleslist = csv_to_list("styles", antilist,"./csvfiles/templates/") + styleslist = csv_to_list("styles", antilist,"./csvfiles/templates/",0,"?") @@ -1922,15 +1922,15 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all #end of the while loop, now clean up the prompt # first, we are going to parse any custom functions we have build in - # these are + # this is OR() # OR() # OR(foo;bar;bla) --> randomly take foo, bar or bla # OR(foo;bar;bla;uncommon) --> Take foo, unless it hits uncommon roll. Then take bar or bla + # OR(;foo) --> empty or foo + # OR(;foo;uncommon) --> empty unless it hits uncommon roll. Then take foo + # OR(;foo;bar;uncommon) --> empty unless it hits uncommon roll. Then take foo or bar - # and - # RNG() - # RNG(foo;uncommon) --> Take foo when it hits uncommon roll, else empty @@ -2206,19 +2206,19 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender customsubjectslist = csv_to_list("custom_subjects",antilist,"./userfiles/") # special lists - backgroundtypelist = csv_to_list("backgroundtypes", antilist,"./csvfiles/special_lists/") - insideshotlist = csv_to_list("insideshots", antilist,"./csvfiles/special_lists/") - photoadditionlist = csv_to_list("photoadditions", antilist,"./csvfiles/special_lists/") - buildhairlist = csv_to_list("buildhair", antilist,"./csvfiles/special_lists/") - buildoutfitlist = csv_to_list("buildoutfit", antilist,"./csvfiles/special_lists/") - objectadditionslist = csv_to_list("objectadditions", antilist,"./csvfiles/special_lists/") - humanadditionlist = csv_to_list("humanadditions", antilist,"./csvfiles/special_lists/") - animaladditionlist = csv_to_list("animaladditions", antilist,"./csvfiles/special_lists/") - 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/") - miniactivitylist = csv_to_list("miniactivity", antilist,"./csvfiles/special_lists/") + backgroundtypelist = csv_to_list("backgroundtypes", antilist,"./csvfiles/special_lists/",0,"?") + insideshotlist = csv_to_list("insideshots", antilist,"./csvfiles/special_lists/",0,"?") + photoadditionlist = csv_to_list("photoadditions", antilist,"./csvfiles/special_lists/",0,"?") + buildhairlist = csv_to_list("buildhair", antilist,"./csvfiles/special_lists/",0,"?") + buildoutfitlist = csv_to_list("buildoutfit", antilist,"./csvfiles/special_lists/",0,"?") + objectadditionslist = csv_to_list("objectadditions", antilist,"./csvfiles/special_lists/",0,"?") + humanadditionlist = csv_to_list("humanadditions", antilist,"./csvfiles/special_lists/",0,"?") + animaladditionlist = csv_to_list("animaladditions", antilist,"./csvfiles/special_lists/",0,"?") + buildaccessorielist = csv_to_list("buildaccessorie", antilist,"./csvfiles/special_lists/",0,"?") + minilocationadditionslist = csv_to_list("minilocationadditions", antilist,"./csvfiles/special_lists/",0,"?") + overalladditionlist = csv_to_list("overalladditions", antilist,"./csvfiles/special_lists/",0,"?") + imagetypemodelist = csv_to_list("imagetypemodes", antilist,"./csvfiles/special_lists/",0,"?") + miniactivitylist = csv_to_list("miniactivity", antilist,"./csvfiles/special_lists/",0,"?") prompt = prompt.replace(",", " , ") @@ -2709,23 +2709,6 @@ def custom_or(values, insanitylevel = 5): selected_value = random.choice(values) return selected_value -def custom_rng(values, insanitylevel = 5): - # Check if the last element is one of the specific values - last_element = values[-1] - - if last_element in ['always', 'common', 'normal','uncommon', 'rare', 'legendary','unique', 'extraordinary', 'novel', 'never']: - # If we do not hit the change roll, then do nothing - if not(chance_roll(insanitylevel, last_element)): - return "" - # Else return the first element - else: - return values[0] - - - else: - print("RNG function failed. invalid config!") - return "" - def parse_custom_functions(completeprompt, insanitylevel = 5): # Regular expression pattern to match 'or()' function calls and their arguments @@ -2754,7 +2737,7 @@ def parse_custom_functions(completeprompt, insanitylevel = 5): or_replacement = "" - # Split the arguments by ',' + # Split the arguments by ';' arguments = [arg.strip() for arg in match.split(';')] # Evaluate the 'or()' function and append the result to the results list @@ -2762,37 +2745,6 @@ def parse_custom_functions(completeprompt, insanitylevel = 5): completematch = 'OR(' + match + ')' completeprompt = completeprompt.replace(completematch, or_replacement) - # Then parse the RNG function - # Regular expression pattern to match 'RNG()' function calls and their arguments - RNGpattern = r'RNG\((.*?)\)' - RNGbasesearch = 'RNG(' - - while re.findall(RNGpattern, completeprompt): - - # basically start from right to left to start replacing, so we can do nesting - # probably not very stable, but seems to work :) - startofRNG = completeprompt.rfind(RNGbasesearch) - - lastpartofcompleteprompt = completeprompt[startofRNG:] - - # Find all 'or()' function calls and their arguments in the text - matches = re.findall(RNGpattern, lastpartofcompleteprompt) - - # Sort the matches based on the length of the OR expressions - matches.sort(key=len) - - - match = matches[0] # get the first value, so smallest goes first! - - rng_replacement = "" - - - # Split the arguments by ';' - arguments = [arg.strip() for arg in match.split(';')] - - # Evaluate the 'or()' function and append the result to the results list - rng_replacement = custom_rng(arguments, insanitylevel) - completematch = 'RNG(' + match + ')' - completeprompt = completeprompt.replace(completematch, rng_replacement) + return completeprompt \ No newline at end of file diff --git a/csvfiles/special_lists/animalsuffixadditions.csv b/csvfiles/special_lists/animalsuffixadditions.csv index 6bdf3bf..e67533e 100644 --- a/csvfiles/special_lists/animalsuffixadditions.csv +++ b/csvfiles/special_lists/animalsuffixadditions.csv @@ -1,15 +1,10 @@ -with -material- wings -with -material- tail -with -material- ears --animal- hybrid -with -animal- skin -with -pattern- skin +with OR(-material-;-descriptor-) OR(wings; tail; ears) +- OR(-animal-;-humanoid-) OR(;hybrid;normal) +with OR(-animal-;-pattern-) skin wearing a -accessory- -with -pattern- -print- -with -color- details -with -material- -minioutfit- +with OR(-pattern-;-color-;rare) -print- +with OR(-color-;-material-;unique) details +with OR(-material-;-descriptor-;-color-) -minioutfit- with -descriptor- parts --miniactivity- at a -location- --miniactivity- in a -building- -- -humanoid- +-miniactivity- at a OR(-location-;-building-) looking like a -objecttotal- \ No newline at end of file diff --git a/csvfiles/special_lists/backgroundtypes.csv b/csvfiles/special_lists/backgroundtypes.csv index 0c399a9..1e9779c 100644 --- a/csvfiles/special_lists/backgroundtypes.csv +++ b/csvfiles/special_lists/backgroundtypes.csv @@ -1,27 +1,4 @@ -background is -location- -background is [-location-|-location-] -background is -building- -background is [-building-|-building-] -background is [-location-|-building-] -at -location- -at -building- -near -location- -near -building- -inside a -building- -inside a -descriptor- -building- -background is -descriptor- -building- -background is -descriptor- -location- --descriptor- -location- in background --descriptor- -building- in background --building- in background --location- in background -plain background -plain -color- background -simple background -simple -color- background --color- and -color- background --descriptor- background --descriptor- -color- background --culture- background --space- background --flora- in background \ No newline at end of file +OR(background is;at;near;inside a) OR(;-descriptor-;normal) OR(-location-;-building-;-minilocation-) +OR(;-descriptor-;normal) OR(-location-;-building-;-minilocation-) in background +OR(;plain;simple;detailed;complex;centered;normal) OR(;-descriptor-;-color-;-color- and -color-;-colorscheme-;normal) background +OR(-culture-;-space-;-flora-;-minilocation- and -flora-;-season-) background \ No newline at end of file diff --git a/csvfiles/special_lists/buildaccessorie.csv b/csvfiles/special_lists/buildaccessorie.csv index 86c5dbf..548bf0f 100644 --- a/csvfiles/special_lists/buildaccessorie.csv +++ b/csvfiles/special_lists/buildaccessorie.csv @@ -1,11 +1 @@ --accessory- --descriptor- -accessory- --culture- -accessory- --color- -accessory- --accessory-, -accessory- --descriptor- -accessory-, -accessory- --descriptor- -accessory-, -descriptor- -accessory- --descriptor- -accessory-, -culture- -accessory- --culture- -accessory-, -accessory- --accessory-, -accessory-, -accessory- --descriptor- -accessory-, -accessory-, -accessory- \ No newline at end of file +OR(;-descriptor-;normal) OR(;-culture-;uncommon) OR(;-color-;uncommon) -accessory- OR(; , -accessory-; , -descriptor- -accessory-;rare) OR(; and -accessory-;unique) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 3bbd7c5..6e67e0c 100644 --- a/prompttester.py +++ b/prompttester.py @@ -46,4 +46,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(1,8,"all","all","all",False,"","","PREFIXPROMPT" ,"OR(SUFFIX, SUFFIXPROMPT)","",1,"","RNG(-descriptor-;uncommon), BLA",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(20,8,"all","all","all",False,"","","PREFIXPROMPT" ,"OR(;-descriptor-;normal) OR(;-culture-;uncommon) OR(;-color-;uncommon) -accessory- OR(; , -accessory-; , -descriptor- -accessory-;rare) OR(; and -accessory-;unique)","",1,"","OR(;-descriptor-;normal), BLA",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 6ada5fd3dbd9cb9d1f9cdbac136746cc15c43070 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 23 Sep 2023 12:50:50 +0200 Subject: [PATCH 04/42] Working on rebuilding build lists --- build_dynamic_prompt.py | 2 ++ csvfiles/patterns.csv | 1 - csvfiles/special_lists/buildhair.csv | 16 ++--------- csvfiles/special_lists/buildoutfit.csv | 28 ++++--------------- csvfiles/special_lists/humanadditions.csv | 28 ++++++------------- csvfiles/special_lists/insideshots.csv | 9 +----- .../special_lists/minilocationadditions.csv | 11 +------- prompttester.py | 2 +- 8 files changed, 22 insertions(+), 75 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 72055c4..f7bd30b 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -2691,6 +2691,8 @@ def custom_or(values, insanitylevel = 5): # Check if the last element is one of the specific values last_element = values[-1] first_element = values[0] + + print(values) if last_element in ['always', 'common', 'normal','uncommon', 'rare', 'legendary','unique', 'extraordinary', 'novel', 'never']: # If we do not hit the change roll, then take the first element. diff --git a/csvfiles/patterns.csv b/csvfiles/patterns.csv index 278e68f..d65cca8 100644 --- a/csvfiles/patterns.csv +++ b/csvfiles/patterns.csv @@ -9,7 +9,6 @@ barcode awning bayadere argyle -Basketweave Plaid Checkerboard Harlequin diff --git a/csvfiles/special_lists/buildhair.csv b/csvfiles/special_lists/buildhair.csv index eff91bd..b957530 100644 --- a/csvfiles/special_lists/buildhair.csv +++ b/csvfiles/special_lists/buildhair.csv @@ -1,14 +1,2 @@ --haircolor- hair styled as -hairstyle- --haircolor- hair, -descriptor- -hairstyle- hairstyle --haircolor- hair --haircolor- -hairstyle- hairstyle --haircolor- -descriptor- hair --descriptor- hair --descriptor- -haircolor- hair --descriptor- hair styled as -hairstyle- --descriptor- hair, -hairstyle- hairstyle --descriptor- -hairstyle- hairstyle --hairstyle- hair --hairstyle- hairstyle --culture- hair --culture- hairstyle \ No newline at end of file +OR(-haircolor-;-descriptor-;-culture-;uncommon) hair OR(styled as -hairstyle-;;rare) +OR(-haircolor-; -hairstyle-) OR(hairstyle;hair) \ No newline at end of file diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index 3d7cc62..7706bad 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -1,22 +1,6 @@ --descriptor- -outfit- --descriptor- -culture- -outfit- --descriptor- -culture- -color- -outfit- --descriptor- -culture- -material- -outfit- --descriptor- -culture- -material- -color- -outfit- --culture- -outfit- --material- -outfit- --color- -outfit- --material- -color- -outfit- --descriptor- -color- -outfit- --descriptor- -material- -outfit- --descriptor- -material- -color- -outfit- --job- -outfit- --rpgclass- -minioutfit- --season- -minioutfit- --animal--style -outfit- --minioutfit- designed by -brand- --material- --descriptor- -outfit- with -outfitprinttotal- -print- --material- -minioutfit- with -outfitprinttotal- -print- --color- -outfit- with -material- -print- --outfit- in -pattern- -print- \ No newline at end of file +OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR (;-material-;rare) -outfit- +OR(;-descriptor-;normal) OR(;-descriptor-;uncommon) OR(;-color-;uncommon) -outfit- +OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) +OR(;-descriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) +OR(-material-;-color-) +OR(;-descriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- \ No newline at end of file diff --git a/csvfiles/special_lists/humanadditions.csv b/csvfiles/special_lists/humanadditions.csv index 609c9fd..6139db5 100644 --- a/csvfiles/special_lists/humanadditions.csv +++ b/csvfiles/special_lists/humanadditions.csv @@ -1,25 +1,15 @@ -riding a -animal- +OR(riding;with) a -animal- holding a -object- driving a -vehicle- -with a -animal- -surrounded by -object-s -surrounded by -flora-s -surrounded by -space- +surrounded by OR(-object-s;-flora-s;-space-) eating -food- -and -human- -holding hands with -human- +OR(and;holding hands with) -human- cosplaying as -fictional- -with -color- skin -with -material- skin -feeling -mood- -expression is -mood- --miniactivity- in a -waterlocation- --miniactivity- at a -location- --miniactivity- in a -building- -, torn -minioutfit- +with OR(-color-;-material-) skin +OR(feeling;expression is) -mood- +-miniactivity- OR(in;at) a (-location-;-building-;-waterlocation-) wearing -elaborateoutfit- --animal- hybrid +- OR(-animal-;-humanoid-) OR(;hybrid;normal) as -culture- -rpgclass- -sitting in a -descriptor- -chair- -inside a -container- -- -humanoid- \ No newline at end of file +sitting in a OR(-descriptor-;uncommon) -chair- +inside a -container- \ No newline at end of file diff --git a/csvfiles/special_lists/insideshots.csv b/csvfiles/special_lists/insideshots.csv index c5f3a99..3f4c46d 100644 --- a/csvfiles/special_lists/insideshots.csv +++ b/csvfiles/special_lists/insideshots.csv @@ -1,8 +1 @@ -from inside of a -location- -from inside of a -building- -from inside of a -descriptor- -location- -from inside of a -descriptor- -building- -inside a -location- -inside of a -building- -inside a -descriptor- -location- -inside of a -descriptor- -building- \ No newline at end of file +OR(;from;normal) inside OR(;of;normal) a OR(;-descriptor-;uncommon) OR(-location-;-building-) \ No newline at end of file diff --git a/csvfiles/special_lists/minilocationadditions.csv b/csvfiles/special_lists/minilocationadditions.csv index fe6454a..fea4fc8 100644 --- a/csvfiles/special_lists/minilocationadditions.csv +++ b/csvfiles/special_lists/minilocationadditions.csv @@ -1,10 +1 @@ --minilocation- --minilocation- and -minilocation- -[-minilocation-|-minilocation-] --descriptor- -minilocation- --culture- -minilocation- --color- -minilocation- -lush -minilocation- -dense -minilocation- --season- -minilocation- --minilocation- with -flora- \ No newline at end of file +OR(;-descriptor-;-culture-;-color-;lush;dense;-season-;normal) -minilocation- OR(; with -flora-; and -space- in background; and -minilocation-;rare) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 6e67e0c..56446f2 100644 --- a/prompttester.py +++ b/prompttester.py @@ -46,4 +46,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(20,8,"all","all","all",False,"","","PREFIXPROMPT" ,"OR(;-descriptor-;normal) OR(;-culture-;uncommon) OR(;-color-;uncommon) -accessory- OR(; , -accessory-; , -descriptor- -accessory-;rare) OR(; and -accessory-;unique)","",1,"","OR(;-descriptor-;normal), BLA",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(20,8,"all","all","all",False,"","","PREFIXPROMPT" ,"OR(;-descriptor-;-culture-;-color-;lush;dense;-season-;normal) -minilocation- OR(; with -flora-; and -space- in background; and -minilocation-;rare)","",1,"","OR(;-descriptor-;normal), BLA",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 34cee9b2cc5955f5d0a908c9f8c0046d756dd7f2 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:25:59 +0200 Subject: [PATCH 05/42] Fixes and finishing list --- build_dynamic_prompt.py | 31 +++++++++++--------- csvfiles/accessories.csv | 32 ++++----------------- csvfiles/patterns.csv | 1 + csvfiles/special_lists/buildoutfit.csv | 2 +- csvfiles/special_lists/objectadditions.csv | 20 ++++--------- csvfiles/special_lists/overalladditions.csv | 18 +++--------- csvfiles/special_lists/photoadditions.csv | 5 +++- prompttester.py | 9 ++++-- 8 files changed, 45 insertions(+), 73 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index f7bd30b..b9c088e 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -50,7 +50,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all outfitlist = csv_to_list("outfits",antilist) locationlist = csv_to_list("locations",antilist) - accessorielist = csv_to_list("accessories",antilist) + accessorielist = csv_to_list("accessories",antilist,"./csvfiles/",0,"?") artmovementlist = csv_to_list("artmovements",antilist) bodytypelist = csv_to_list("body_types",antilist) cameralist = csv_to_list("cameras",antilist) @@ -1921,20 +1921,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all #end of the while loop, now clean up the prompt - # first, we are going to parse any custom functions we have build in - # this is OR() - # OR() - - # OR(foo;bar;bla) --> randomly take foo, bar or bla - # OR(foo;bar;bla;uncommon) --> Take foo, unless it hits uncommon roll. Then take bar or bla - # OR(;foo) --> empty or foo - # OR(;foo;uncommon) --> empty unless it hits uncommon roll. Then take foo - # OR(;foo;bar;uncommon) --> empty unless it hits uncommon roll. Then take foo or bar + - completeprompt = parse_custom_functions(completeprompt, insanitylevel) + # completeprompt = parse_custom_functions(completeprompt, insanitylevel) @@ -2073,6 +2065,20 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt = completeprompt.replace("-objectstrengthstart-","") completeprompt = completeprompt.replace("-objectstrengthend-","") + + # Now, we are going to parse any custom functions we have build in + # this is OR() + # OR() + + # OR(foo;bar;bla) --> randomly take foo, bar or bla + # OR(foo;bar;bla;uncommon) --> Take foo, unless it hits uncommon roll. Then take bar or bla + # OR(;foo) --> empty or foo + # OR(;foo;uncommon) --> empty unless it hits uncommon roll. Then take foo + # OR(;foo;bar;uncommon) --> empty unless it hits uncommon roll. Then take foo or bar + + + completeprompt = parse_custom_functions(completeprompt, insanitylevel) + # clean it up completeprompt = cleanup(completeprompt, advancedprompting) @@ -2113,7 +2119,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender outfitlist = csv_to_list("outfits",antilist) locationlist = csv_to_list("locations",antilist) - accessorielist = csv_to_list("accessories",antilist) + accessorielist = csv_to_list("accessories",antilist,"./csvfiles/",0,"?") artmovementlist = csv_to_list("artmovements",antilist) bodytypelist = csv_to_list("body_types",antilist) cameralist = csv_to_list("cameras",antilist) @@ -2692,7 +2698,6 @@ def custom_or(values, insanitylevel = 5): last_element = values[-1] first_element = values[0] - print(values) if last_element in ['always', 'common', 'normal','uncommon', 'rare', 'legendary','unique', 'extraordinary', 'novel', 'never']: # If we do not hit the change roll, then take the first element. diff --git a/csvfiles/accessories.csv b/csvfiles/accessories.csv index 4d5ef22..13ca079 100644 --- a/csvfiles/accessories.csv +++ b/csvfiles/accessories.csv @@ -89,7 +89,6 @@ Lapel Pin Body Chain Brooch Anklet -Toe Ring Nose Ring Lip Ring Belly Button Ring @@ -121,34 +120,13 @@ Buttons Tattoos Cigarette Pipe --material- trimmings -Handlebar Mustache -Full Beard +OR(-material-;-color-) trimmings +OR(;Handlebar;Horseshoe;Pencil;Large;Small;common) Mustache +OR(;Full;Stubble;Circle;Light;Large;Small;common) Beard Goatee Soul Patch Mutton Chops -Circle Beard -Horseshoe Mustache -Stubble Beard -Imperial Mustache -Pencil Mustache -Face Painting -Day of the Dead Face Paint --animal- Face Paint -Tribal Face Paint -Tribal Face Marks -Clown Face Paint -Halloween Face Paint -Fantasy Face Paint -Sports Team Face Paint -Superhero Face Paint --animal- Tattoo --object- Tattoo --vehicle- Tattoo --building- Tattoo -Body Tattoos -Face Tattoos -Tattoos -Tribal Tattoos +OR(;Day of the Dead;Tribal;Clown;Halloween;Fantasy;Sports Team;Superhero;-animal-;common) Face OR(Painting;Paint) +OR(-animal-;-objecttotal-;-pattern-;henna;-building-;body;face;tribal) Tattoo Geass Shoulder pads \ No newline at end of file diff --git a/csvfiles/patterns.csv b/csvfiles/patterns.csv index d65cca8..7860dac 100644 --- a/csvfiles/patterns.csv +++ b/csvfiles/patterns.csv @@ -2,6 +2,7 @@ stripes horizontal stripes vertical stripes diagonal stripes +racing stripes pinstripe herringbone regimental diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index 7706bad..f8b4ae6 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -1,4 +1,4 @@ -OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR (;-material-;rare) -outfit- +OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- OR(;-descriptor-;normal) OR(;-descriptor-;uncommon) OR(;-color-;uncommon) -outfit- OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) OR(;-descriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) diff --git a/csvfiles/special_lists/objectadditions.csv b/csvfiles/special_lists/objectadditions.csv index d2f5dfe..ace0ba2 100644 --- a/csvfiles/special_lists/objectadditions.csv +++ b/csvfiles/special_lists/objectadditions.csv @@ -1,16 +1,6 @@ -with a face -made from -material- -detailed with -material- patterns -detailed with -material- -descriptor- patterns --descriptor- details --color- patterns --material- patterns --descriptor- -color- patterns --material- frame -intricate details -smooth +made from OR(-material-;-space-;-flora-) +OR(detailed;engraved;rare) with OR(-material-;-color-;-descriptor-;-pattern-) OR(; and -color-; and -descriptor-;rare) OR(patterns;details) +OR(intricate details;smooth;sleek) designed by -brand- -made from -space- -made from -flora- -anthropomorphic -with -pattern- -print- \ No newline at end of file +anthropomorphic OR(;with a face;normal) +with OR(-pattern-;-color-;-descriptor-;rare) -print- \ No newline at end of file diff --git a/csvfiles/special_lists/overalladditions.csv b/csvfiles/special_lists/overalladditions.csv index 9997a1b..b75d726 100644 --- a/csvfiles/special_lists/overalladditions.csv +++ b/csvfiles/special_lists/overalladditions.csv @@ -1,30 +1,20 @@ -floating in space -floating in -space- -floating over -minilocation- -floating -flying +OR(floating;flying) OR(; in space; in -space-; over -minilocation-;normal) distant nuclear explosion de dia los muertos mechanical lord of the rings scenery landscape, -flora- between the stars surrounded by fire and ice -infused with ethereal color -surrounded by ethereal color -surrounded by ethereal shapes -surrounded by -color- electric sparks +OR(infused with;surrounded by) OR(ethereal color; ethereal shapes; -color- OR(electric;glowing;neon) sparks) -season- -color- smoke in -season- landscape pronounced -genderdescription- features -in -culture- city street +in OR(-culture-;-descriptor-) OR(city;village) OR(street;road) covered in -color- paint, dripping paint -designed by -brand- -in style of -brand- -forged by -brand- +OR(designed by;in style of; forged by) -brand- overgrown with plants and -color- flowers cyberpunk style, neo-tokyo, -color- neon highlights -designed as a -culture- rug from fiber with a portal to another world stylized geometric patterns, gems, steel and chrome soft, squishy and jelly diff --git a/csvfiles/special_lists/photoadditions.csv b/csvfiles/special_lists/photoadditions.csv index 9e21197..6a43ce2 100644 --- a/csvfiles/special_lists/photoadditions.csv +++ b/csvfiles/special_lists/photoadditions.csv @@ -1 +1,4 @@ -film grain \ No newline at end of file +film grain +bokeh +Orton effect +sharp focus \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 56446f2..bc5b95a 100644 --- a/prompttester.py +++ b/prompttester.py @@ -38,7 +38,12 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print(result) break - + + if(" OR " in result): + print("There is a mistake in a OR statement") + print("") + print(result) + break steps += 1 @@ -46,4 +51,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(20,8,"all","all","all",False,"","","PREFIXPROMPT" ,"OR(;-descriptor-;-culture-;-color-;lush;dense;-season-;normal) -minilocation- OR(; with -flora-; and -space- in background; and -minilocation-;rare)","",1,"","OR(;-descriptor-;normal), BLA",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(1000,5,"all","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 6e10c38bca0443e52f84bdc6268cf216ecff52bf Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 23 Sep 2023 14:09:43 +0200 Subject: [PATCH 06/42] List improvements Adding coverings as well --- build_dynamic_prompt.py | 18 ++++++--- csvfiles/brands.csv | 5 ++- csvfiles/containers.csv | 3 +- csvfiles/coverings.csv | 45 +++++++++++++++++++++ csvfiles/cultures.csv | 15 ++++++- csvfiles/lighting.csv | 6 ++- csvfiles/shotsizes.csv | 5 ++- csvfiles/special_lists/objectadditions.csv | 3 +- csvfiles/special_lists/overalladditions.csv | 3 +- prompttester.py | 2 +- 10 files changed, 91 insertions(+), 14 deletions(-) create mode 100644 csvfiles/coverings.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index b9c088e..07bd1d9 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -104,6 +104,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all patternlist = csv_to_list("patterns", antilist) chairlist = csv_to_list("chairs", antilist) cardnamelist = csv_to_list("card_names", antilist) + coveringlist = csv_to_list("coverings", antilist) humanlist = fictionallist + nonfictionallist + humanoidlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -2020,9 +2021,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-pattern-" in completeprompt or "-animalsuffixaddition-" in completeprompt or "-chair-" in completeprompt or - "-cardname-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-"] - 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist] + "-cardname-" in completeprompt or + "-covering-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-"] + 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2173,6 +2175,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender patternlist = csv_to_list("patterns", antilist) chairlist = csv_to_list("chairs", antilist) cardnamelist = csv_to_list("card_names", antilist) + coveringlist = csv_to_list("coverings", antilist) humanlist = fictionallist + nonfictionallist + humanoidlist + malefemalelist + manwomanlist + manwomanrelationlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -2441,6 +2444,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender prompt = prompt.replace(combination," -chair- ") if lowercase_combination in [x.lower() for x in cardnamelist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -cardname- ") + if lowercase_combination in [x.lower() for x in coveringlist] and chance_roll(insanitylevel, "uncommon"): + prompt = prompt.replace(combination," -covering- ") if lowercase_combination in [x.lower() for x in fantasyartistlist] and chance_roll(insanitylevel, "uncommon"): @@ -2546,9 +2551,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-miniactivity-" in completeprompt or "-pattern-" in completeprompt or "-chair-" in completeprompt or - "-cardname-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-"] - 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist] + "-cardname-" in completeprompt or + "-covering-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-"] + 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/brands.csv b/csvfiles/brands.csv index 39c3f1d..9f6a88c 100644 --- a/csvfiles/brands.csv +++ b/csvfiles/brands.csv @@ -78,4 +78,7 @@ Dwarves Orcs Trolls Gnomes -Goblins \ No newline at end of file +Goblins +Blizzard entertainment +Riot games +Mugler \ No newline at end of file diff --git a/csvfiles/containers.csv b/csvfiles/containers.csv index b6b9608..8674bc4 100644 --- a/csvfiles/containers.csv +++ b/csvfiles/containers.csv @@ -25,4 +25,5 @@ Paperweight Glass canister Machine Glass case -Display case \ No newline at end of file +Display case +Museum glass \ No newline at end of file diff --git a/csvfiles/coverings.csv b/csvfiles/coverings.csv new file mode 100644 index 0000000..f1e82a1 --- /dev/null +++ b/csvfiles/coverings.csv @@ -0,0 +1,45 @@ +Runes +Snow +Foam +Water +Colors +Mud +Dirt +Spikes +Jewels +Flowers +Flora +Fire +Frost +Ash +Sand +Leaves +Fur +Insects +Rust +Ice +Soot +Paint +Vines +Cobwebs +Tar +Glitter +Graffiti +Fabric +Moss +Fog +Powder +Stickers +Posters +Vinyl +Decals +Stencils +Ink +Stains +Graffiti +Feathers +Oil +Dust +Rubble +Seashells +Flames \ No newline at end of file diff --git a/csvfiles/cultures.csv b/csvfiles/cultures.csv index d8f7286..d34db62 100644 --- a/csvfiles/cultures.csv +++ b/csvfiles/cultures.csv @@ -219,4 +219,17 @@ Elvish Dwarven Peasant hip-hop -Urban \ No newline at end of file +Urban +Parisien +Cosplayer +Gamer +Steerage +Preppy +Rasta +Punks +Metalhead +Skater +Hipster +Northern +Southern +Arcadian \ No newline at end of file diff --git a/csvfiles/lighting.csv b/csvfiles/lighting.csv index cd5e8f0..34b577a 100644 --- a/csvfiles/lighting.csv +++ b/csvfiles/lighting.csv @@ -44,4 +44,8 @@ Candle light Beautifully Lit Ethereal Lighting Starlight -Neon Light \ No newline at end of file +Neon Light +Light and shadow plays +Dramatic spotlight +Cold Lighting +Warm lighting \ No newline at end of file diff --git a/csvfiles/shotsizes.csv b/csvfiles/shotsizes.csv index 1279fba..5b19b45 100644 --- a/csvfiles/shotsizes.csv +++ b/csvfiles/shotsizes.csv @@ -48,4 +48,7 @@ top-down view two shot angle wide angle wide shot -zoomed out \ No newline at end of file +zoomed out +profile +side-profile +upper body shot \ No newline at end of file diff --git a/csvfiles/special_lists/objectadditions.csv b/csvfiles/special_lists/objectadditions.csv index ace0ba2..d5ff27c 100644 --- a/csvfiles/special_lists/objectadditions.csv +++ b/csvfiles/special_lists/objectadditions.csv @@ -3,4 +3,5 @@ OR(detailed;engraved;rare) with OR(-material-;-color-;-descriptor-;-pattern-) OR OR(intricate details;smooth;sleek) designed by -brand- anthropomorphic OR(;with a face;normal) -with OR(-pattern-;-color-;-descriptor-;rare) -print- \ No newline at end of file +with OR(-pattern-;-color-;-descriptor-;rare) -print- +covered in -covering- \ No newline at end of file diff --git a/csvfiles/special_lists/overalladditions.csv b/csvfiles/special_lists/overalladditions.csv index b75d726..5ee9460 100644 --- a/csvfiles/special_lists/overalladditions.csv +++ b/csvfiles/special_lists/overalladditions.csv @@ -33,4 +33,5 @@ clean, soap bubbles, iridescent and the genre is -musicgenre- displayed in a rainbow pattern inside a -container- --flora-, -flora-, -flora-, -flora- \ No newline at end of file +-flora-, -flora-, -flora-, -flora- +covered in -covering- \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index bc5b95a..32bcfc1 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,4 +51,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(1000,5,"all","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(10,5,"all","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","-objecttotal- covered in -covering-",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 30964ab59909b954b612588edc6ef9a631e1500f Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 23 Sep 2023 14:25:38 +0200 Subject: [PATCH 07/42] Fixing issues and adding stuff --- csvfiles/concept_prefix.csv | 4 +++- csvfiles/concept_suffix.csv | 3 ++- csvfiles/descriptors.csv | 7 +++---- csvfiles/imagetypes.csv | 1 + csvfiles/manwomanrelations.csv | 3 ++- csvfiles/minioutfits.csv | 3 ++- csvfiles/patterns.csv | 8 +++++++- csvfiles/rpgclasses.csv | 4 +++- csvfiles/special_lists/humanadditions.csv | 2 +- csvfiles/vomit.csv | 3 ++- prompttester.py | 2 +- 11 files changed, 27 insertions(+), 13 deletions(-) diff --git a/csvfiles/concept_prefix.csv b/csvfiles/concept_prefix.csv index 5240da0..c326dd9 100644 --- a/csvfiles/concept_prefix.csv +++ b/csvfiles/concept_prefix.csv @@ -128,4 +128,6 @@ Element Magic Underworld Bird --musicgenre--wizards \ No newline at end of file +-musicgenre--wizards +Age +Dream \ No newline at end of file diff --git a/csvfiles/concept_suffix.csv b/csvfiles/concept_suffix.csv index eed5897..0f430d4 100644 --- a/csvfiles/concept_suffix.csv +++ b/csvfiles/concept_suffix.csv @@ -108,4 +108,5 @@ Charm Structure Embellishment Prey -Manic \ No newline at end of file +Manic +-brand- \ No newline at end of file diff --git a/csvfiles/descriptors.csv b/csvfiles/descriptors.csv index 0716806..bb1ba3b 100644 --- a/csvfiles/descriptors.csv +++ b/csvfiles/descriptors.csv @@ -103,6 +103,7 @@ Cold Collectable Colorful Colossal +Comely Comfortable Compelling Complementary @@ -287,24 +288,21 @@ Historical Holistic Holy Homey +Homely Honest Honorable Hopeless Horrid Horrifying -Hospitable Hostile Human Hyper-Creative Hyperdetailed Hypnotic Icy -Ignorant Illuminated Illuminating Imaginative -Impassioned -Impeccable Impressionist Impressive Inconsiderate @@ -428,6 +426,7 @@ Petrified Phenomenal Pictorial Pitiful +Plain Playful Plush Pop diff --git a/csvfiles/imagetypes.csv b/csvfiles/imagetypes.csv index 78540c0..4ac2e01 100644 --- a/csvfiles/imagetypes.csv +++ b/csvfiles/imagetypes.csv @@ -1,5 +1,6 @@ RAW photo Photograph +Cosplay Photograph Color splash Digital artwork Digital art diff --git a/csvfiles/manwomanrelations.csv b/csvfiles/manwomanrelations.csv index f5375d4..e77b9fc 100644 --- a/csvfiles/manwomanrelations.csv +++ b/csvfiles/manwomanrelations.csv @@ -12,4 +12,5 @@ Parent;genderless Wife;female Husband;male Girlfriend;female -Boyfriend;male \ No newline at end of file +Boyfriend;male +Twins;genderless \ No newline at end of file diff --git a/csvfiles/minioutfits.csv b/csvfiles/minioutfits.csv index b272ea4..7bb209c 100644 --- a/csvfiles/minioutfits.csv +++ b/csvfiles/minioutfits.csv @@ -4,4 +4,5 @@ armor dress suit robe -costume \ No newline at end of file +costume +tunic \ No newline at end of file diff --git a/csvfiles/patterns.csv b/csvfiles/patterns.csv index 7860dac..0f42f4c 100644 --- a/csvfiles/patterns.csv +++ b/csvfiles/patterns.csv @@ -61,4 +61,10 @@ zalij Dots Dotted swiss smooth -Edgy \ No newline at end of file +Edgy +Safari +Intecrate metal +Intecrate +Organic +Wavy +Crystal \ No newline at end of file diff --git a/csvfiles/rpgclasses.csv b/csvfiles/rpgclasses.csv index 808e58a..35f788d 100644 --- a/csvfiles/rpgclasses.csv +++ b/csvfiles/rpgclasses.csv @@ -17,4 +17,6 @@ Dwarf Knight God Goddess -Alien \ No newline at end of file +Alien +Ninja +Bard \ No newline at end of file diff --git a/csvfiles/special_lists/humanadditions.csv b/csvfiles/special_lists/humanadditions.csv index 6139db5..91b9c9c 100644 --- a/csvfiles/special_lists/humanadditions.csv +++ b/csvfiles/special_lists/humanadditions.csv @@ -7,7 +7,7 @@ OR(and;holding hands with) -human- cosplaying as -fictional- with OR(-color-;-material-) skin OR(feeling;expression is) -mood- --miniactivity- OR(in;at) a (-location-;-building-;-waterlocation-) +-miniactivity- OR(in;at) a OR(-location-;-building-;-waterlocation-) wearing -elaborateoutfit- - OR(-animal-;-humanoid-) OR(;hybrid;normal) as -culture- -rpgclass- diff --git a/csvfiles/vomit.csv b/csvfiles/vomit.csv index 3f907cf..93e2a8a 100644 --- a/csvfiles/vomit.csv +++ b/csvfiles/vomit.csv @@ -115,4 +115,5 @@ underpainting vibrant vignette vintage -Zentangle \ No newline at end of file +Zentangle +Liminal dream \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 32bcfc1..0013686 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,4 +51,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,5,"all","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","-objecttotal- covered in -covering-",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(10,5,"all","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 70227d992c7664fc210154606ae5dc52e3726b6c Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sun, 24 Sep 2023 07:57:47 +0200 Subject: [PATCH 08/42] prepwork for additional natural language --- build_dynamic_prompt.py | 37 +++++++++++++++++++++----- csv_reader.py | 4 +-- csvfiles/special_lists/buildoutfit.csv | 12 ++++----- prompttester.py | 2 +- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 07bd1d9..5e6957f 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -36,6 +36,13 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # clean up antivalue list: antilist = [s.strip().lower() for s in antilist] + # Some tricks for gender to make sure we can choose Him/Her/It etc on the right time. + if(gender=="all"): + genderchoicelist = ["male", "female"] + gender == random.choice(genderchoicelist) + heshelist = ["it"] + hisherlist = ["it's"] + # build all lists here colorlist = csv_to_list("colors",antilist) @@ -962,7 +969,17 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(subtypeconcept == "names from card based games"): subjectchooser = "cardname" + # After we chose the subject, lets set all things ready for He/She/It etc + if(subjectchooser in ["human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + if(gender == "male"): + heshelist = ["he"] + hisherlist = ["his"] + if(gender == "female"): + heshelist = ["she"] + hisherlist = ["her"] + + # special modes @@ -1584,7 +1601,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # outfit builder if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, outfitchance) and generateoutfit == True and humanspecial != 1): - completeprompt += ", wearing " + random.choice(buildoutfitlist) + ", " + completeprompt += ", " + random.choice(buildoutfitlist) + ", " if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, posechance) and humanspecial != 1 and generatepose == True): completeprompt += random.choice(poselist) + ", " @@ -1926,8 +1943,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all - - # completeprompt = parse_custom_functions(completeprompt, insanitylevel) + # In front and the back? + completeprompt = parse_custom_functions(completeprompt, insanitylevel) @@ -2022,9 +2039,11 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-animalsuffixaddition-" in completeprompt or "-chair-" in completeprompt or "-cardname-" in completeprompt or - "-covering-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-"] - 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist] + "-covering-" in completeprompt or + "-heshe-" in completeprompt or + "-hisher-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-"] + 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2619,6 +2638,12 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy else: replacementvalue = "" + + # Sneaky overrides for "same" wildcards + # Are overwritten with their first parent + if(wildcard == "-outfit-" or wildcard == "-minioutfit-"): + completeprompt = completeprompt.replace("-sameoutfit-", replacementvalue,1) + completeprompt = completeprompt.replace(wildcard, replacementvalue,1) diff --git a/csv_reader.py b/csv_reader.py index 4066fbf..87d8588 100644 --- a/csv_reader.py +++ b/csv_reader.py @@ -48,7 +48,7 @@ def csv_to_list(csvfilename, antilist=[], directory="./csvfiles/", lowerandstrip for row in reader: value = row[0] if( - (gender != "all" and row[1] == gender) + gender != "all" and (row[1] == gender or row[1] == "genderless" or row[1] == "both") or gender == "all" ): if(value.lower().strip() not in antilist): @@ -70,7 +70,7 @@ def csv_to_list(csvfilename, antilist=[], directory="./csvfiles/", lowerandstrip for row in reader: value = row[0] if( - (gender != "all" and row[1] == gender) + gender != "all" and (row[1] == gender or row[1] == "genderless" or row[1] == "both") or gender == "all" ): if(value.lower().strip() not in antilist): diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index f8b4ae6..c623b8f 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -1,6 +1,6 @@ -OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- -OR(;-descriptor-;normal) OR(;-descriptor-;uncommon) OR(;-color-;uncommon) -outfit- -OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) -OR(;-descriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) -OR(-material-;-color-) -OR(;-descriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- \ No newline at end of file +OR(wearing;dressed in;in;normal) OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- +OR(wearing;dressed in;in;normal) OR(;-descriptor-;normal) OR(;-descriptor-;uncommon) OR(;-color-;uncommon) -outfit- +OR(wearing;dressed in;in;normal) OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) +OR(wearing;dressed in;in;normal) OR(;-descriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) +wearing OR(-material-;-color-) +OR(wearing;dressed in;in;normal) OR(;-descriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- diff --git a/prompttester.py b/prompttester.py index 0013686..1c8ecc4 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,4 +51,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,5,"all","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(10,5,"humanoid","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT -sameoutfit-","",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 18917ff16663cc052a6e04920e6c604059af0ecd Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sun, 24 Sep 2023 08:38:35 +0200 Subject: [PATCH 09/42] outfit builder --- build_dynamic_prompt.py | 16 +++++++++++----- csvfiles/special_lists/buildoutfit.csv | 15 +++++++++------ prompttester.py | 4 +++- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 5e6957f..e83e59f 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -39,9 +39,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # Some tricks for gender to make sure we can choose Him/Her/It etc on the right time. if(gender=="all"): genderchoicelist = ["male", "female"] - gender == random.choice(genderchoicelist) + gender = random.choice(genderchoicelist) heshelist = ["it"] hisherlist = ["it's"] + himherlist = ["it"] # build all lists here @@ -971,12 +972,16 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # After we chose the subject, lets set all things ready for He/She/It etc if(subjectchooser in ["human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + print("HELLO") + print(gender) if(gender == "male"): heshelist = ["he"] hisherlist = ["his"] + himherlist = ["him"] if(gender == "female"): heshelist = ["she"] hisherlist = ["her"] + himherlist = ["her"] @@ -1601,7 +1606,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # outfit builder if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, outfitchance) and generateoutfit == True and humanspecial != 1): - completeprompt += ", " + random.choice(buildoutfitlist) + ", " + completeprompt += " " + random.choice(buildoutfitlist) + ", " if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, posechance) and humanspecial != 1 and generatepose == True): completeprompt += random.choice(poselist) + ", " @@ -2041,9 +2046,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-cardname-" in completeprompt or "-covering-" in completeprompt or "-heshe-" in completeprompt or - "-hisher-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-"] - 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist] + "-hisher-" in completeprompt or + "-himher-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-"] + 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index c623b8f..3dc63c2 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -1,6 +1,9 @@ -OR(wearing;dressed in;in;normal) OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- -OR(wearing;dressed in;in;normal) OR(;-descriptor-;normal) OR(;-descriptor-;uncommon) OR(;-color-;uncommon) -outfit- -OR(wearing;dressed in;in;normal) OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) -OR(wearing;dressed in;in;normal) OR(;-descriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) -wearing OR(-material-;-color-) -OR(wearing;dressed in;in;normal) OR(;-descriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- +, OR(wearing;dressed in;in;normal) OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- +, OR(wearing;dressed in;in;normal) OR(;-descriptor-;normal) OR(;-descriptor-;uncommon) OR(;-color-;uncommon) -outfit- +, OR(wearing;dressed in;in;normal) OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) +, OR(wearing;dressed in;in;normal) OR(;-descriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) +, wearing OR(-material-;-color-) +, OR(wearing;dressed in;in;normal) OR(;-descriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- +. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -descriptor-;rare) -outfit-. OR(-hisher-;The;normal) -sameoutfit- is OR(-descriptor-;-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 -descriptor- on -himher-.;unique) +. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-. OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-descriptor-;-color-).;normal) OR(;.It looks -descriptor- on -himher-.;unique) +. -heshe- is OR(wearing a;dressed in a) OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired) by -brand-. It is OR(-descriptor-;-color-;normal) OR(;and OR(-descriptor-;-color-;normal);normal) OR(;. The -sameoutfit- looks -descriptor- on -himher-.;unique) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 1c8ecc4..91dabd8 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,4 +51,6 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,5,"humanoid","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT -sameoutfit-","",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(10,9,"humanoid","all","all",False,"","","PREFIXPROMPT" + ,"SUFFIXPROMPT . -heshe- is OR(wearing a;dressed in a) OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made) by -brand-. It is OR(-descriptor-;-color-;normal) OR(;and OR(-descriptor-;-color-;normal);normal). OR(;The -sameoutfit- looks -descriptor- on -himher-.;unique)" + ,"",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 4cafee14cf37bc9ec9fa16570b0679ea80dfa3d5 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Thu, 28 Sep 2023 22:09:16 +0200 Subject: [PATCH 10/42] more work and testing --- build_dynamic_prompt.py | 23 ++- csvfiles/descriptors.csv | 1 + csvfiles/jobs.csv | 3 +- csvfiles/outfitdescriptors.csv | 186 +++++++++++++++++++++++++ csvfiles/special_lists/buildoutfit.csv | 14 +- prompttester.py | 2 +- 6 files changed, 213 insertions(+), 16 deletions(-) create mode 100644 csvfiles/outfitdescriptors.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index e83e59f..522bb8b 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -113,6 +113,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all chairlist = csv_to_list("chairs", antilist) cardnamelist = csv_to_list("card_names", antilist) coveringlist = csv_to_list("coverings", antilist) + outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -1957,6 +1958,8 @@ 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) + if(rare_dist(insanitylevel)): # Use base outfit descriptor, until we are not. + completeprompt = completeprompt.replace("-outfitdescriptor-", "-descriptor-",1) @@ -2047,9 +2050,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-covering-" in completeprompt or "-heshe-" in completeprompt or "-hisher-" in completeprompt or - "-himher-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-"] - 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist] + "-himher-" in completeprompt or + "-outfitdescriptor-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-"] + 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2201,6 +2205,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender chairlist = csv_to_list("chairs", antilist) cardnamelist = csv_to_list("card_names", antilist) coveringlist = csv_to_list("coverings", antilist) + outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist + malefemalelist + manwomanlist + manwomanrelationlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -2371,6 +2376,9 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender if lowercase_combination in [x.lower() for x in descriptorlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -descriptor- ") + if lowercase_combination in [x.lower() for x in descriptorlist] and chance_roll(insanitylevel, "rare"): + prompt = prompt.replace(combination," -outfitdescriptor- ") + if lowercase_combination in [x.lower() for x in directionlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -direction- ") @@ -2577,9 +2585,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-pattern-" in completeprompt or "-chair-" in completeprompt or "-cardname-" in completeprompt or - "-covering-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-"] - 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist] + "-covering-" in completeprompt or + "-outfitdescriptor-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-"] + 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2640,7 +2649,7 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy replacementvalue = random.choice(listname) listname.remove(replacementvalue) if(wildcard == "-artist-"): - replacementvalue = "art by " + replacementvalue + replacementvalue = "OR(;art by; designed by; stylized by;common) " + replacementvalue else: replacementvalue = "" diff --git a/csvfiles/descriptors.csv b/csvfiles/descriptors.csv index bb1ba3b..122e69b 100644 --- a/csvfiles/descriptors.csv +++ b/csvfiles/descriptors.csv @@ -279,6 +279,7 @@ Handsome Happy Harsh Hateful +Haunted Heartless Heartwarming Heavenly diff --git a/csvfiles/jobs.csv b/csvfiles/jobs.csv index 800d8bd..b59335a 100644 --- a/csvfiles/jobs.csv +++ b/csvfiles/jobs.csv @@ -369,4 +369,5 @@ Idol Nerd Geek Muse -Ballerina \ No newline at end of file +Ballerina +Fighting game character \ No newline at end of file diff --git a/csvfiles/outfitdescriptors.csv b/csvfiles/outfitdescriptors.csv new file mode 100644 index 0000000..51f710b --- /dev/null +++ b/csvfiles/outfitdescriptors.csv @@ -0,0 +1,186 @@ +1600'S +1700'S +1800'S +1900'S +1920'S +1940'S +1950'S +1950S Suburbia +1960'S +1970'S +1980'S +1990'S +2000'S +Abstract +Absurd +Acclaimed +Adorable +Aesthetic +Aesthetically Pleasing +Alien +Alluring +Ancient +Angelic +Angular +Anime +Apocalyptic +Appealing +Arcane +Artistic +Astonishing +Asymmetrical +Attractive +Authentic +Avant-Garde +Average +Award-Winning +Awe-Inspiring +Awful +Baroque +Basic +Beautiful +Bewitching +Bioluminescent +Biomechanical +Biomorphic +Biophilic +Biopunk +Bizarre +Boring +Breathtaking +Bright +Captivating +Cartoony +Celestial +Charming +Chic +Classic +Colorful +Comely +Comfortable +Contemporary +Controversial +Cool +Cozy +Creative +Creepy +Crude +Cute +Cyberpunk +Cyborg +Daring +Decorative +Delicate +Detailed +Dieselpunk +Dirty +Divine +Drab +Dreamlike +Dreamy +Dull +Dynamic +Eclectic +Elegant +Enchanting +Enticing +Ethereal +Evocative +Exceptional +Exotic +Exquisite +Extraordinary +Fairy-Tale +Fantastical +Fashionable +Festive +Flirty +Flowery +Fluffy +Frilled +Funky +Fur-Trimmed +Geeky +Ghostly +Glam +Glamorous +Glittering +Glowing +Good +Gorgeous +Graceful +Grand +Great +Groovy +Handsome +Hideous +Historical +Holy +Hyper-Creative +Hyperdetailed +Illuminating +Imaginative +Impressive +Incredibly Detailed +Inspirational +Intricate +Kawaii +Layered +Light +Lovely +Luminescent +Luminous +Magical +Magnificent +Majestic +Metallic +Middle Aged +Minimalist +Mysterious +Mystical +Mythical +Nerdy +Noble +Otherworldly +Oversized +Playful +Pretty +Psychadelic +Radiant +Refined +Retrofuturistic +Revealing +Rich +Ridiculous +Robotic +Romantic +Ruined +Rustic +Satin +Saturated +Seductive +Sensual +Sexy +Shabby +Shabby Chic +Shiny +Silky +Simple +Sleek +Smart +Smooth +Snug +Soft +Stunning +Supersized +Surreal +Trendy +Tropical +Ugly +Unattractive +Unconventional +Velvet +Vibrant +Vintage +Vulgar +Worn-Out \ No newline at end of file diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index 3dc63c2..be9a076 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -1,9 +1,9 @@ -, OR(wearing;dressed in;in;normal) OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- -, OR(wearing;dressed in;in;normal) OR(;-descriptor-;normal) OR(;-descriptor-;uncommon) OR(;-color-;uncommon) -outfit- +, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- +, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit- , OR(wearing;dressed in;in;normal) OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) -, OR(wearing;dressed in;in;normal) OR(;-descriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) +, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) , wearing OR(-material-;-color-) -, OR(wearing;dressed in;in;normal) OR(;-descriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- -. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -descriptor-;rare) -outfit-. OR(-hisher-;The;normal) -sameoutfit- is OR(-descriptor-;-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 -descriptor- on -himher-.;unique) -. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-. OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-descriptor-;-color-).;normal) OR(;.It looks -descriptor- on -himher-.;unique) -. -heshe- is OR(wearing a;dressed in a) OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired) by -brand-. It is OR(-descriptor-;-color-;normal) OR(;and OR(-descriptor-;-color-;normal);normal) OR(;. The -sameoutfit- looks -descriptor- on -himher-.;unique) \ No newline at end of file +, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- +. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -outfit-. OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-) OR( OR(and has;. It has) OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- on it.; and is OR(made of;detailed with bits of) -material-;rare) OR(;.It looks -outfitdescriptor- on -himher-.;unique) +. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-. OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-).;normal) OR(;.It looks -outfitdescriptor- on -himher-.;unique) +. -heshe- is OR(wearing a;dressed in a) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired) by -brand-. It is OR(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;. The -sameoutfit- looks -outfitdescriptor- on -himher-.;unique) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 91dabd8..5ce3703 100644 --- a/prompttester.py +++ b/prompttester.py @@ -52,5 +52,5 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("All done!") generateprompts(10,9,"humanoid","all","all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT . -heshe- is OR(wearing a;dressed in a) OR(;-descriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made) by -brand-. It is OR(-descriptor-;-color-;normal) OR(;and OR(-descriptor-;-color-;normal);normal). OR(;The -sameoutfit- looks -descriptor- on -himher-.;unique)" + ,"SUFFIXPROMPT , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit-" ,"",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file From 47b2b0249e2c2897ccdf62c91c97fe9c0809993f Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Fri, 29 Sep 2023 09:43:13 +0200 Subject: [PATCH 11/42] Adding things for outfit override --- build_dynamic_prompt.py | 16 +++++++++++++--- csvfiles/outfitdescriptors.csv | 3 +++ csvfiles/special_lists/buildoutfit.csv | 4 ++-- prompttester.py | 12 +++++++----- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 522bb8b..f94815d 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="", imagemodechance = 20, gender = "all", subtypeobject="all", subtypehumanoid="all", subtypeconcept="all", advancedprompting=True, hardturnoffemojis=False, seed=-1): +def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all", imagetype = "all", onlyartists = False, antivalues = "", prefixprompt = "", suffixprompt ="",promptcompounderlevel ="1", seperator = "comma", givensubject="",smartsubject = True,giventypeofimage="", imagemodechance = 20, gender = "all", subtypeobject="all", subtypehumanoid="all", subtypeconcept="all", advancedprompting=True, hardturnoffemojis=False, seed=-1, overrideoutfit=""): # set seed # For use in ComfyUI (might bring to Automatic1111 as well) @@ -1608,6 +1608,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # outfit builder if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, outfitchance) and generateoutfit == True and humanspecial != 1): completeprompt += " " + random.choice(buildoutfitlist) + ", " + elif(overrideoutfit != ""): + completeprompt += " " + random.choice(buildoutfitlist) + ", " if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, posechance) and humanspecial != 1 and generatepose == True): completeprompt += random.choice(poselist) + ", " @@ -1957,11 +1959,19 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # first some manual stuff for outfit if(unique_dist(insanitylevel)): # sometimes, its just nice to have descriptor and a normal "outfit". We use mini outfits for this! - completeprompt = completeprompt.replace("-outfit-", "-minioutfit-",1) + completeprompt = completeprompt.replace("-outfit-", "-minioutfit-",1) if(rare_dist(insanitylevel)): # Use base outfit descriptor, until we are not. - completeprompt = completeprompt.replace("-outfitdescriptor-", "-descriptor-",1) + completeprompt = completeprompt.replace("-outfitdescriptor-", "-descriptor-",1) + if(overrideoutfit != ""): + completeprompt = completeprompt.replace("-sameoutfit-", overrideoutfit) + completeprompt = completeprompt.replace("-outfit-", overrideoutfit,1) + completeprompt = completeprompt.replace("-minioutfit-", overrideoutfit,1) + completeprompt = completeprompt.replace("-overrideoutfit-", overrideoutfit) + # If we don't have an override outfit, then remove this part + completeprompt = completeprompt.replace("-overrideoutfit-", "") + # lol, this needs a rewrite :D diff --git a/csvfiles/outfitdescriptors.csv b/csvfiles/outfitdescriptors.csv index 51f710b..0677309 100644 --- a/csvfiles/outfitdescriptors.csv +++ b/csvfiles/outfitdescriptors.csv @@ -125,6 +125,7 @@ Incredibly Detailed Inspirational Intricate Kawaii +Large Layered Light Lovely @@ -164,9 +165,11 @@ Sexy Shabby Shabby Chic Shiny +Short Silky Simple Sleek +Small Smart Smooth Snug diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index be9a076..6245758 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -2,8 +2,8 @@ , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit- , OR(wearing;dressed in;in;normal) OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) -, wearing OR(-material-;-color-) +, wearing OR(-material-;-color-) -overrideoutfit- , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- . -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -outfit-. OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-) OR( OR(and has;. It has) OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- on it.; and is OR(made of;detailed with bits of) -material-;rare) OR(;.It looks -outfitdescriptor- on -himher-.;unique) -. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-. OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-).;normal) OR(;.It looks -outfitdescriptor- on -himher-.;unique) +. -heshe- is OR(wearing;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-. OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-).;normal) OR(;.It looks -outfitdescriptor- on -himher-.;unique) . -heshe- is OR(wearing a;dressed in a) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired) by -brand-. It is OR(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;. The -sameoutfit- looks -outfitdescriptor- on -himher-.;unique) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 5ce3703..9424695 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="",imagemodechance=20, gender = "all", subtypeobject = "all", subtypehumanoid = "all", subtypeconcept = "all", advancedprompting = True, hardturnoffemojis=False): +def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", imagetype="all",onlyartists=False, workprompt="", antistring="",prefixprompt="", suffixprompt="", negativeprompt="",promptcompounderlevel = "1", seperator="comma",givensubject="",smartsubject=True,giventypeofimage="",imagemodechance=20, gender = "all", subtypeobject = "all", subtypehumanoid = "all", subtypeconcept = "all", advancedprompting = True, hardturnoffemojis=False, seed=0, overrideoutfit=""): loops = int(amount) # amount of images to generate steps = 0 @@ -18,7 +18,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im while steps < loops: # build prompt - result = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, onlyartists,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, subtypeobject, subtypehumanoid, subtypeconcept, advancedprompting, hardturnoffemojis) + result = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, onlyartists,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, subtypeobject, subtypehumanoid, subtypeconcept, advancedprompting, hardturnoffemojis, seed, overrideoutfit) print("") print("loop " + str(steps)) @@ -51,6 +51,8 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,9,"humanoid","all","all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit-" - ,"",1,"","",True,"",100, "all", "all", "all", "all", False, True) \ No newline at end of file +generateprompts(10,5,"all","all","all",False,"","","PREFIXPROMPT" + ,"SUFFIXPROMPT" + ,"",1,"","",True,"",100, "all", "all", "all", "all", False, True, 0 + , "armor" #outfit override + ) \ No newline at end of file From 54f1b3a1f35fac6d0916ade177ec78ca1542b95b Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:05:09 +0200 Subject: [PATCH 12/42] more list works --- csvfiles/special_lists/buildhair.csv | 5 +++-- csvfiles/special_lists/buildoutfit.csv | 3 ++- prompttester.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/csvfiles/special_lists/buildhair.csv b/csvfiles/special_lists/buildhair.csv index b957530..15ca09b 100644 --- a/csvfiles/special_lists/buildhair.csv +++ b/csvfiles/special_lists/buildhair.csv @@ -1,2 +1,3 @@ -OR(-haircolor-;-descriptor-;-culture-;uncommon) hair OR(styled as -hairstyle-;;rare) -OR(-haircolor-; -hairstyle-) OR(hairstyle;hair) \ No newline at end of file +OR(;-heshe- has;uncommon) OR(-haircolor-;-descriptor-;-culture-;uncommon) hair OR(styled as -hairstyle-;,;rare) +OR(;-heshe- has;uncommon) OR(-haircolor-; -hairstyle-) OR(hairstyle;hair) +, -hisher- hair is OR(-haircolor-;-descriptor-;-culture-;uncommon) OR(;and styled as -hairstyle-;rare) \ No newline at end of file diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index 6245758..764246b 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -1,9 +1,10 @@ , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit- +, 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(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) , wearing OR(-material-;-color-) -overrideoutfit- -, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- +, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print-. . -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -outfit-. OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-) OR( OR(and has;. It has) OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- on it.; and is OR(made of;detailed with bits of) -material-;rare) OR(;.It looks -outfitdescriptor- on -himher-.;unique) . -heshe- is OR(wearing;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-. OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-).;normal) OR(;.It looks -outfitdescriptor- on -himher-.;unique) . -heshe- is OR(wearing a;dressed in a) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired) by -brand-. It is OR(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;. The -sameoutfit- looks -outfitdescriptor- on -himher-.;unique) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 9424695..98328d7 100644 --- a/prompttester.py +++ b/prompttester.py @@ -52,7 +52,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("All done!") generateprompts(10,5,"all","all","all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT" + ,"SUFFIXPROMPT, -hisher- hair is OR(-haircolor-;-descriptor-;-culture-;uncommon) OR(;and styled as -hairstyle-;rare)" ,"",1,"","",True,"",100, "all", "all", "all", "all", False, True, 0 , "armor" #outfit override ) \ No newline at end of file From 4cde31e9f2c8d484dcfff9fd339d8a72258cc4ae Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Fri, 29 Sep 2023 16:39:34 +0200 Subject: [PATCH 13/42] Adding hair stuff and minor additions --- build_dynamic_prompt.py | 31 +- csvfiles/card_names.csv | 488 ++++++++++++++++++++- csvfiles/hairdescriptors.csv | 139 ++++++ csvfiles/manwomanrelations.csv | 3 +- csvfiles/outfitdescriptors.csv | 3 + csvfiles/special_lists/buildaccessorie.csv | 2 +- csvfiles/special_lists/buildhair.csv | 4 +- csvfiles/special_lists/buildoutfit.csv | 8 +- csvfiles/special_lists/humanadditions.csv | 29 +- prompttester.py | 11 +- 10 files changed, 666 insertions(+), 52 deletions(-) create mode 100644 csvfiles/hairdescriptors.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index f94815d..0d5e190 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -41,7 +41,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all genderchoicelist = ["male", "female"] gender = random.choice(genderchoicelist) heshelist = ["it"] - hisherlist = ["it's"] + hisherlist = ["its"] himherlist = ["it"] # build all lists here @@ -113,7 +113,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all chairlist = csv_to_list("chairs", antilist) cardnamelist = csv_to_list("card_names", antilist) coveringlist = csv_to_list("coverings", antilist) + + # additional descriptor lists outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) + hairdescriptorlist = csv_to_list("hairdescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -1954,7 +1957,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # In front and the back? completeprompt = parse_custom_functions(completeprompt, insanitylevel) - + # hair descriptor + if(rare_dist(insanitylevel)): # Use base outfit descriptor, until we are not. + completeprompt = completeprompt.replace("-hairdescriptor-", "-descriptor-",1) # first some manual stuff for outfit @@ -2061,9 +2066,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-heshe-" in completeprompt or "-hisher-" in completeprompt or "-himher-" in completeprompt or - "-outfitdescriptor-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-"] - 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist] + "-outfitdescriptor-" in completeprompt or + "-hairdescriptor-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-"] + 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2216,6 +2222,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender cardnamelist = csv_to_list("card_names", antilist) coveringlist = csv_to_list("coverings", antilist) outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) + hairdescriptorlist = csv_to_list("hairdescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist + malefemalelist + manwomanlist + manwomanrelationlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -2386,8 +2393,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender if lowercase_combination in [x.lower() for x in descriptorlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -descriptor- ") - if lowercase_combination in [x.lower() for x in descriptorlist] and chance_roll(insanitylevel, "rare"): + if lowercase_combination in [x.lower() for x in outfitdescriptorlist] and chance_roll(insanitylevel, "rare"): prompt = prompt.replace(combination," -outfitdescriptor- ") + if lowercase_combination in [x.lower() for x in hairdescriptorlist] and chance_roll(insanitylevel, "rare"): + prompt = prompt.replace(combination," -hairdescriptor- ") if lowercase_combination in [x.lower() for x in directionlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -direction- ") @@ -2596,9 +2605,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-chair-" in completeprompt or "-cardname-" in completeprompt or "-covering-" in completeprompt or - "-outfitdescriptor-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-"] - 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist] + "-outfitdescriptor-" in completeprompt or + "-hairdescriptor-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-"] + 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2657,7 +2667,8 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy #if list is not empty if(bool(listname)): replacementvalue = random.choice(listname) - listname.remove(replacementvalue) + if(wildcard not in ["-heshe-", "-himher-","-hisher-"]): + listname.remove(replacementvalue) if(wildcard == "-artist-"): replacementvalue = "OR(;art by; designed by; stylized by;common) " + replacementvalue diff --git a/csvfiles/card_names.csv b/csvfiles/card_names.csv index d0d4156..8aa0a96 100644 --- a/csvfiles/card_names.csv +++ b/csvfiles/card_names.csv @@ -10217,7 +10217,7 @@ Eli 1.0;Android netrunner Ruhr Valley;Android netrunner Ronin;Android netrunner Midori;Android netrunner -NBN: The World is Yours*;Android netrunner +NBN: The World is Yours;Android netrunner Project Beale;Android netrunner Midseason Replacements;Android netrunner Flare;Android netrunner @@ -17193,7 +17193,7 @@ Ice Queen;yugioh Shutendoji;yugioh Clear Vice Dragon;yugioh Darklord Desire;yugioh -Armityle the Chaos Phantasm (Updated from: Armityle the Chaos Phantom);yugioh +Armityle the Chaos Phantasm;yugioh Fusion Recovery;yugioh System Down;yugioh Grand Convergence;yugioh @@ -17317,7 +17317,7 @@ Decayed Commander;yugioh Zombie Tiger;yugioh Giant Orc;yugioh Second Goblin;yugioh -Vampiric Orchis (Updated from: Vampire Orchis);yugioh +Vampiric Orchis;yugioh Des Dendle;yugioh Burning Beast;yugioh Freezing Beast;yugioh @@ -17381,7 +17381,7 @@ Royal Magical Library;yugioh Armor Exe;yugioh Tribe-Infecting Virus;yugioh Des Koala;yugioh -Dark Scorpion - Cliff the Trap Remover (Updated from: Cliff the Trap Remover);yugioh +Dark Scorpion - Cliff the Trap Remover;yugioh Magical Merchant;yugioh Koitsu;yugioh Cat's Ear Tribe;yugioh @@ -17396,13 +17396,13 @@ Senri Eye;yugioh Emblem of Dragon Destroyer;yugioh Jar Robber;yugioh My Body as a Shield;yugioh -Spellbook Organization (Updated from: Pigeonholing Books of Spell);yugioh +Spellbook Organization;yugioh Mega Ton Magical Cannon;yugioh Pitch-Black Power Stone;yugioh Amazoness Archers;yugioh Dramatic Rescue;yugioh Exhausting Spell;yugioh -Hidden Spellbook (Updated from: Hidden Book of Spell);yugioh +Hidden Spellbook;yugioh Miracle Restoring;yugioh Remove Brainwashing;yugioh Disarmament;yugioh @@ -17469,7 +17469,7 @@ D.D. Trainer;yugioh Ojama Green;yugioh Archfiend Soldier;yugioh Pandemonium Watchbear;yugioh -Sasuke Samurai #2;yugioh +Sasuke Samurai ;yugioh Dark Scorpion - Gorg the Strong;yugioh Dark Scorpion - Meanae the Thorn;yugioh Outstanding Dog Marron;yugioh @@ -17706,9 +17706,9 @@ Giant Germ;yugioh Nimble Momonga;yugioh Shining Angel;yugioh Mother Grizzly;yugioh -Flying Kamakiri #1;yugioh +Flying Kamakiri ;yugioh Mystic Tomato;yugioh -Morphing Jar #2;yugioh +Morphing Jar ;yugioh Goddess of Whim;yugioh Kycoo the Ghost Destroyer;yugioh Summoner of Illusions;yugioh @@ -18166,7 +18166,7 @@ Friller Rabca;yugioh Vylon Ohm;yugioh Shocktopus;yugioh Chow Len the Prophet;yugioh -Vampiric Koala (Updated from: Vampire Koala);yugioh +Vampiric Koala;yugioh Flame Tiger;yugioh Tardy Orc;yugioh Madolche Baaple;yugioh @@ -18447,7 +18447,7 @@ Exarion Universe;yugioh Flame Manipulator;yugioh Masaki the Legendary Swordsman;yugioh Rude Kaiser;yugioh -Rock Ogre Grotto #1;yugioh +Rock Ogre Grotto ;yugioh Baby Dragon;yugioh Axe Raider;yugioh Tiger Axe;yugioh @@ -18492,7 +18492,7 @@ Red-Eyes Wyvern;yugioh Phoenix Gearfried;yugioh Lightray Gearfried;yugioh Flame Swordsman;yugioh -Black Skull Dragon (Updated from: B. Skull Dragon);yugioh +Black Skull Dragon;yugioh Thousand Dragon;yugioh Alligator's Sword Dragon;yugioh Hinotama;yugioh @@ -18529,7 +18529,7 @@ Jam Defender;yugioh Relieve Monster;yugioh Metal Reflect Slime;yugioh Serpent Night Dragon;yugioh -Crawling Dragon #2;yugioh +Crawling Dragon ;yugioh Sabersaurus;yugioh Tomozaurus;yugioh Little D;yugioh @@ -18567,7 +18567,7 @@ Fiendish Engine Ω;yugioh Dragon Zombie;yugioh Armored Zombie;yugioh The Snake Hair;yugioh -Vampire Baby (Updated from: Red-Moon Baby);yugioh +Vampire Baby;yugioh Patrician of Darkness;yugioh Dark Dust Spirit;yugioh Vampire Lord;yugioh @@ -18768,7 +18768,7 @@ The Unhappy Maiden;yugioh Robbin' Goblin;yugioh Ring of Magnetism;yugioh Share the Pain;yugioh -Wattkid (Updated from: Oscillo Hero #2);yugioh +Wattkid;yugioh Soul of the Pure;yugioh Dark-Piercing Light;yugioh The Statue of Easter Island;yugioh @@ -18789,7 +18789,7 @@ Dark Ruler Ha Des;yugioh Dark Balter the Terrible;yugioh Possessed Dark Soul;yugioh Winged Minion;yugioh -Skull Knight #2;yugioh +Skull Knight ;yugioh Twin-Headed Wolf;yugioh Opticlops;yugioh Fatal Abacus;yugioh @@ -18812,7 +18812,7 @@ Troop Dragon;yugioh The Dragon's Bead;yugioh A Wingbeat of Giant Dragon;yugioh Dragon's Rage;yugioh -Luster Dragon #2;yugioh +Luster Dragon ;yugioh Serpentine Princess;yugioh Thunder Nyan Nyan;yugioh Gradius' Option;yugioh @@ -20028,3 +20028,457 @@ Keepstone;monster train Stackstone;monster train Spell Railspike;monster train Improved Railspike;monster train +Beginner Corporation;terraforming mars +CrediCor;terraforming mars +Ecoline;terraforming mars +Helion;terraforming mars +Interplanetary Cinematics;terraforming mars +Inventrix;terraforming mars +Mining Guild;terraforming mars +PhoboLog;terraforming mars +Tharsis Republic;terraforming mars +ThorGate;terraforming mars +United Nations Mars Initiative;terraforming mars +Saturn Systems;terraforming mars +Teractor;terraforming mars +Aphrodite;terraforming mars +Celestic;terraforming mars +Manutech;terraforming mars +Morning Star Inc.;terraforming mars +Viron;terraforming mars +Cheung Shing Mars;terraforming mars +Point Luna;terraforming mars +Robinson Industries;terraforming mars +Valley Trust;terraforming mars +Vitor;terraforming mars +Aridor;terraforming mars +Arklight;terraforming mars +Polyphemos;terraforming mars +Poseidon;terraforming mars +Stormcraft Incorporated;terraforming mars +Lakefront Resorts;terraforming mars +Pristar;terraforming mars +Septem Tribus;terraforming mars +TerraLabs Research;terraforming mars +Utopia Invest;terraforming mars +Arcadian Communities;terraforming mars +Recyclon;terraforming mars +Splice Tactical Genomics;terraforming mars +Factorum;terraforming mars +Mons Insurance;terraforming mars +Philares;terraforming mars +AstroDrill;terraforming mars +Pharmacy Union;terraforming mars +Allied Bank;terraforming mars +Aquifer Turbines;terraforming mars +Biofuels;terraforming mars +Biolab;terraforming mars +Biosphere Support;terraforming mars +Business Empire;terraforming mars +Dome Farming;terraforming mars +Donation;terraforming mars +Early Settlement;terraforming mars +Ecology Experts;terraforming mars +Excentric Sponsor;terraforming mars +Experimental Forest;terraforming mars +Galilean Mining;terraforming mars +Great Aquifer;terraforming mars +Huge Asteroid;terraforming mars +Io Research Outpost;terraforming mars +Loan;terraforming mars +Martian Industries;terraforming mars +Metal-Rich Asteroid;terraforming mars +Metals Company;terraforming mars +Mining Operations;terraforming mars +Mohole;terraforming mars +Mohole Excavation;terraforming mars +Nitrogen Shipment;terraforming mars +Orbital Construction Yard;terraforming mars +Polar Industries;terraforming mars +Power Generation;terraforming mars +Research Network;terraforming mars +Self-Sufficient Settlement;terraforming mars +Smelting Plant;terraforming mars +Society Support;terraforming mars +Supplier;terraforming mars +Supply Drop;terraforming mars +UNMI Contractor;terraforming mars +Acquired Space Agency;terraforming mars +Colonizer Training Camp;terraforming mars +Deep Well Heating;terraforming mars +Cloud Seeding;terraforming mars +Search For Life;terraforming mars +Martian Rails;terraforming mars +Capital;terraforming mars +Asteroid;terraforming mars +Comet;terraforming mars +Big Asteroid;terraforming mars +Water Import From Europa;terraforming mars +Equatorial Magnetizer;terraforming mars +Domed Crater;terraforming mars +Noctis City;terraforming mars +Methane From Titan;terraforming mars +Imported Hydrogen;terraforming mars +Research Outpost;terraforming mars +Phobos Space Haven;terraforming mars +Black Polar Dust;terraforming mars +Arctic Algae;terraforming mars +Predators;terraforming mars +Eos Chasma National Park;terraforming mars +Cupola City;terraforming mars +Lunar Beam;terraforming mars +Optimal Aerobraking;terraforming mars +Underground City;terraforming mars +Regolith Eaters;terraforming mars +GHG Producing Bacteria;terraforming mars +Ants;terraforming mars +Release Of Inert Gases;terraforming mars +Nitrogen-Rich Asteroid;terraforming mars +Rover Construction;terraforming mars +Deimos Down;terraforming mars +Asteroid Mining;terraforming mars +Food Factory;terraforming mars +Archaebacteria;terraforming mars +Carbonate Processing;terraforming mars +Natural Preserve;terraforming mars +Nuclear Power;terraforming mars +Algae;terraforming mars +Adapted Lichen;terraforming mars +Fish;terraforming mars +Lake Marineris;terraforming mars +Small Animals;terraforming mars +Kelp Farming;terraforming mars +Beam From A Thorium Asteroid;terraforming mars +Mangrove;terraforming mars +Trees;terraforming mars +Mining Expedition;terraforming mars +Mining Rights;terraforming mars +Birds;terraforming mars +Towing A Comet;terraforming mars +Space Mirrors;terraforming mars +Solar Wind Power;terraforming mars +Ice Asteroid;terraforming mars +Giant Ice Asteroid;terraforming mars +Ganymede Colony;terraforming mars +Giant Space Mirror;terraforming mars +Grass;terraforming mars +Heather;terraforming mars +Peroxide Power;terraforming mars +Bushes;terraforming mars +Greenhouses;terraforming mars +Nuclear Zone;terraforming mars +Fueled Generators;terraforming mars +Ironworks;terraforming mars +Power Grid;terraforming mars +Steelworks;terraforming mars +Ore Processor;terraforming mars +Open City;terraforming mars +Solar Power;terraforming mars +Breathing Filters;terraforming mars +Artificial Photosynthesis;terraforming mars +Artificial Lake;terraforming mars +Geothermal Power;terraforming mars +Farming;terraforming mars +Dust Seals;terraforming mars +Urbanized Area;terraforming mars +Moss;terraforming mars +GHG Factories;terraforming mars +Subterranean Reservoir;terraforming mars +Ecological Zone;terraforming mars +Zeppelins;terraforming mars +Worms;terraforming mars +Decomposers;terraforming mars +Fusion Power;terraforming mars +Symbiotic Fungus;terraforming mars +Extreme-Cold Fungus;terraforming mars +Advanced Ecosystems;terraforming mars +Great Dam;terraforming mars +Strip Mine;terraforming mars +Wave Power;terraforming mars +Lava Flows;terraforming mars +Power Plant;terraforming mars +Mohole Area;terraforming mars +Large Convoy;terraforming mars +Tectonic Stress Power;terraforming mars +Nitrophilic Moss;terraforming mars +Herbivores;terraforming mars +Insects;terraforming mars +Insulation;terraforming mars +Adaptation Technology;terraforming mars +Designed Microorganisms;terraforming mars +Nitrite Reducing Bacteria;terraforming mars +Industrial Microbes;terraforming mars +Lichen;terraforming mars +Convoy From Europa;terraforming mars +Imported GHG;terraforming mars +Imported Nitrogen;terraforming mars +Micro-Mills;terraforming mars +Magnetic Field Generators;terraforming mars +Shuttles;terraforming mars +Import Of Advanced GHG;terraforming mars +Windmills;terraforming mars +Tundra Farming;terraforming mars +Aerobraked Ammonia Asteroid;terraforming mars +Magnetic Field Dome;terraforming mars +Pets;terraforming mars +Protected Valley;terraforming mars +Noctis Farming;terraforming mars +Water Splitting Plant;terraforming mars +Heat Trappers;terraforming mars +Soil Factory;terraforming mars +Ice Cap Melting;terraforming mars +Biomass Combustors;terraforming mars +Livestock;terraforming mars +Aquifer Pumping;terraforming mars +Flooding;terraforming mars +Energy Saving;terraforming mars +Local Heat Trapping;terraforming mars +Permafrost Extraction;terraforming mars +Plantation;terraforming mars +Immigration Shuttles;terraforming mars +Immigrant City;terraforming mars +Underground Detonations;terraforming mars +Soletta;terraforming mars +Rad-Chem Factory;terraforming mars +Special Design;terraforming mars +Asteroid Mining Consortium;terraforming mars +Inventors' Guild;terraforming mars +Space Elevator;terraforming mars +Development Center;terraforming mars +Space Station;terraforming mars +Interstellar Colony Ship;terraforming mars +Security Fleet;terraforming mars +Lightning Harvest;terraforming mars +Tardigrades;terraforming mars +Virus;terraforming mars +Miranda Resort;terraforming mars +Mine;terraforming mars +Vesta Shipyard;terraforming mars +Great Escarpment Consortium;terraforming mars +Mineral Deposit;terraforming mars +Mining Area;terraforming mars +Building Industries;terraforming mars +Land Claim;terraforming mars +Sponsors;terraforming mars +Electro Catapult;terraforming mars +Earth Catapult;terraforming mars +Advanced Alloys;terraforming mars +Mars University;terraforming mars +Viral Enhancers;terraforming mars +Quantum Extractor;terraforming mars +Callisto Penal Mines;terraforming mars +Trans-Neptune Probe;terraforming mars +Commercial District;terraforming mars +Robotic Workforce;terraforming mars +Research;terraforming mars +Gene Repair;terraforming mars +Io Mining Industries;terraforming mars +Mass Converter;terraforming mars +Physics Complex;terraforming mars +Tropical Resort;terraforming mars +Toll Station;terraforming mars +Earth Office;terraforming mars +Acquired Company;terraforming mars +Media Archives;terraforming mars +Media Group;terraforming mars +Business Network;terraforming mars +Business Contacts;terraforming mars +Bribed Committee;terraforming mars +Sabotage;terraforming mars +Industrial Center;terraforming mars +Hired Raiders;terraforming mars +Hackers;terraforming mars +Cartel;terraforming mars +Titanium Mine;terraforming mars +CEO's Favorite Project;terraforming mars +Anti-Gravity Technology;terraforming mars +Investment Loan;terraforming mars +Caretaker Contract;terraforming mars +Standard Technology;terraforming mars +Power Supply Consortium;terraforming mars +Protected Habitats;terraforming mars +Satellites;terraforming mars +Fuel Factory;terraforming mars +Corporate Stronghold;terraforming mars +Olympus Conference;terraforming mars +Rad-Suits;terraforming mars +Invention Contest;terraforming mars +Power Infrastructure;terraforming mars +Indentured Workers;terraforming mars +Lagrange Observatory;terraforming mars +Terraforming Ganymede;terraforming mars +Restricted Area;terraforming mars +Energy Tapping;terraforming mars +Technology Demonstration;terraforming mars +Medical Lab;terraforming mars +AI Central;terraforming mars +Small Asteroid;terraforming mars +Self-Replicating Robots;terraforming mars +Snow Algae;terraforming mars +Penguins;terraforming mars +Aerial Mappers;terraforming mars +Aerosport Tournament;terraforming mars +Air-Scrapping Expedition;terraforming mars +Atalanta Planitia Lab;terraforming mars +Atmoscoop;terraforming mars +Comet For Venus;terraforming mars +Corroder Suits;terraforming mars +Dawn City;terraforming mars +Deuterium Export;terraforming mars +Dirigibles;terraforming mars +Extractor Balloons;terraforming mars +Extremophiles;terraforming mars +Floating Habs;terraforming mars +Forced Precipitation;terraforming mars +Freyja Biodomes;terraforming mars +GHG Import From Venus;terraforming mars +Giant Solar Shade;terraforming mars +Gyropolis;terraforming mars +Hydrogen To Venus;terraforming mars +Io Sulphur Research;terraforming mars +Ishtar Mining;terraforming mars +Jet Stream Microscrappers;terraforming mars +Local Shading;terraforming mars +Luna Metropolis;terraforming mars +Luxury Foods;terraforming mars +Maxwell Base;terraforming mars +Mining Quota;terraforming mars +Neutralizer Factory;terraforming mars +Omnicourt;terraforming mars +Orbital Reflectors;terraforming mars +Rotator Impacts;terraforming mars +Sister Planet Support;terraforming mars +Solarnet;terraforming mars +Spin-Inducing Asteroid;terraforming mars +Sponsored Academies;terraforming mars +Stratopolis;terraforming mars +Stratospheric Birds;terraforming mars +Sulphur Exports;terraforming mars +Sulphur-Eating Bacteria;terraforming mars +Terraforming Contract;terraforming mars +Thermophiles;terraforming mars +Water To Venus;terraforming mars +Venus Governor;terraforming mars +Venus Magnetizer;terraforming mars +Venus Soils;terraforming mars +Venus Waystation;terraforming mars +Venusian Animals;terraforming mars +Venusian Insects;terraforming mars +Venusian Plants;terraforming mars +House Printing;terraforming mars +Lava Tube Settlement;terraforming mars +Martian Survey;terraforming mars +Psychrophiles;terraforming mars +Research Coordination;terraforming mars +SF Memorial;terraforming mars +Space Hotels;terraforming mars +Airliners;terraforming mars +Air Raid;terraforming mars +Atmo Collectors;terraforming mars +Community Services;terraforming mars +Conscription;terraforming mars +Corona Extractor;terraforming mars +Cryo-Sleep;terraforming mars +Earth Elevator;terraforming mars +Ecology Research;terraforming mars +Floater Leasing;terraforming mars +Floater Prototypes;terraforming mars +Floater Technology;terraforming mars +Galilean Waystation;terraforming mars +Heavy Taxation;terraforming mars +Ice Moon Colony;terraforming mars +Impactor Swarm;terraforming mars +Interplanetary Colony Ship;terraforming mars +Jovian Lanterns;terraforming mars +Jupiter Floating Station;terraforming mars +Luna Governor;terraforming mars +Lunar Exports;terraforming mars +Lunar Mining;terraforming mars +Market Manipulation;terraforming mars +Martian Zoo;terraforming mars +Mining Colony;terraforming mars +Minority Refuge;terraforming mars +Molecular Printing;terraforming mars +Nitrogen From Titan;terraforming mars +Pioneer Settlement;terraforming mars +Productive Outpost;terraforming mars +Quantum Communications;terraforming mars +Red Spot Observatory;terraforming mars +Refugee Camps;terraforming mars +Research Colony;terraforming mars +Rim Freighters;terraforming mars +Sky Docks;terraforming mars +Solar Probe;terraforming mars +Solar Reflectors;terraforming mars +Space Port;terraforming mars +Space Port Colony;terraforming mars +Spin-Off Department;terraforming mars +Sub-Zero Salt Fish;terraforming mars +Titan Air-Scrapping;terraforming mars +Titan Floating Launch-Pad;terraforming mars +Titan Shuttles;terraforming mars +Trade Envoys;terraforming mars +Trading Colony;terraforming mars +Urban Decomposers;terraforming mars +Warp Drive;terraforming mars +Aerial Lenses;terraforming mars +Banned Delegate;terraforming mars +Cultural Metropolis;terraforming mars +Diaspora Movement;terraforming mars +Event Analysts;terraforming mars +GMO Contract;terraforming mars +Martian Media Center;terraforming mars +Parliament Hall;terraforming mars +PR Office;terraforming mars +Public Celebrations;terraforming mars +Recruitment;terraforming mars +Red Tourism Wave;terraforming mars +Sponsored Mohole;terraforming mars +Supported Research;terraforming mars +Wildlife Dome;terraforming mars +Vote Of No Confidence;terraforming mars +Dusk Laser Mining;terraforming mars +Project Inspection;terraforming mars +Energy Market;terraforming mars +Hi-Tech Lab;terraforming mars +Interplanetary Trade;terraforming mars +Law Suit;terraforming mars +Mercurian Alloys;terraforming mars +Orbital Cleanup;terraforming mars +Political Alliance;terraforming mars +Rego Plastics;terraforming mars +Saturn Surfing;terraforming mars +Stanford Torus;terraforming mars +Advertising;terraforming mars +Asteroid Deflection System;terraforming mars +Asteroid Hollowing;terraforming mars +Comet Aiming;terraforming mars +Crash Site Cleanup;terraforming mars +Cutting Edge Technology;terraforming mars +Directed Impactors;terraforming mars +Diversity Support;terraforming mars +Field-Capped City;terraforming mars +Imported Nutrients;terraforming mars +Jovian Embassy;terraforming mars +Magnetic Shield;terraforming mars +Meat Industry;terraforming mars +Meltworks;terraforming mars +Mohole Lake;terraforming mars +Potatoes;terraforming mars +Sub-Crust Measurements;terraforming mars +Topsoil Contract;terraforming mars +Deimos Down;terraforming mars +Great Dam;terraforming mars +Magnetic Field Generators;terraforming mars +Asteroid Rights;terraforming mars +Bio Printing Facility;terraforming mars +Bactoviral Research;terraforming mars +Harvest;terraforming mars +Outdoor Sports;terraforming mars +New Partner;terraforming mars +Merger;terraforming mars +Corporate Archives;terraforming mars +Double Down;terraforming mars +Head Start;terraforming mars +16 Psyche;terraforming mars +Robot Pollinators;terraforming mars \ No newline at end of file diff --git a/csvfiles/hairdescriptors.csv b/csvfiles/hairdescriptors.csv new file mode 100644 index 0000000..1d8f13e --- /dev/null +++ b/csvfiles/hairdescriptors.csv @@ -0,0 +1,139 @@ +1600'S +1700'S +1800'S +1900'S +1920'S +1940'S +1950'S +1960'S +1970'S +1980'S +1990'S +2000'S +Abstract +Absurd +Adorable +Aesthetic +Aesthetically Pleasing +Alluring +Ancient +Angelic +Angular +Anime +Apocalyptic +Appealing +Arcane +Artistic +Astonishing +Asymmetrical +Attractive +Authentic +Avant-Garde +Average +Award-Winning +Awe-Inspiring +Awful +Baroque +Basic +Beautiful +Bewitching +Bioluminescent +Bizarre +Boring +Breathtaking +Bright +Captivating +Celestial +Charming +Chic +Classic +Colorful +Comely +Contemporary +Cool +Creative +Curly +Cute +Daring +Delicate +Dirty +Divine +Drab +Dreamlike +Dreamy +Dull +Dynamic +Eclectic +Elegant +Enchanting +Enticing +Ethereal +Evocative +Exceptional +Exotic +Exquisite +Extraordinary +Fairy-Tale +Fantastical +Fashionable +Fluffy +Flowing +Funky +Geeky +Glam +Glamorous +Glittering +Glowing +Good +Gorgeous +Graceful +Grand +Great +Groovy +Handsome +Hideous +Holy +Hyperdetailed +Illuminating +Imaginative +Impressive +Incredibly Detailed +Inspirational +Intricate +Kawaii +Large +Layered +Light +Lovely +Luminescent +Luminous +Magical +Magnificent +Majestic +Messy +Mysterious +Mystical +Mythical +Nerdy +Noble +Otherworldly +Pretty +Radiant +Really long +Refined +Retrofuturistic +Ruined +Shiny +Silky +Simple +Stunning +Surreal +Trendy +Tropical +Ugly +Unattractive +Unconventional +Voluminous +Vibrant +Vintage +Wavy \ No newline at end of file diff --git a/csvfiles/manwomanrelations.csv b/csvfiles/manwomanrelations.csv index e77b9fc..2499b29 100644 --- a/csvfiles/manwomanrelations.csv +++ b/csvfiles/manwomanrelations.csv @@ -13,4 +13,5 @@ Wife;female Husband;male Girlfriend;female Boyfriend;male -Twins;genderless \ No newline at end of file +Twins;genderless +Couple;genderless \ No newline at end of file diff --git a/csvfiles/outfitdescriptors.csv b/csvfiles/outfitdescriptors.csv index 0677309..7771eb2 100644 --- a/csvfiles/outfitdescriptors.csv +++ b/csvfiles/outfitdescriptors.csv @@ -95,6 +95,7 @@ Fantastical Fashionable Festive Flirty +Flowing Flowery Fluffy Frilled @@ -125,6 +126,7 @@ Incredibly Detailed Inspirational Intricate Kawaii +Lace Large Layered Light @@ -177,6 +179,7 @@ Soft Stunning Supersized Surreal +Tight Trendy Tropical Ugly diff --git a/csvfiles/special_lists/buildaccessorie.csv b/csvfiles/special_lists/buildaccessorie.csv index 548bf0f..d15011e 100644 --- a/csvfiles/special_lists/buildaccessorie.csv +++ b/csvfiles/special_lists/buildaccessorie.csv @@ -1 +1 @@ -OR(;-descriptor-;normal) OR(;-culture-;uncommon) OR(;-color-;uncommon) -accessory- OR(; , -accessory-; , -descriptor- -accessory-;rare) OR(; and -accessory-;unique) \ No newline at end of file +OR(;-heshe- has a;rare) OR(;-descriptor-;normal) OR(;-culture-;uncommon) OR(;-color-;uncommon) -accessory- OR(; , -accessory-; , -descriptor- -accessory-;rare) OR(; and -accessory-;unique) \ No newline at end of file diff --git a/csvfiles/special_lists/buildhair.csv b/csvfiles/special_lists/buildhair.csv index 15ca09b..0533cd5 100644 --- a/csvfiles/special_lists/buildhair.csv +++ b/csvfiles/special_lists/buildhair.csv @@ -1,3 +1,3 @@ -OR(;-heshe- has;uncommon) OR(-haircolor-;-descriptor-;-culture-;uncommon) hair OR(styled as -hairstyle-;,;rare) +OR(;-heshe- has;uncommon) OR(-haircolor-;-hairdescriptor-;-culture-;uncommon) hair OR(styled as -hairstyle-;,;rare) OR(;-heshe- has;uncommon) OR(-haircolor-; -hairstyle-) OR(hairstyle;hair) -, -hisher- hair is OR(-haircolor-;-descriptor-;-culture-;uncommon) OR(;and styled as -hairstyle-;rare) \ No newline at end of file +, -hisher- hair is OR(-haircolor-;-hairdescriptor-;-culture-;uncommon) OR(;and styled as -hairstyle-;rare) \ No newline at end of file diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index 764246b..233da67 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -4,7 +4,7 @@ , OR(wearing;dressed in;in;normal) OR(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) , wearing OR(-material-;-color-) -overrideoutfit- -, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print-. -. -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -outfit-. OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-) OR( OR(and has;. It has) OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- on it.; and is OR(made of;detailed with bits of) -material-;rare) OR(;.It looks -outfitdescriptor- on -himher-.;unique) -. -heshe- is OR(wearing;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-. OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-).;normal) OR(;.It looks -outfitdescriptor- on -himher-.;unique) -. -heshe- is OR(wearing a;dressed in a) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired) by -brand-. It is OR(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;. The -sameoutfit- looks -outfitdescriptor- on -himher-.;unique) \ No newline at end of file +, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print-, +, -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -outfit-, OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-) OR( OR(and has;, It has) OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- on it,; and is OR(made of;detailed with bits of) -material-;rare) OR(;,It looks -outfitdescriptor- on -himher-,;unique) +, -heshe- is OR(wearing;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-, OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-),;normal) OR(;,It looks -outfitdescriptor- on -himher-,;unique) +, -heshe- is OR(wearing a;dressed in a) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired) by -brand-, It is OR(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;, The -sameoutfit- looks -outfitdescriptor- on -himher-,;unique) \ No newline at end of file diff --git a/csvfiles/special_lists/humanadditions.csv b/csvfiles/special_lists/humanadditions.csv index 91b9c9c..5667cea 100644 --- a/csvfiles/special_lists/humanadditions.csv +++ b/csvfiles/special_lists/humanadditions.csv @@ -1,15 +1,16 @@ -OR(riding;with) a -animal- -holding a -object- -driving a -vehicle- -surrounded by OR(-object-s;-flora-s;-space-) -eating -food- -OR(and;holding hands with) -human- -cosplaying as -fictional- -with OR(-color-;-material-) skin -OR(feeling;expression is) -mood- --miniactivity- OR(in;at) a OR(-location-;-building-;-waterlocation-) -wearing -elaborateoutfit- +OR(;, -heshe- is;rare) OR(riding;with) a -animal- +OR(;, -heshe- is;rare) holding a -object- +OR(;, -heshe- is;rare) driving a -vehicle- +OR(;, -heshe- is;rare) surrounded by OR(-object-s;-flora-s;-space-) +OR(;, -heshe- is;rare) eating -food- +OR(;, -heshe- is;rare) OR(and;holding hands with) -human- +OR(;, -heshe- is;rare) cosplaying as -fictional- +OR(with;, -heshe- is;rare) OR(-color-;-material-) skin +OR(, -heshe- is;feeling;expression is) -mood- +OR(;, -heshe- is;rare) -miniactivity- OR(in;at) a OR(-location-;-building-;-waterlocation-) +OR(;, -heshe- is;rare) wearing -elaborateoutfit- - OR(-animal-;-humanoid-) OR(;hybrid;normal) -as -culture- -rpgclass- -sitting in a OR(-descriptor-;uncommon) -chair- -inside a -container- \ No newline at end of file +OR(;, -heshe-;rare) as -culture- -rpgclass- +OR(;, -heshe- is;rare) sitting in a OR(-descriptor-;uncommon) -chair- +OR(;, -heshe- is;rare) inside a -container- +OR(;, -heshe- is;rare) OR(surrounded by;being looked at by) a OR(couple;group) of OR(;-descriptor-;uncommon) OR(people;-malefemale-s;animals) OR(;wearing OR(;-descriptor-;uncommon) -outfit-;rare) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 98328d7..8db9b4a 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,8 +51,13 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,5,"all","all","all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT, -hisher- hair is OR(-haircolor-;-descriptor-;-culture-;uncommon) OR(;and styled as -hairstyle-;rare)" - ,"",1,"","",True,"",100, "all", "all", "all", "all", False, True, 0 +generateprompts(10,5 + ,"humanoid" # subject + ,"all","all",False,"","","PREFIXPROMPT" + ,"SUFFIXPROMPT" + ,"",1,"" + ,"" # subject override + ,True, + "",100, "all", "all", "all", "all", False, True, 0 , "armor" #outfit override ) \ No newline at end of file From cb63dd927a3be0bd4f86ec8fdd2826b7dd2c20bd Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Fri, 29 Sep 2023 17:03:09 +0200 Subject: [PATCH 14/42] some additions for replacements --- build_dynamic_prompt.py | 20 ++++++++++++++++++++ csvfiles/brands.csv | 4 +++- csvfiles/special_lists/buildoutfit.csv | 4 ++-- csvfiles/special_lists/objectadditions.csv | 14 +++++++------- prompttester.py | 8 ++++---- 5 files changed, 36 insertions(+), 14 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 0d5e190..ae50938 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -2680,6 +2680,26 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy if(wildcard == "-outfit-" or wildcard == "-minioutfit-"): completeprompt = completeprompt.replace("-sameoutfit-", replacementvalue,1) + if(wildcard in ["-animal-" + ,"-human-" + ,"-humanoid-" + , "-manwoman-" + , "-malefemale-" + , "-object-" + , "-fictional-" + , "-nonfictional-" + , "-building-" + , "-vehicle-" + , "-food-" + , "-job-" + , "-objecttotal-" + , "-space-" + , "-firstname-"] + and chance_roll(insanitylevel, "uncommon")): + completeprompt = completeprompt.replace("-heshe-", "the " + replacementvalue,1) + + + completeprompt = completeprompt.replace(wildcard, replacementvalue,1) diff --git a/csvfiles/brands.csv b/csvfiles/brands.csv index 9f6a88c..a044d39 100644 --- a/csvfiles/brands.csv +++ b/csvfiles/brands.csv @@ -81,4 +81,6 @@ Gnomes Goblins Blizzard entertainment Riot games -Mugler \ No newline at end of file +Mugler +a -humanoid- +a -rpgclass- \ No newline at end of file diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index 233da67..f1d3434 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -2,9 +2,9 @@ , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit- , 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(-job-;-rpgclass-;-season-;-animal--style) OR(-minioutfit-;-outfit-;rare) -, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;designed by -brand-;uncommon) +, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;uncommon) OR(-minioutfit-;-outfit-;rare) OR(;OR(designed;made;inspired;forged) by -brand-;uncommon) , wearing OR(-material-;-color-) -overrideoutfit- , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print-, , -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -outfit-, OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-) OR( OR(and has;, It has) OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- on it,; and is OR(made of;detailed with bits of) -material-;rare) OR(;,It looks -outfitdescriptor- on -himher-,;unique) , -heshe- is OR(wearing;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-, OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-),;normal) OR(;,It looks -outfitdescriptor- on -himher-,;unique) -, -heshe- is OR(wearing a;dressed in a) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired) by -brand-, It is OR(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;, The -sameoutfit- looks -outfitdescriptor- on -himher-,;unique) \ No newline at end of file +, -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(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;, The -sameoutfit- looks -outfitdescriptor- on -himher-,;unique) \ No newline at end of file diff --git a/csvfiles/special_lists/objectadditions.csv b/csvfiles/special_lists/objectadditions.csv index d5ff27c..0ed6242 100644 --- a/csvfiles/special_lists/objectadditions.csv +++ b/csvfiles/special_lists/objectadditions.csv @@ -1,7 +1,7 @@ -made from OR(-material-;-space-;-flora-) -OR(detailed;engraved;rare) with OR(-material-;-color-;-descriptor-;-pattern-) OR(; and -color-; and -descriptor-;rare) OR(patterns;details) -OR(intricate details;smooth;sleek) -designed by -brand- -anthropomorphic OR(;with a face;normal) -with OR(-pattern-;-color-;-descriptor-;rare) -print- -covered in -covering- \ No newline at end of file +OR(;, -heshe- is;uncommon) made from OR(-material-;-space-;-flora-) +OR(;, -heshe- is;uncommon) OR(detailed;engraved;rare) with OR(-material-;-color-;-outfitdescriptor-;-pattern-) OR(; and -color-; and -outfitdescriptor-;rare) OR(patterns;details) +OR(;, -heshe- is;uncommon) OR(intricate details;smooth;sleek) +OR(;, -heshe- is;uncommon) OR(designed;made;inspired;forged) by -brand- +OR(;, -heshe- is;uncommon) anthropomorphic OR(;with a face;normal) +OR(;, -heshe- is;uncommon) with OR(-pattern-;-color-;-descriptor-;rare) -print- +OR(;, -heshe- is;uncommon) covered in -covering- \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 8db9b4a..ea23f70 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,13 +51,13 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,5 - ,"humanoid" # subject +generateprompts(10,10 + ,"" # subject ,"all","all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT" + ,"SUFFIXPROMPT -heshe- is looking here" ,"",1,"" ,"" # subject override ,True, "",100, "all", "all", "all", "all", False, True, 0 - , "armor" #outfit override + , "" #outfit override ) \ No newline at end of file From ae7146bb95c62d881f909868a9c1e8c63cc4be44 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 30 Sep 2023 08:11:43 +0200 Subject: [PATCH 15/42] Finished samesubject logic --- build_dynamic_prompt.py | 66 ++++++++++++++++++----- csvfiles/special_lists/buildhair.csv | 2 +- csvfiles/special_lists/humanadditions.csv | 2 +- prompttester.py | 2 +- 4 files changed, 57 insertions(+), 15 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index ae50938..acabd63 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -1957,6 +1957,29 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # In front and the back? completeprompt = parse_custom_functions(completeprompt, insanitylevel) + # Sometimes change he/she to the actual subject + if(normal_dist(insanitylevel) + and "-human-" in completeprompt or + "-humanoid-" in completeprompt or + "-manwoman-" in completeprompt or + "-job-" in completeprompt or + "-fictional-" in completeprompt or + "-nonfictional-" in completeprompt or + "-firstname-" in completeprompt or + "-malefemale-" in completeprompt): + completeprompt = completeprompt.replace("-heshe-", "-samehumansubject-",1) + + # Sometimes change he/she to the actual subject + if(normal_dist(insanitylevel) + and "-animal-" in completeprompt or + "-object-" in completeprompt or + "-vehicle-" in completeprompt or + "-food-" in completeprompt or + "-objecttotal-" in completeprompt or + "-space-" in completeprompt or + "-flora-" in completeprompt): + completeprompt = completeprompt.replace("-heshe-", "-sameothersubject-",1) + # hair descriptor if(rare_dist(insanitylevel)): # Use base outfit descriptor, until we are not. completeprompt = completeprompt.replace("-hairdescriptor-", "-descriptor-",1) @@ -2680,23 +2703,38 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy if(wildcard == "-outfit-" or wildcard == "-minioutfit-"): completeprompt = completeprompt.replace("-sameoutfit-", replacementvalue,1) - if(wildcard in ["-animal-" - ,"-human-" + if(wildcard in ["-human-" ,"-humanoid-" - , "-manwoman-" - , "-malefemale-" - , "-object-" - , "-fictional-" + , "-manwoman-" + , "-job-"] + and "-samehumansubject-" in completeprompt): + if(completeprompt.index(wildcard) < completeprompt.index("-samehumansubject-")): + completeprompt = completeprompt.replace("-samehumansubject-", "the " + replacementvalue) + + if(wildcard in ["-fictional-" , "-nonfictional-" - , "-building-" + , "-firstname-"] + and "-samehumansubject-" in completeprompt): + if(completeprompt.index(wildcard) < completeprompt.index("-samehumansubject-")): + completeprompt = completeprompt.replace("-samehumansubject-", replacementvalue) + + # This one last, since then it is the only subject we have left + if(wildcard in ["-malefemale-"] + and "-samehumansubject-" in completeprompt): + if(completeprompt.index(wildcard) < completeprompt.index("-samehumansubject-")): + completeprompt = completeprompt.replace("-samehumansubject-", "the " + replacementvalue,1) + + if(wildcard in ["-animal-" + , "-object-" , "-vehicle-" , "-food-" - , "-job-" - , "-objecttotal-" + , "-objecttotal-" , "-space-" - , "-firstname-"] - and chance_roll(insanitylevel, "uncommon")): - completeprompt = completeprompt.replace("-heshe-", "the " + replacementvalue,1) + , "-flora-"] + and "-sameothersubject-" in completeprompt): + if(completeprompt.index(wildcard) < completeprompt.index("-sameothersubject-")): + completeprompt = completeprompt.replace("-sameothersubject-", "the " + replacementvalue,1) + @@ -2835,6 +2873,10 @@ def parse_custom_functions(completeprompt, insanitylevel = 5): arguments = [arg.strip() for arg in match.split(';')] # Evaluate the 'or()' function and append the result to the results list + + # For debugging, enable these lines + #print(completeprompt) + #print(arguments) or_replacement = custom_or(arguments, insanitylevel) completematch = 'OR(' + match + ')' completeprompt = completeprompt.replace(completematch, or_replacement) diff --git a/csvfiles/special_lists/buildhair.csv b/csvfiles/special_lists/buildhair.csv index 0533cd5..ffee89d 100644 --- a/csvfiles/special_lists/buildhair.csv +++ b/csvfiles/special_lists/buildhair.csv @@ -1,3 +1,3 @@ -OR(;-heshe- has;uncommon) OR(-haircolor-;-hairdescriptor-;-culture-;uncommon) hair OR(styled as -hairstyle-;,;rare) +OR(;-heshe- has;uncommon) OR(-haircolor-;-hairdescriptor-;-culture-;uncommon) hair OR(styled as -hairstyle-;, ;rare) OR(;-heshe- has;uncommon) OR(-haircolor-; -hairstyle-) OR(hairstyle;hair) , -hisher- hair is OR(-haircolor-;-hairdescriptor-;-culture-;uncommon) OR(;and styled as -hairstyle-;rare) \ No newline at end of file diff --git a/csvfiles/special_lists/humanadditions.csv b/csvfiles/special_lists/humanadditions.csv index 5667cea..93bcba6 100644 --- a/csvfiles/special_lists/humanadditions.csv +++ b/csvfiles/special_lists/humanadditions.csv @@ -11,6 +11,6 @@ OR(;, -heshe- is;rare) -miniactivity- OR(in;at) a OR(-location-;-building-;-wate OR(;, -heshe- is;rare) wearing -elaborateoutfit- - OR(-animal-;-humanoid-) OR(;hybrid;normal) OR(;, -heshe-;rare) as -culture- -rpgclass- -OR(;, -heshe- is;rare) sitting in a OR(-descriptor-;uncommon) -chair- +OR(;, -heshe- is;rare) sitting in a OR(;-descriptor-;uncommon) -chair- OR(;, -heshe- is;rare) inside a -container- OR(;, -heshe- is;rare) OR(surrounded by;being looked at by) a OR(couple;group) of OR(;-descriptor-;uncommon) OR(people;-malefemale-s;animals) OR(;wearing OR(;-descriptor-;uncommon) -outfit-;rare) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index ea23f70..9c9b76e 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,7 +51,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,10 +generateprompts(100,10 ,"" # subject ,"all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT -heshe- is looking here" From e660fde05f39ec3a274eee06145ead11348a6944 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 30 Sep 2023 09:06:40 +0200 Subject: [PATCH 16/42] artist rework thing --- OneButtonPromptNodes.py | 2 +- build_dynamic_prompt.py | 43 ++++++++++++++++++++++++------- csvfiles/fictional characters.csv | 6 ++--- prompttester.py | 2 +- scripts/onebuttonprompt.py | 2 +- 5 files changed, 40 insertions(+), 15 deletions(-) diff --git a/OneButtonPromptNodes.py b/OneButtonPromptNodes.py index d00773b..3c838b3 100644 --- a/OneButtonPromptNodes.py +++ b/OneButtonPromptNodes.py @@ -13,7 +13,7 @@ sys.path.append(onebuttonprompt_path) from build_dynamic_prompt import * from csv_reader import * -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"] +artists = ["all", "all (wild)", "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 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"] subjects =["all", "object", "animal", "humanoid", "landscape", "concept"] genders = ["all", "male", "female"] diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index acabd63..c50f5c2 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -123,9 +123,26 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all outfitprinttotallist = objecttotallist + locationlist + colorlist + musicgenrelist + seasonlist + animallist + patternlist # build artists list + + # we want to create more cohorence, so we are adding all (wild) mode for the old logic + # all else will be more constrained per type, to produce better images. + # the popular artists will be used more the lower the insanitylevel is + # Future: add in personal artists lists as well + artisttypes = ["popular", "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"] + artiststyleselector = "" + if(artists == "all" and common_dist(insanitylevel)): + artiststyleselector = random.choice(artisttypes) + artists = artiststyleselector + elif(artists == "all"): + artists = "popular" + artistpopularstyles = ["anime", "detailed", "digital", "fantasy", "fashion" , "concept", "graphic design" , "photography", "portrait", "sci-fi", "realism"] + artiststyleselector = random.choice(artistpopularstyles) + + + 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): + if(artists != "all (wild)" 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 @@ -976,8 +993,6 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # After we chose the subject, lets set all things ready for He/She/It etc if(subjectchooser in ["human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): - print("HELLO") - print(gender) if(gender == "male"): heshelist = ["he"] hisherlist = ["his"] @@ -1136,11 +1151,13 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all artistsplacement = "front" if(chance_roll(insanitylevel, artistsatbackchance) and onlyartists == False): - artistsplacement = "back" + artistlocations = ["back", "middle"] + artistsplacement = random.choice(artistlocations) if(artists != "none" and artistsplacement == "front" and generateartist == True): # take 1-3 artists, weighted to 1-2 step = random.randint(0, 1) + minstep = step end = random.randint(1, insanitylevel3) @@ -1185,7 +1202,13 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += " (" #completeprompt = add_from_csv(completeprompt, "artists", 0, "art by ","") - completeprompt += "-artist-" + if(step == minstep): + if(giventypeofimage=="" and imagetype == "all" and random.randint(0, 1) == 0): + completeprompt += artiststyleselector + " art " + artistbylist = ["art by", "designed by", "stylized by", "by"] + else: + artistbylist = [""] + completeprompt += random.choice(artistbylist) + " -artist-" if isweighted == 1: completeprompt += ":" + str(1 + (random.randint(-3,3)/10)) + ")" @@ -1194,9 +1217,11 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += "|" if artistmode in ["switching"] and not end - step == 1: completeprompt += ":" - - if artistmode not in ["hybrid", "switching"]and not end - step == 1: + + if artistmode not in ["hybrid", "switching"]and not end - step > 1: completeprompt += "," + elif artistmode not in ["hybrid", "switching"]and not end - step == 1: + completeprompt += " and " isweighted = 0 @@ -2692,8 +2717,6 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy replacementvalue = random.choice(listname) if(wildcard not in ["-heshe-", "-himher-","-hisher-"]): listname.remove(replacementvalue) - if(wildcard == "-artist-"): - replacementvalue = "OR(;art by; designed by; stylized by;common) " + replacementvalue else: replacementvalue = "" @@ -2807,6 +2830,8 @@ def cleanup(completeprompt, advancedprompting): completeprompt = re.sub('of a,', 'of a', completeprompt) completeprompt = re.sub('of a of a', 'of a', completeprompt) + completeprompt = re.sub('art art', 'art', completeprompt) + completeprompt = re.sub('(? Date: Sun, 1 Oct 2023 08:27:50 +0200 Subject: [PATCH 17/42] cool artists stuff --- build_dynamic_prompt.py | 53 ++++++++++++++++++++++++++++++++++------- csv_reader.py | 13 ++++++++-- prompttester.py | 5 ++-- 3 files changed, 59 insertions(+), 12 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index c50f5c2..f2ed85b 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -128,21 +128,23 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # all else will be more constrained per type, to produce better images. # the popular artists will be used more the lower the insanitylevel is # Future: add in personal artists lists as well - artisttypes = ["popular", "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"] + artisttypes = ["popular", "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", "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"] artiststyleselector = "" + artiststyleselectormode = "normal" if(artists == "all" and common_dist(insanitylevel)): artiststyleselector = random.choice(artisttypes) artists = artiststyleselector elif(artists == "all"): + artiststyleselectormode = "custom" artists = "popular" - artistpopularstyles = ["anime", "detailed", "digital", "fantasy", "fashion" , "concept", "graphic design" , "photography", "portrait", "sci-fi", "realism"] - artiststyleselector = random.choice(artistpopularstyles) + # artistpopularstyles = ["anime", "detailed", "digital", "fantasy", "fashion" , "concept", "graphic design" , "photography", "portrait", "sci-fi", "realism"] + # artiststyleselector = random.choice(artistpopularstyles) artistlist = [] # create artist list to use in the code, maybe based on category or personal lists - if(artists != "all (wild)" and artists != "none" and artists.startswith("personal_artists") == False and artists.startswith("personal artists") == False): + if(artists != "all (wild)" and 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 @@ -1203,8 +1205,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all #completeprompt = add_from_csv(completeprompt, "artists", 0, "art by ","") if(step == minstep): + # sometimes do this if(giventypeofimage=="" and imagetype == "all" and random.randint(0, 1) == 0): - completeprompt += artiststyleselector + " art " + if(artiststyleselectormode == "normal"): + completeprompt += artiststyleselector + " art " + else: + completeprompt += "-artiststyle- art " artistbylist = ["art by", "designed by", "stylized by", "by"] else: artistbylist = [""] @@ -1251,6 +1257,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += ", " + + # sometimes do this as well + if(giventypeofimage=="" and imagetype == "all" and random.randint(0, 2) == 0): + completeprompt += "-artiststyle- art, " if artistmode in ["enhancing"]: @@ -2126,13 +2136,13 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # keywordsinstring = any(word.lower() in givensubject.lower() for word in keywordslist) for wildcard in allwildcardslistnohybrid: attachedlist = allwildcardslistnohybridlists[allwildcardslistnohybrid.index(wildcard)] - completeprompt = replacewildcard(completeprompt, insanitylevel, wildcard, attachedlist,False, advancedprompting) + completeprompt = replacewildcard(completeprompt, insanitylevel, wildcard, attachedlist,False, advancedprompting, artiststyleselector) for wildcard in allwildcardslistwithhybrid: attachedlist = allwildcardslistwithhybridlists[allwildcardslistwithhybrid.index(wildcard)] - completeprompt = replacewildcard(completeprompt, insanitylevel, wildcard, attachedlist,True, advancedprompting) + completeprompt = replacewildcard(completeprompt, insanitylevel, wildcard, attachedlist,True, advancedprompting, artiststyleselector) @@ -2686,7 +2696,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender return completeprompt # function -def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehybridorswap, advancedprompting): +def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehybridorswap, advancedprompting, artiststyleselector = ""): if(len(listname) == 0): # handling empty lists @@ -2717,15 +2727,40 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy replacementvalue = random.choice(listname) if(wildcard not in ["-heshe-", "-himher-","-hisher-"]): listname.remove(replacementvalue) + + else: replacementvalue = "" + # override for artist and artiststyle, only for first artist + if(wildcard == "-artist-" and "-artiststyle-" in completeprompt): + artiststyles = [] + artiststyle = [] + chosenartiststyle = "" + artiststyles = artist_category_by_category_csv_to_list("artists_and_category",replacementvalue) + artiststyle = artiststyles[0].split(",") + + artiststyle = list(filter(lambda x: len(x) > 0, artiststyle)) # remove empty values + + print(artiststyles) + print(artiststyle) + if(artiststyleselector in artiststyle): + artiststyle.remove(artiststyleselector) + # keep on looping until we have no more wildcards or no more styles to choose from + # leftovers will be removed in the cleaning step + while bool(artiststyle) and "-artiststyle-" in completeprompt: + + chosenartiststyle = random.choice(artiststyle) + completeprompt = completeprompt.replace("-artiststyle-",chosenartiststyle ,1) + artiststyle.remove(chosenartiststyle) + # Sneaky overrides for "same" wildcards # Are overwritten with their first parent if(wildcard == "-outfit-" or wildcard == "-minioutfit-"): completeprompt = completeprompt.replace("-sameoutfit-", replacementvalue,1) + if(wildcard in ["-human-" ,"-humanoid-" , "-manwoman-" @@ -2831,6 +2866,8 @@ def cleanup(completeprompt, advancedprompting): completeprompt = re.sub('of a of a', 'of a', completeprompt) completeprompt = re.sub('art art', 'art', completeprompt) + completeprompt = re.sub('-artiststyle- art', '', completeprompt) + completeprompt = re.sub('-artiststyle-', '', completeprompt) completeprompt = re.sub('(? Date: Sun, 1 Oct 2023 08:47:47 +0200 Subject: [PATCH 18/42] finished up new artist mode work --- build_dynamic_prompt.py | 114 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 108 insertions(+), 6 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index f2ed85b..cf38574 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -137,8 +137,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all elif(artists == "all"): artiststyleselectormode = "custom" artists = "popular" - # artistpopularstyles = ["anime", "detailed", "digital", "fantasy", "fashion" , "concept", "graphic design" , "photography", "portrait", "sci-fi", "realism"] - # artiststyleselector = random.choice(artistpopularstyles) + else: + artiststyleselectormode = "custom" @@ -1152,7 +1152,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # start artist part artistsplacement = "front" - if(chance_roll(insanitylevel, artistsatbackchance) and onlyartists == False): + # remove the artistsatbackchange to be depended on the insanitylevel, we would like this to be a set chance + if(random.randint(0, 2) == 0 and onlyartists == False): artistlocations = ["back", "middle"] artistsplacement = random.choice(artistlocations) @@ -1683,6 +1684,92 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += "-focus-, " + # artists in the middle, can happen as well: + + if(artists != "none" and artistsplacement == "middle" and generateartist == True): + completeprompt += ", " + + # sometimes do this as well, but now in the front of the artists + if(giventypeofimage=="" and imagetype == "all" and random.randint(0, 2) == 0): + completeprompt += "-artiststyle- art, " + + # take 1-3 artists, weighted to 1-2 + step = random.randint(0, 1) + minstep = step + end = random.randint(1, insanitylevel3) + + + + + # determine artist mode: + # normal + # hybrid | + # switching A:B:X + # adding at step x a:X + # stopping at step x ::X + + + modeselector = random.randint(0,10) + if modeselector < 4 and end - step >= 2: + artistmodeslist = ["hybrid", "stopping", "adding", "switching"] + artistmode = artistmodeslist[modeselector] + if(advancedprompting == False): + artistmode = "normal" + if artistmode in ["hybrid","switching"] and end - step == 1: + artistmode = "normal" + # if there are not enough artists in the list, then just go normal + if(len(artistlist) < 3): + artistmode = "normal" + + if artistmode in ["hybrid", "stopping", "adding","switching"]: + completeprompt += " [" + + while step < end: + if(normal_dist(insanitylevel)): + isweighted = 1 + + if isweighted == 1: + completeprompt += " (" + + #completeprompt = add_from_csv(completeprompt, "artists", 0, "art by ","") + if(step == minstep): + # sometimes do this + if(giventypeofimage=="" and imagetype == "all" and random.randint(0, 1) == 0): + if(artiststyleselectormode == "normal"): + completeprompt += artiststyleselector + " art " + else: + completeprompt += "-artiststyle- art " + artistbylist = ["art by", "designed by", "stylized by", "by"] + else: + artistbylist = [""] + completeprompt += random.choice(artistbylist) + " -artist-" + + if isweighted == 1: + completeprompt += ":" + str(1 + (random.randint(-3,3)/10)) + ")" + + if artistmode in ["hybrid"] and not end - step == 1: + completeprompt += "|" + if artistmode in ["switching"] and not end - step == 1: + completeprompt += ":" + + if artistmode not in ["hybrid", "switching"]and not end - step == 1: + completeprompt += "," + + isweighted = 0 + + step = step + 1 + + if artistmode in ["stopping"]: + completeprompt += "::" + completeprompt += str(random.randint(1,19)) + + if artistmode in ["switching","adding"]: + completeprompt += ":" + str(random.randint(1,18)) + if artistmode in ["hybrid", "stopping","adding", "switching"]: + completeprompt += "] " + + completeprompt += ", " + # end of the artist stuff # others if(chance_roll(insanitylevel, directionchance) and generatedirection == True): @@ -1900,6 +1987,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += ", " # take 1-3 artists, weighted to 1-2 step = random.randint(0, 1) + minstep = step end = random.randint(1, insanitylevel3) @@ -1936,7 +2024,17 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += " (" #completeprompt = add_from_csv(completeprompt, "artists", 0, "art by ","") - completeprompt += "-artist-" + if(step == minstep): + # sometimes do this + if(giventypeofimage=="" and imagetype == "all" and random.randint(0, 1) == 0): + if(artiststyleselectormode == "normal"): + completeprompt += artiststyleselector + " art " + else: + completeprompt += "-artiststyle- art " + artistbylist = ["art by", "designed by", "stylized by", "by"] + else: + artistbylist = [""] + completeprompt += random.choice(artistbylist) + " -artist-" if isweighted == 1: completeprompt += ":" + str(1 + (random.randint(-3,3)/10)) + ")" @@ -2743,10 +2841,13 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy artiststyle = list(filter(lambda x: len(x) > 0, artiststyle)) # remove empty values - print(artiststyles) - print(artiststyle) if(artiststyleselector in artiststyle): artiststyle.remove(artiststyleselector) + + # Sorry folks, this only works when you directly select it as a style + if("nudity" in artiststyle): + artiststyle.remove("nudity") + # keep on looping until we have no more wildcards or no more styles to choose from # leftovers will be removed in the cleaning step while bool(artiststyle) and "-artiststyle-" in completeprompt: @@ -2866,6 +2967,7 @@ def cleanup(completeprompt, advancedprompting): completeprompt = re.sub('of a of a', 'of a', completeprompt) completeprompt = re.sub('art art', 'art', completeprompt) + completeprompt = re.sub('-artiststyle- art,', '', completeprompt) completeprompt = re.sub('-artiststyle- art', '', completeprompt) completeprompt = re.sub('-artiststyle-', '', completeprompt) From 0302743f4312fefc9d01123d83afca04192644dc Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sun, 1 Oct 2023 09:14:46 +0200 Subject: [PATCH 19/42] small fix --- build_dynamic_prompt.py | 15 ++++++++++----- csvfiles/colors.csv | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index cf38574..fe114a4 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -1250,7 +1250,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt = replacewildcard(completeprompt, insanitylevel, "-artist-", artistlist, False, False) # clean it up - completeprompt = cleanup(completeprompt, advancedprompting) + completeprompt = cleanup(completeprompt, advancedprompting, insanitylevel) print("only generated these artists:" + completeprompt) return completeprompt @@ -2283,7 +2283,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt = parse_custom_functions(completeprompt, insanitylevel) # clean it up - completeprompt = cleanup(completeprompt, advancedprompting) + completeprompt = cleanup(completeprompt, advancedprompting, insanitylevel) #just for me, some fun with posting fake dev messages (ala old sim games) if(random.randint(1, 50)==1): @@ -2785,7 +2785,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender # clean it up - completeprompt = cleanup(completeprompt, advancedprompting) + completeprompt = cleanup(completeprompt, advancedprompting, insanitylevel) @@ -2837,7 +2837,7 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy artiststyle = [] chosenartiststyle = "" artiststyles = artist_category_by_category_csv_to_list("artists_and_category",replacementvalue) - artiststyle = artiststyles[0].split(",") + artiststyle = [x.strip() for x in artiststyles[0].split(",")] artiststyle = list(filter(lambda x: len(x) > 0, artiststyle)) # remove empty values @@ -2908,7 +2908,7 @@ def replace_match(match): words = match.group(0)[1:-1].split('|') return words[0] -def cleanup(completeprompt, advancedprompting): +def cleanup(completeprompt, advancedprompting, insanitylevel = 5): # first, move LoRA's to the back dynamically @@ -2933,6 +2933,11 @@ def cleanup(completeprompt, advancedprompting): # sometimes if there are not enough artist, we get left we things formed as (:1.2) completeprompt = re.sub('\(\:\d+\.\d+\)', '', completeprompt) + # lets also remove some wierd stuff on lower insanitylevels + if(insanitylevel < 7): + completeprompt = completeprompt.replace("DayGlo", " ") + completeprompt = completeprompt.replace("fluorescent", " ") + # all cleanup steps moved here completeprompt = re.sub('\[ ', '[', completeprompt) completeprompt = re.sub('\[,', '[', completeprompt) diff --git a/csvfiles/colors.csv b/csvfiles/colors.csv index 47a55a1..c5e4e81 100644 --- a/csvfiles/colors.csv +++ b/csvfiles/colors.csv @@ -11,6 +11,7 @@ Black White Turquoise Magenta +Lazuli Lavender Indigo Azure From 104076ff68b03bc5b22d02586aab687513123cd7 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sun, 1 Oct 2023 15:49:50 +0200 Subject: [PATCH 20/42] subject types determined by artist choice --- build_dynamic_prompt.py | 45 +++++++++++++++++++++++++++++++++++++++++ prompttester.py | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index fe114a4..e7de303 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -945,6 +945,51 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # main chooser: 0 object, 1 animal, 2 humanoid, 3 landscape, 4 event/concept #mainchooserlist = ["object","animal","humanoid", "landscape", "concept"] + + # ["popular", "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", "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"] + + # Some new logic, lets base the main chooser list on the chosen art category, to make it more cohorent + # first for humanoids + artiststylelistforchecking = ["popular", "3D", "anime" "art nouveau", "art deco", "character", "fantasy", "fashion", "manga", "photography","portrait","sci-fi"] + if((artiststyleselector in artiststylelistforchecking + or artists in artiststylelistforchecking) + and (forcesubject == "all" or forcesubject == "")): + + # remove the shizzle based on chance? + # we want it to be MORE diverce when the insanity level raises + # in this case, raise the chance for a humanoid, gets more wierd when going above 5 + if(random.randint(0,5) < insanitylevel and "concept" in mainchooserlist): + mainchooserlist.remove("concept") + if(random.randint(0,4) < insanitylevel and "landscape" in mainchooserlist): + mainchooserlist.remove("landscape") + if(random.randint(0,4) < insanitylevel and "object" in mainchooserlist): + mainchooserlist.remove("object") + if(random.randint(0,8) < insanitylevel and "animal" in mainchooserlist): + mainchooserlist.remove("animal") + + # second for landscapes + # Some new logic, lets base the main chooser list on the chosen art category, to make it more cohorent + artiststylelistforchecking = ["architecture","bauhaus", "cityscape", "cloudscape","impressionism", "installation", "landscape","magical realism", "nature", "romanticism","seascape", "space", "streetscape"] + + if((artiststyleselector in artiststylelistforchecking + or artists in artiststylelistforchecking) + and (forcesubject == "all" or forcesubject == "")): + + # remove the shizzle based on chance? + # we want it to be MORE diverce when the insanity level raises + # in this case, raise the chance for a landscape, gets more wierd when going above 5 + if(random.randint(0,6) < insanitylevel and "concept" in mainchooserlist): + mainchooserlist.remove("concept") + if(random.randint(0,4) < insanitylevel and "animal" in mainchooserlist): + mainchooserlist.remove("animal") + if(random.randint(0,4) < insanitylevel and "object" in mainchooserlist): + mainchooserlist.remove("object") + if(random.randint(0,8) < insanitylevel and "humanoid" in mainchooserlist): + mainchooserlist.remove("humanoid") + + + + mainchooser = random.choice(mainchooserlist) if(forcesubject != "" and forcesubject != "all"): diff --git a/prompttester.py b/prompttester.py index 3e35aec..d5a1ffb 100644 --- a/prompttester.py +++ b/prompttester.py @@ -53,7 +53,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im generateprompts(10,5 ,"" # subject - ,"all" + ,"all" # artists ,"all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT -artiststyle-" ,"",1,"" From 7b639552004c4bad72b84e9c42ac9b3b229afca2 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sun, 1 Oct 2023 16:17:23 +0200 Subject: [PATCH 21/42] More stable human choices --- build_dynamic_prompt.py | 45 +++++++++++++++++++++++++++++++++-------- prompttester.py | 2 +- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index e7de303..3218ba7 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -958,13 +958,13 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # remove the shizzle based on chance? # we want it to be MORE diverce when the insanity level raises # in this case, raise the chance for a humanoid, gets more wierd when going above 5 - if(random.randint(0,5) < insanitylevel and "concept" in mainchooserlist): + if(random.randint(4,7) > insanitylevel and "concept" in mainchooserlist): mainchooserlist.remove("concept") - if(random.randint(0,4) < insanitylevel and "landscape" in mainchooserlist): + if(random.randint(4,7) > insanitylevel and "landscape" in mainchooserlist): mainchooserlist.remove("landscape") - if(random.randint(0,4) < insanitylevel and "object" in mainchooserlist): + if(random.randint(4,7) > insanitylevel and "object" in mainchooserlist): mainchooserlist.remove("object") - if(random.randint(0,8) < insanitylevel and "animal" in mainchooserlist): + if(random.randint(4,9) > insanitylevel and "animal" in mainchooserlist): mainchooserlist.remove("animal") # second for landscapes @@ -978,13 +978,13 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # remove the shizzle based on chance? # we want it to be MORE diverce when the insanity level raises # in this case, raise the chance for a landscape, gets more wierd when going above 5 - if(random.randint(0,6) < insanitylevel and "concept" in mainchooserlist): + if(random.randint(4,7) > insanitylevel and "concept" in mainchooserlist): mainchooserlist.remove("concept") - if(random.randint(0,4) < insanitylevel and "animal" in mainchooserlist): + if(random.randint(4,7) > insanitylevel and "animal" in mainchooserlist): mainchooserlist.remove("animal") - if(random.randint(0,4) < insanitylevel and "object" in mainchooserlist): + if(random.randint(4,7) > insanitylevel and "object" in mainchooserlist): mainchooserlist.remove("object") - if(random.randint(0,8) < insanitylevel and "humanoid" in mainchooserlist): + if(random.randint(4,9) > insanitylevel and "humanoid" in mainchooserlist): mainchooserlist.remove("humanoid") @@ -1005,7 +1005,36 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all subjectchooser = "animal as human" if(mainchooser == "humanoid"): #humanoidsubjectchooserlist = ["human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] + # Lets put generic humans as a more 'normal' value. Manwoman relation as the least picked. + # balanced around 5, to have more normal man/woman + # lower values even more stable + # Upper values are still quite random + humanoidsubjectchooserlistbackup = humanoidsubjectchooserlist.copy() # make a backup of the list + + if(random.randint(4,13) > insanitylevel and "manwomanrelation" in humanoidsubjectchooserlist): + humanoidsubjectchooserlist.remove("manwomanrelation") + if(random.randint(4,13) > insanitylevel and "firstname" in humanoidsubjectchooserlist): + humanoidsubjectchooserlist.remove("firstname") + if(random.randint(3,11) > insanitylevel and "job" in humanoidsubjectchooserlist): + humanoidsubjectchooserlist.remove("job") + if(random.randint(3,11) > insanitylevel and "fictional" in humanoidsubjectchooserlist): + humanoidsubjectchooserlist.remove("fictional") + if(random.randint(3,11) > insanitylevel and "non fictional" in humanoidsubjectchooserlist): + humanoidsubjectchooserlist.remove("non fictional") + if(random.randint(3,11) > insanitylevel and "humanoid" in humanoidsubjectchooserlist): + humanoidsubjectchooserlist.remove("humanoid") + # more random stuff on higher levels + if(random.randint(8,13) < insanitylevel and "human" in humanoidsubjectchooserlist): + humanoidsubjectchooserlist.remove("human") + + # if we accidently remove everything, then restore the backup list + if(not bool(humanoidsubjectchooserlist)): + humanoidsubjectchooserlist = humanoidsubjectchooserlistbackup + subjectchooser = random.choice(humanoidsubjectchooserlist) + + + if(subtypehumanoid != "all"): if(subtypehumanoid == "generic humans"): subjectchooser = "human" diff --git a/prompttester.py b/prompttester.py index d5a1ffb..baea0a1 100644 --- a/prompttester.py +++ b/prompttester.py @@ -52,7 +52,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("All done!") generateprompts(10,5 - ,"" # subject + ,"humanoid" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT -artiststyle-" From fdf48a7e6d0bbceeeb6bff63c7162a337a2f15e8 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sun, 1 Oct 2023 20:20:27 +0200 Subject: [PATCH 22/42] fixes and things --- build_dynamic_prompt.py | 136 ++++++++++++++++--------- csvfiles/special_lists/buildoutfit.csv | 8 +- prompttester.py | 4 +- 3 files changed, 94 insertions(+), 54 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 3218ba7..32322bf 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -128,7 +128,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # all else will be more constrained per type, to produce better images. # the popular artists will be used more the lower the insanitylevel is # Future: add in personal artists lists as well - artisttypes = ["popular", "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", "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"] + artisttypes = ["popular", "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", "graffiti", "graphic design", "high contrast", "horror", "impressionism", "installation", "landscape", "light", "line drawing", "low contrast", "luminism", "magical realism", "manga", "melanin", "messy", "monochromatic", "nature", "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"] artiststyleselector = "" artiststyleselectormode = "normal" if(artists == "all" and common_dist(insanitylevel)): @@ -1211,7 +1211,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(rare_dist(insanitylevel) and bool(imagetypelist)): completeprompt += "-imagetype-, " step = step + 1 - completeprompt += " (" + # start styles mode here @@ -1362,7 +1362,16 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # one in 6 images is a complex/other type if(chance_roll(insanitylevel, imagetypequalitychance) and generateimagetypequality): completeprompt += "-imagetypequality- " - if(random.randint(0,5) < 5): + if("photography" in artiststyleselector + or "photography" in artists): + completeprompt += " photograph, " + elif("portrait" in artiststyleselector + or "portrait" in artists): + completeprompt += " portrait, " + if("landscape" in artiststyleselector + or "landscape" in artists): + completeprompt += " landscape, " + elif(random.randint(0,5) < 5): completeprompt += " -imagetype-, " else: othertype = 1 @@ -1407,13 +1416,16 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # start subject building if(generatesubject == True): # start with descriptive qualities - - # Common to have 1 description, uncommon to have 2 - if(chance_roll(insanitylevel, subjectdescriptor1chance) and generatedescriptors == True): - completeprompt += "-descriptor- " - if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): - completeprompt += "-descriptor- " + # Sometimes the descriptors are at the back, in more natural language. Lets determine. + descriptorsintheback = random.randint(0,2) + if(descriptorsintheback < 2): + # Common to have 1 description, uncommon to have 2 + if(chance_roll(insanitylevel, subjectdescriptor1chance) and generatedescriptors == True): + completeprompt += "-descriptor- " + + if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): + completeprompt += "-descriptor- " if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, subjectbodytypechance) and generatebodytype == True): completeprompt += "-bodytype- " @@ -1469,8 +1481,6 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += " " + givensubject + " " hybridorswap = "" - # completion of strenght end - completeprompt += "-objectstrengthend-" if(mainchooser == "animal"): # first add a wildcard that can be used to create prompt strenght @@ -1507,12 +1517,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all hybridorswap = "" - # completion of strenght end - completeprompt += "-objectstrengthend-" - - if(legendary_dist(insanitylevel)): - animaladdedsomething = 1 - completeprompt += "-animalsuffixaddition- " + # if we have a given subject, we should skip making an actual subject if(mainchooser == "humanoid"): @@ -1591,13 +1596,20 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all else: completeprompt += " " + givensubject + " " - - # completion of strenght end - completeprompt += "-objectstrengthend-" + # sometimes add a suffix for more fun! if( (mainchooser == "humanoid" or mainchooser == "animal" or mainchooser == "object") and chance_roll(insanitylevel, subjectconceptsuffixchance)): completeprompt += " of -conceptsuffix- " + + if(mainchooser == "humanoid" or mainchooser == "animal" or mainchooser == "object"): + # completion of strenght end + completeprompt += "-objectstrengthend-" + + if(mainchooser == 'animal' and legendary_dist(insanitylevel)): + animaladdedsomething = 1 + completeprompt += " -animalsuffixaddition- " + if(subjectchooser == "landscape"): # first add a wildcard that can be used to create prompt strenght @@ -1664,7 +1676,13 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # completion of strenght end completeprompt += "-objectstrengthend-" + if(descriptorsintheback == 2): + # Common to have 1 description, uncommon to have 2 + if(chance_roll(insanitylevel, subjectdescriptor1chance) and generatedescriptors == True): + completeprompt += ", OR(;-heshe- is;normal) OR(;a very;rare) -descriptor- " + if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): + completeprompt += " and -descriptor- " # object additions for i in range(objectadditionsrepeats): @@ -2003,7 +2021,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # start second part of massive madness here if(massivemadnessmode == True): - completeprompt += ":1.3), " + completeprompt += ", " step = 0 end = random.randint(1, insanitylevel) + 1 while step < end: @@ -2163,29 +2181,40 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # In front and the back? completeprompt = parse_custom_functions(completeprompt, insanitylevel) - + # Sometimes change he/she to the actual subject - if(normal_dist(insanitylevel) - and "-human-" in completeprompt or - "-humanoid-" in completeprompt or - "-manwoman-" in completeprompt or - "-job-" in completeprompt or - "-fictional-" in completeprompt or - "-nonfictional-" in completeprompt or - "-firstname-" in completeprompt or - "-malefemale-" in completeprompt): - completeprompt = completeprompt.replace("-heshe-", "-samehumansubject-",1) + # Doesnt work if someone puts in a manual subject + if(mainchooser == "humanoid" and givensubject == ""): + samehumanreplacementlist = ["-heshe-","-heshe-","-heshe-","-heshe-","-heshe-", "-samehumansubject-", "-samehumansubject-", "-samehumansubject-", "-samehumansubject-", "-samehumansubject-"] + random.shuffle(samehumanreplacementlist) + + # Convert completeprompt to a list to allow character-wise manipulation + completeprompt_list = list(completeprompt) + # Iterate over the characters in completeprompt_list + for i in range(len(completeprompt_list) - len("-heshe-") + 1): + if "".join(completeprompt_list[i:i+len("-heshe-")]) == "-heshe-": + # Replace -heshe- with a value from the shuffled list + replacement = samehumanreplacementlist.pop() + completeprompt_list[i:i+len("-heshe-")] = replacement + + # Convert the list back to a string + completeprompt = "".join(completeprompt_list) # Sometimes change he/she to the actual subject - if(normal_dist(insanitylevel) - and "-animal-" in completeprompt or - "-object-" in completeprompt or - "-vehicle-" in completeprompt or - "-food-" in completeprompt or - "-objecttotal-" in completeprompt or - "-space-" in completeprompt or - "-flora-" in completeprompt): - completeprompt = completeprompt.replace("-heshe-", "-sameothersubject-",1) + if(mainchooser in ["animal", "object"] and givensubject == ""): + sameobjectreplacementlist = ["-heshe-","-heshe-","-heshe-","-heshe-","-heshe-", "-sameothersubject-", "-sameothersubject-", "-sameothersubject-", "-sameothersubject-", "-sameothersubject-"] + random.shuffle(sameobjectreplacementlist) + # Convert completeprompt to a list to allow character-wise manipulation + completeprompt_list = list(completeprompt) + + # Iterate over the characters in completeprompt_list + for i in range(len(completeprompt_list) - len("-heshe-") + 1): + if "".join(completeprompt_list[i:i+len("-heshe-")]) == "-heshe-": + # Replace -heshe- with a value from the shuffled list + replacement = sameobjectreplacementlist.pop() + completeprompt_list[i:i+len("-heshe-")] = replacement + # Convert the list back to a string + completeprompt = "".join(completeprompt_list) # hair descriptor if(rare_dist(insanitylevel)): # Use base outfit descriptor, until we are not. @@ -2857,7 +2886,6 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender - # clean it up completeprompt = cleanup(completeprompt, advancedprompting, insanitylevel) @@ -2930,11 +2958,23 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy completeprompt = completeprompt.replace("-artiststyle-",chosenartiststyle ,1) artiststyle.remove(chosenartiststyle) + + # Sneaky overrides for "same" wildcards # Are overwritten with their first parent if(wildcard == "-outfit-" or wildcard == "-minioutfit-"): completeprompt = completeprompt.replace("-sameoutfit-", replacementvalue,1) + # Why do it in this detail?? Because we can: + # Check if "from" exists in the string. For example Chun Li from Streetfighter, becomes Chun li + if "from" in replacementvalue: + # Find the index of "from" in the string + from_index = replacementvalue.find("from") + + # Remove everything from and including "from" + replacementvalueforoverrides = replacementvalue[:from_index].strip() + else: + replacementvalueforoverrides = replacementvalue if(wildcard in ["-human-" ,"-humanoid-" @@ -2942,20 +2982,20 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy , "-job-"] and "-samehumansubject-" in completeprompt): if(completeprompt.index(wildcard) < completeprompt.index("-samehumansubject-")): - completeprompt = completeprompt.replace("-samehumansubject-", "the " + replacementvalue) + completeprompt = completeprompt.replace("-samehumansubject-", "the " + replacementvalueforoverrides) if(wildcard in ["-fictional-" , "-nonfictional-" , "-firstname-"] and "-samehumansubject-" in completeprompt): if(completeprompt.index(wildcard) < completeprompt.index("-samehumansubject-")): - completeprompt = completeprompt.replace("-samehumansubject-", replacementvalue) + completeprompt = completeprompt.replace("-samehumansubject-", replacementvalueforoverrides) # This one last, since then it is the only subject we have left if(wildcard in ["-malefemale-"] and "-samehumansubject-" in completeprompt): if(completeprompt.index(wildcard) < completeprompt.index("-samehumansubject-")): - completeprompt = completeprompt.replace("-samehumansubject-", "the " + replacementvalue,1) + completeprompt = completeprompt.replace("-samehumansubject-", "the " + replacementvalueforoverrides,1) if(wildcard in ["-animal-" , "-object-" @@ -2966,13 +3006,13 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy , "-flora-"] and "-sameothersubject-" in completeprompt): if(completeprompt.index(wildcard) < completeprompt.index("-sameothersubject-")): - completeprompt = completeprompt.replace("-sameothersubject-", "the " + replacementvalue,1) + completeprompt = completeprompt.replace("-sameothersubject-", "the " + replacementvalueforoverrides,1) - - completeprompt = completeprompt.replace(wildcard, replacementvalue,1) + + return completeprompt diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index f1d3434..2f8562f 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -1,10 +1,10 @@ -, OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- +, OR(wearing;dressed in;in;normal) OR(;a very;rare) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;normal) OR(;-outfitdescriptor-;uncommon) OR(;-color-;uncommon) -outfit- , 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(-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 -brand-;uncommon) , wearing OR(-material-;-color-) -overrideoutfit- , OR(wearing;dressed in;in;normal) OR(;-outfitdescriptor-;-material-;-color-;uncommon) OR(-outfit-;-minioutfit-;rare) with OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print-, -, -heshe- is OR(wearing a;dressed in) OR(;-hisher-;-hisher- -outfitdescriptor-;rare) -outfit-, OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-) OR( OR(and has;, It has) OR(-pattern-;-outfitprinttotal-;-material-;uncommon) -print- on it,; and is OR(made of;detailed with bits of) -material-;rare) OR(;,It looks -outfitdescriptor- on -himher-,;unique) -, -heshe- is OR(wearing;dressed in) OR(;-hisher-;-hisher- traditional;rare) -culture- -outfit-, OR(; OR(-hisher-;The;normal) -sameoutfit- is OR(-outfitdescriptor-;-color-),;normal) OR(;,It looks -outfitdescriptor- on -himher-,;unique) -, -heshe- is OR(wearing a;dressed in a) OR(;-outfitdescriptor-;normal) OR(;-color-;uncommon) OR(;-culture-;uncommon) OR(;-material-;rare) -outfit- that was OR(designed;made;inspired;forged) by -brand-, It is OR(-outfitdescriptor-;-color-;normal) OR(;and OR(-outfitdescriptor-;-color-;normal);normal) OR(;, The -sameoutfit- looks -outfitdescriptor- on -himher-,;unique) \ No newline at end of file +, -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-;-hisher- traditional;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) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index baea0a1..163ac1e 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,11 +51,11 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,5 +generateprompts(10,8 ,"humanoid" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT -artiststyle-" + ,"SUFFIXPROMPT -heshe- -heshe- -heshe-" ,"",1,"" ,"" # subject override ,True, From 3b8727af62ac59239091e0bb6013f83cc4e2e3d5 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Thu, 5 Oct 2023 21:06:36 +0200 Subject: [PATCH 23/42] hairvomit and more gendering --- build_dynamic_prompt.py | 42 +++--- csvfiles/accessories.csv | 277 ++++++++++++++++++++------------------- csvfiles/body_types.csv | 85 ++++++------ csvfiles/hairvomit.csv | 9 ++ 4 files changed, 222 insertions(+), 191 deletions(-) create mode 100644 csvfiles/hairvomit.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 32322bf..368490f 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -58,9 +58,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all outfitlist = csv_to_list("outfits",antilist) locationlist = csv_to_list("locations",antilist) - accessorielist = csv_to_list("accessories",antilist,"./csvfiles/",0,"?") + accessorielist = csv_to_list("accessories",antilist,"./csvfiles/",0,"?",False,False,gender) artmovementlist = csv_to_list("artmovements",antilist) - bodytypelist = csv_to_list("body_types",antilist) + bodytypelist = csv_to_list("body_types",antilist=antilist,skipheader=True,gender=gender) cameralist = csv_to_list("cameras",antilist) colorschemelist = csv_to_list("colorscheme",antilist) conceptprefixlist = csv_to_list("concept_prefix",antilist) @@ -74,6 +74,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all greatworklist = csv_to_list("greatworks",antilist) haircolorlist = csv_to_list("haircolors",antilist) hairstylelist = csv_to_list("hairstyles",antilist) + hairvomitlist = csv_to_list("hairvomit",antilist) humanactivitylist = csv_to_list("human_activities",antilist) humanoidlist = csv_to_list("humanoids",antilist) imagetypelist = csv_to_list("imagetypes",antilist) @@ -1362,15 +1363,15 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # one in 6 images is a complex/other type if(chance_roll(insanitylevel, imagetypequalitychance) and generateimagetypequality): completeprompt += "-imagetypequality- " - if("photography" in artiststyleselector - or "photography" in artists): - completeprompt += " photograph, " - elif("portrait" in artiststyleselector - or "portrait" in artists): - completeprompt += " portrait, " - if("landscape" in artiststyleselector - or "landscape" in artists): - completeprompt += " landscape, " + # if("photography" in artiststyleselector + # or "photography" in artists): + # completeprompt += " photograph, " + # elif("portrait" in artiststyleselector + # or "portrait" in artists): + # completeprompt += " portrait, " + # if("landscape" in artiststyleselector + # or "landscape" in artists): + # completeprompt += " landscape, " elif(random.randint(0,5) < 5): completeprompt += " -imagetype-, " else: @@ -1747,6 +1748,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(subjectchooser in ["human","job","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, hairchance) and generatehairstyle == True): completeprompt += random.choice(buildhairlist) + ", " + if(unique_dist(insanitylevel)): + completeprompt += " -hairvomit-, " 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) + ", " @@ -2326,9 +2329,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-hisher-" in completeprompt or "-himher-" in completeprompt or "-outfitdescriptor-" in completeprompt or - "-hairdescriptor-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-"] - 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist] + "-hairdescriptor-" in completeprompt or + "-hairvomit-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-"] + 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2441,6 +2445,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender greatworklist = csv_to_list("greatworks",antilist) haircolorlist = csv_to_list("haircolors",antilist) hairstylelist = csv_to_list("hairstyles",antilist) + hairvomitlist = csv_to_list("hairvomit",antilist) humanactivitylist = csv_to_list("human_activities",antilist) humanoidlist = csv_to_list("humanoids",antilist) imagetypelist = csv_to_list("imagetypes",antilist) @@ -2656,6 +2661,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender prompt = prompt.replace(combination," -outfitdescriptor- ") if lowercase_combination in [x.lower() for x in hairdescriptorlist] and chance_roll(insanitylevel, "rare"): prompt = prompt.replace(combination," -hairdescriptor- ") + if lowercase_combination in [x.lower() for x in hairvomitlist] and chance_roll(insanitylevel, "rare"): + prompt = prompt.replace(combination," -hairvomit- ") if lowercase_combination in [x.lower() for x in directionlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -direction- ") @@ -2865,9 +2872,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-cardname-" in completeprompt or "-covering-" in completeprompt or "-outfitdescriptor-" in completeprompt or - "-hairdescriptor-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-"] - 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist] + "-hairdescriptor-" in completeprompt or + "-hairvomit-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-"] + 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/accessories.csv b/csvfiles/accessories.csv index 13ca079..475ff22 100644 --- a/csvfiles/accessories.csv +++ b/csvfiles/accessories.csv @@ -1,132 +1,145 @@ -Beauty Marks -Freckles -Scars -Wrinkles -Pores -Eyeliner -Eyeshadow -Makeup -No makeup -Fantasy Makeup -Lipstick -Lip gloss -Large -color- Eyes -Glowing -color- Eyes -Three-Eyed -One-Eyed -Crazy Eyes -Empty Eyes -Dashed Eyes -Heart-Shaped Eyes -Cybernetic Eye -Amphibian Eyes --animal- Eyes -Sharingan Eyes -Anime Eyes -Hair Tie -Hair Clip -Hair Ribbons -Flower in hair -Barrette -Hat -Trucker hat -Witch Hat -Wizard Hat --material- helmet -Bandanna -Headband -Crown -Tiara -Horns -Angelic Halo -Flower Crown -Circlet -Large Head -Face Mask -Mask made out of -material- -Samurai Mask --animal- Ears -Cat Ears --animal- Tail -Tail -Fangs -Wings -Cybernetics -Mechanical Body Parts -Mechanical Arms -Mechanical Legs -Robotic Body Parts -Robotic Arms -Robotic Legs -Headphones -Earbuds -Cellphone -Phone Case -Watch -Fitness Tracker -Smartwatch -Fitbit -Glasses -Glasses Chain -Sunglasses -Blindfold -Braces -Gold Tooth -Ruff -Scarf -Fur Scarf -Tartan Scarf -Collar -Choker -Tie -Bowtie -Earrings -Necklace -Bracelet -Ring -Rings -Lapel Pin -Body Chain -Brooch -Anklet -Nose Ring -Lip Ring -Belly Button Ring -Navel -Body Piercings -Belt -Belts -Buckles -Rope -Straps -Keychain -Cufflink -Cape -Cloak -Pocket Square -Handkerchief -Gloves -Wallet -Purse -Backpack -Briefcase -Umbrella -Harness -Chain -Medallion -Patches -Pins -Buttons -Tattoos -Cigarette -Pipe -OR(-material-;-color-) trimmings -OR(;Handlebar;Horseshoe;Pencil;Large;Small;common) Mustache -OR(;Full;Stubble;Circle;Light;Large;Small;common) Beard -Goatee -Soul Patch -Mutton Chops -OR(;Day of the Dead;Tribal;Clown;Halloween;Fantasy;Sports Team;Superhero;-animal-;common) Face OR(Painting;Paint) -OR(-animal-;-objecttotal-;-pattern-;henna;-building-;body;face;tribal) Tattoo -Geass -Shoulder pads \ No newline at end of file +Beauty Marks?female +Freckles?both +Scars?both +Wrinkles?both +Pores?both +Eyeliner?female +Eyeshadow?female +Makeup?female +No makeup?female +Fantasy Makeup?female +Lipstick?female +Lip gloss?female +Large -color- Eyes?both +Glowing -color- Eyes?both +Three-Eyed?both +One-Eyed?both +Crazy Eyes?both +Empty Eyes?both +Dashed Eyes?both +Heart-Shaped Eyes?both +Cybernetic Eye?both +Amphibian Eyes?both +-animal- Eyes?both +Sharingan Eyes?both +Anime Eyes?both +Hair Tie?both +Hair Clip?both +Hair Ribbons?both +Flower in hair?both +Barrette?both +Hat?both +Trucker hat?both +Witch Hat?both +Wizard Hat?both +-material- helmet?both +Bandanna?both +Headband?both +Crown?both +Tiara?both +Horns?both +Angelic Halo?both +Flower Crown?both +Circlet?both +Large Head?both +Face Mask?both +Mask made out of -material-?both +Samurai Mask?both +-animal- Ears?female +OR(Cat;Bunny;Fox) Ears?female +-animal- Tail?female +Tail?female +Fangs?both +Wings?both +Cybernetics?both +Mechanical Body Parts?both +Mechanical Arms?both +Mechanical Legs?both +Robotic Body Parts?both +Robotic Arms?both +Robotic Legs?both +Headphones?both +Earbuds?both +Cellphone?both +Phone Case?both +Watch?both +Fitness Tracker?both +Smartwatch?both +Fitbit?both +Glasses?both +Glasses Chain?both +Sunglasses?both +Blindfold?both +Braces?both +Gold Tooth?both +Ruff?both +Scarf?both +Fur Scarf?both +Tartan Scarf?both +Collar?both +Choker?both +Tie?both +Bowtie?both +Earrings?both +Earring?both +Necklace?both +Bracelet?both +Ring?both +Rings?both +Lapel Pin?both +Body Chain?both +Brooch?both +Anklet?both +Nose Ring?both +Lip Ring?both +Belly Button Ring?both +Navel?both +Body Piercings?both +Belt?both +Belts?both +Buckles?both +Rope?both +Straps?both +Keychain?both +Cufflink?both +Cape?both +Cloak?both +Pocket Square?both +Handkerchief?both +Gloves?both +Wallet?both +Purse?both +Backpack?both +Briefcase?both +Umbrella?both +Harness?both +Chain?both +Medallion?both +Patches?both +Pins?both +Buttons?both +Tattoos?both +Cigarette?both +Pipe?both +OR(-material-;-color-) trimmings?both +OR(thick;Handlebar;Horseshoe;Pencil;Large;Small) Mustache?male +mustache??male +OR(bushy;Full;Stubble;Circle;Light;Large;Small) Beard?male +beard?male +Goatee?male +Soul Patch?male +Mutton Chops?male +OR(;Day of the Dead;Tribal;Clown;Halloween;Fantasy;Sports Team;Superhero;-animal-;common) Face OR(Painting;Paint)?both +OR(-animal-;-objecttotal-;-pattern-;henna;-building-;body;face;tribal) Tattoo?both +Geass?both +Shoulder pads?both +jewelry?both +wedding ring?both +amulet?both +amulet of -suffix-?both +aviator sunglasses?both +ray-ban glasses?both +monocle?both +Browline glasses?both +Goggles?both +Horn-rimmed glasses?both \ No newline at end of file diff --git a/csvfiles/body_types.csv b/csvfiles/body_types.csv index 4c7657c..9b58174 100644 --- a/csvfiles/body_types.csv +++ b/csvfiles/body_types.csv @@ -1,42 +1,43 @@ -curvy -voluptuous -chubby -buxom -heavyset -full-figured -fat -plump -overweight -burly -obese -morbidly obese -thick -thicc -hourglass figure -stout -rotund -hefty -large -portly -midweight -beefy -athletic -fit -muscular -buff -stocky -well-built -well-endowed -thin -slender -skinny -small -petite -tiny -lanky -slim -slight -light-weight -flyweight -short -tall \ No newline at end of file +curvy;female +voluptuous;female +chubby;both +buxom;both +heavyset;both +full-figured;female +fat;both +plump;both +overweight;both +burly;both +obese;both +morbidly obese;both +thick;female +thicc;female +hourglass figure;female +stout;both +rotund;both +hefty;both +large;both +portly;both +midweight;both +beefy;both +athletic;both +fit;both +muscular;both +buff;both +stocky;both +well-built;both +well-endowed;male +thin;both +slender;both +skinny;both +small;both +petite;female +tiny;both +lanky;both +slim;both +slight;both +light-weight;both +flyweight;both +short;both +tall;both +strong;both \ No newline at end of file diff --git a/csvfiles/hairvomit.csv b/csvfiles/hairvomit.csv new file mode 100644 index 0000000..7fed7af --- /dev/null +++ b/csvfiles/hairvomit.csv @@ -0,0 +1,9 @@ +Messy hair +Wavy hair +Magical glowing OR(;-haircolor-;-color-;uncommon) hair +OR(-haircolor-;-color-;rare) highlights +Voluminous hair +Grey streaks +curly hair +flower in hair +hairpin \ No newline at end of file From 168c1e58fe0bf6af0f9237769ce39493ac000dce Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Thu, 5 Oct 2023 21:57:55 +0200 Subject: [PATCH 24/42] humandescriptors and minor stuff --- build_dynamic_prompt.py | 59 ++++++-- csvfiles/brands.csv | 7 +- csvfiles/humandescriptors.csv | 193 +++++++++++++++++++++++++ csvfiles/minioutfits.csv | 16 +- csvfiles/outfitdescriptors.csv | 9 +- csvfiles/special_lists/buildoutfit.csv | 4 +- prompttester.py | 4 +- 7 files changed, 257 insertions(+), 35 deletions(-) create mode 100644 csvfiles/humandescriptors.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 368490f..134e09e 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -74,7 +74,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all greatworklist = csv_to_list("greatworks",antilist) haircolorlist = csv_to_list("haircolors",antilist) hairstylelist = csv_to_list("hairstyles",antilist) - hairvomitlist = csv_to_list("hairvomit",antilist) + hairvomitlist = csv_to_list("hairvomit",antilist,"./csvfiles/",0,"?",False,False) humanactivitylist = csv_to_list("human_activities",antilist) humanoidlist = csv_to_list("humanoids",antilist) imagetypelist = csv_to_list("imagetypes",antilist) @@ -93,7 +93,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all foodlist = csv_to_list("foods", antilist) genderdescriptionlist = csv_to_list(csvfilename="genderdescription",antilist=antilist,skipheader=True,gender=gender) minilocationlist = csv_to_list("minilocations", antilist) - minioutfitlist = csv_to_list("minioutfits", antilist) + minioutfitlist = csv_to_list("minioutfits",antilist,"./csvfiles/",0,"?",False,False,gender) seasonlist = csv_to_list("seasons", antilist) elaborateoutfitlist = csv_to_list("elaborateoutfits", antilist) minivomitlist = csv_to_list("minivomit", antilist) @@ -118,6 +118,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # additional descriptor lists outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) hairdescriptorlist = csv_to_list("hairdescriptors",antilist) + humandescriptorlist = csv_to_list("humandescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -1423,10 +1424,16 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(descriptorsintheback < 2): # Common to have 1 description, uncommon to have 2 if(chance_roll(insanitylevel, subjectdescriptor1chance) and generatedescriptors == True): - completeprompt += "-descriptor- " + if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + completeprompt += "-humandescriptor- " + else: + completeprompt += "-descriptor- " if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): - completeprompt += "-descriptor- " + if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + completeprompt += "-humandescriptor- " + else: + completeprompt += "-descriptor- " if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, subjectbodytypechance) and generatebodytype == True): completeprompt += "-bodytype- " @@ -1680,10 +1687,17 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(descriptorsintheback == 2): # Common to have 1 description, uncommon to have 2 if(chance_roll(insanitylevel, subjectdescriptor1chance) and generatedescriptors == True): - completeprompt += ", OR(;-heshe- is;normal) OR(;a very;rare) -descriptor- " + if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + completeprompt += ", OR(;-heshe- is;normal) OR(;a very;rare) -humandescriptor- " + else: + completeprompt += ", OR(;-heshe- is;normal) OR(;a very;rare) -descriptor- " if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): - completeprompt += " and -descriptor- " + if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + completeprompt += " and -humandescriptor- " + else: + completeprompt += " and -descriptor- " + completeprompt += ", " # object additions for i in range(objectadditionsrepeats): @@ -2220,8 +2234,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt = "".join(completeprompt_list) # hair descriptor - if(rare_dist(insanitylevel)): # Use base outfit descriptor, until we are not. + if(rare_dist(insanitylevel)): # Use base hair descriptor, until we are not. completeprompt = completeprompt.replace("-hairdescriptor-", "-descriptor-",1) + + # hair descriptor + if(rare_dist(insanitylevel)): # Use base human descriptor, until we are not. + completeprompt = completeprompt.replace("-humandescriptor-", "-descriptor-",1) # first some manual stuff for outfit @@ -2330,9 +2348,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-himher-" in completeprompt or "-outfitdescriptor-" in completeprompt or "-hairdescriptor-" in completeprompt or - "-hairvomit-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-"] - 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist] + "-hairvomit-" in completeprompt or + "-humandescriptor-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-"] + 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2445,7 +2464,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender greatworklist = csv_to_list("greatworks",antilist) haircolorlist = csv_to_list("haircolors",antilist) hairstylelist = csv_to_list("hairstyles",antilist) - hairvomitlist = csv_to_list("hairvomit",antilist) + hairvomitlist = csv_to_list("hairvomit",antilist,"./csvfiles/",0,"?",False,False) humanactivitylist = csv_to_list("human_activities",antilist) humanoidlist = csv_to_list("humanoids",antilist) imagetypelist = csv_to_list("imagetypes",antilist) @@ -2464,7 +2483,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender foodlist = csv_to_list("foods", antilist) genderdescriptionlist = csv_to_list(csvfilename="genderdescription",antilist=antilist,skipheader=True,gender=gender) minilocationlist = csv_to_list("minilocations", antilist) - minioutfitlist = csv_to_list("minioutfits", antilist) + minioutfitlist = csv_to_list("minioutfits",antilist,"./csvfiles/",0,"?",False,False,gender) seasonlist = csv_to_list("seasons", antilist) elaborateoutfitlist = csv_to_list("elaborateoutfits", antilist) minivomitlist = csv_to_list("minivomit", antilist) @@ -2487,6 +2506,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender coveringlist = csv_to_list("coverings", antilist) outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) hairdescriptorlist = csv_to_list("hairdescriptors",antilist) + humandescriptorlist = csv_to_list("humandescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist + malefemalelist + manwomanlist + manwomanrelationlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -2663,6 +2683,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender prompt = prompt.replace(combination," -hairdescriptor- ") if lowercase_combination in [x.lower() for x in hairvomitlist] and chance_roll(insanitylevel, "rare"): prompt = prompt.replace(combination," -hairvomit- ") + if lowercase_combination in [x.lower() for x in humandescriptorlist] and chance_roll(insanitylevel, "rare"): + prompt = prompt.replace(combination," -humandescriptor- ") if lowercase_combination in [x.lower() for x in directionlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -direction- ") @@ -2873,9 +2895,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-covering-" in completeprompt or "-outfitdescriptor-" in completeprompt or "-hairdescriptor-" in completeprompt or - "-hairvomit-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-"] - 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist] + "-hairvomit-" in completeprompt or + "-humandescriptor-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-"] + 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2987,7 +3010,8 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy if(wildcard in ["-human-" ,"-humanoid-" , "-manwoman-" - , "-job-"] + , "-job-" + , "-manwomanrelation-"] and "-samehumansubject-" in completeprompt): if(completeprompt.index(wildcard) < completeprompt.index("-samehumansubject-")): completeprompt = completeprompt.replace("-samehumansubject-", "the " + replacementvalueforoverrides) @@ -3098,6 +3122,9 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5): completeprompt = re.sub('-artiststyle- art', '', completeprompt) completeprompt = re.sub('-artiststyle-', '', completeprompt) + completeprompt = re.sub('a his', 'his', completeprompt) + completeprompt = re.sub('a her', 'her', completeprompt) + completeprompt = re.sub('(? Date: Fri, 6 Oct 2023 08:24:35 +0200 Subject: [PATCH 25/42] job gendering --- build_dynamic_prompt.py | 29 +- csvfiles/body_types.csv | 5 +- csvfiles/jobs.csv | 753 +++++++++++++++++---------------- csvfiles/outfitdescriptors.csv | 1 + prompttester.py | 2 +- 5 files changed, 409 insertions(+), 381 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 134e09e..13b4377 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -78,7 +78,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all humanactivitylist = csv_to_list("human_activities",antilist) humanoidlist = csv_to_list("humanoids",antilist) imagetypelist = csv_to_list("imagetypes",antilist) - joblist = csv_to_list("jobs",antilist) + joblist = csv_to_list(csvfilename="jobs",antilist=antilist,skipheader=True,gender=gender) lenslist = csv_to_list("lenses",antilist) lightinglist = csv_to_list("lighting",antilist) malefemalelist = csv_to_list(csvfilename="malefemale",antilist=antilist,skipheader=True,gender=gender) @@ -1525,6 +1525,16 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all hybridorswap = "" + # move job or activity logic here. We want to place it at 2 different places maybe + genjoboractivity = False + if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, joboractivitychance) and humanspecial != 1 and generatesubject == True): + genjoboractivity = True + genjoboractivitylocationslist = ["front","middle","back", "back"] + genjoboractivitylocation = random.choice(genjoboractivitylocationslist) + + + if(genjoboractivity and genjoboractivitylocation=="front"): + completeprompt += "-job- " # if we have a given subject, we should skip making an actual subject @@ -1684,13 +1694,21 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # completion of strenght end completeprompt += "-objectstrengthend-" + if(genjoboractivity and genjoboractivitylocation=="middle"): + joboractivitylist = [joblist,humanactivitylist] + completeprompt += random.choice(random.choice(joboractivitylist)) + ", " + + if(descriptorsintheback == 2): # Common to have 1 description, uncommon to have 2 if(chance_roll(insanitylevel, subjectdescriptor1chance) and generatedescriptors == True): if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): - completeprompt += ", OR(;-heshe- is;normal) OR(;a very;rare) -humandescriptor- " + if(random.randint(0,3) > 0): + completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -humandescriptor- " + else: + completeprompt += ", OR(;the;normal) OR(-manwoman-;-samehumansubject-) is OR(;very;rare) -humandescriptor-" else: - completeprompt += ", OR(;-heshe- is;normal) OR(;a very;rare) -descriptor- " + completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -descriptor- " if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): @@ -1733,7 +1751,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","firstname"] and chance_roll(insanitylevel, joboractivitychance) and humanspecial != 1 and generatesubject == True): + if(genjoboractivity and genjoboractivitylocation=="back"): joboractivitylist = [joblist,humanactivitylist] completeprompt += random.choice(random.choice(joboractivitylist)) + ", " @@ -2468,7 +2486,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender humanactivitylist = csv_to_list("human_activities",antilist) humanoidlist = csv_to_list("humanoids",antilist) imagetypelist = csv_to_list("imagetypes",antilist) - joblist = csv_to_list("jobs",antilist) + joblist = joblist = csv_to_list(csvfilename="jobs",antilist=antilist,skipheader=True,gender=gender) lenslist = csv_to_list("lenses",antilist) lightinglist = csv_to_list("lighting",antilist) malefemalelist = csv_to_list(csvfilename="malefemale",antilist=antilist,skipheader=True,gender=gender) @@ -3110,6 +3128,7 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5): while " " in completeprompt: completeprompt = re.sub(' ', ' ', completeprompt) completeprompt = re.sub('a The', 'The', completeprompt) + completeprompt = re.sub('the the', 'the', completeprompt) completeprompt = re.sub(', ,', ',', completeprompt) completeprompt = re.sub(',,', ',', completeprompt) diff --git a/csvfiles/body_types.csv b/csvfiles/body_types.csv index 9b58174..0c61c8d 100644 --- a/csvfiles/body_types.csv +++ b/csvfiles/body_types.csv @@ -1,7 +1,7 @@ curvy;female voluptuous;female chubby;both -buxom;both +buxom;female heavyset;both full-figured;female fat;both @@ -40,4 +40,5 @@ light-weight;both flyweight;both short;both tall;both -strong;both \ No newline at end of file +strong;both +very tall, long legs;female \ No newline at end of file diff --git a/csvfiles/jobs.csv b/csvfiles/jobs.csv index b59335a..a84cede 100644 --- a/csvfiles/jobs.csv +++ b/csvfiles/jobs.csv @@ -1,373 +1,380 @@ -Pirate -Explorer -Scientist -Detective -Athlete -Musician -Chef -Politician -Entrepreneur -Artist -Sailor -Soldier -Astronaut -Author -Actor -Dancer -Singer -Architect -Engineer -Doctor -Lawyer -Teacher -Professor -Historian -Philosopher -Mathematician -Programmer -Designer -Journalist -Photographer -Filmmaker -Activist -Environmentalist -Humanitarian -Psychologist -Anthropologist -Sociologist -Economist -Businessperson -CEO -Marketer -Salesperson -Financial analyst -Economist -Geologist -Biologist -Chemist -Physicist -Veterinarian -Zoologist -Botanist -Ecologist -Ornithologist -Entomologist -Archeologist -Paleontologist -Cartographer -Surveyor -Explorer -Mountaineer -Rock climber -Surfer -Scuba diver -Skydiver -Base jumper -Race car driver -Pilot -Train conductor -Ship captain -Air traffic controller -Firefighter -Paramedic -Emergency medical technician -Police officer -Private investigator -Lawyer -Judge -Legal assistant -Paralegal -Librarian -Museum curator -Gallery owner -Music producer -Sound engineer -Record label executive -DJ -Music journalist -Music critic -Music teacher -Dance teacher -Theater director -Playwright -Set designer -Costume designer -Makeup artist -Fashion designer -Interior designer -Landscape architect -Personal trainer -Yoga instructor -Blacksmith -Baker -Brewer -Butcher -Carpenter -Cook -Cooper -Dockworker -Farmer -Fisherman -Glassblower -Hunter -Innkeeper -Jeweler -Leatherworker -Lumberjack -Mason -Miller -Miner -Potter -Sailor -Shepherd -Shoemaker -Silk weaver -Soldier -Spice merchant -Spinner -Tailor -Tanner -Trader -Vintner -Weaver -Woodcarver -Alchemist -Apothecary -Architect -Artist -Astronomer -Barber -Bookbinder -Calligrapher -Cartographer -Clerk -Clockmaker -Diplomat -Doctor -Engineer -Explorer -Farrier -Geographer -Goldsmith -Historian -Illustrator -Judge -Librarian -Mathematician -Mercenary -Musician -Notary -Painter -Philosopher -Physician -Pilgrim -Pirate -Printer -Professor -Rabbi -Sailor -Sculptor -Scribe -Shipbuilder -Spy -Surgeon -Tax collector -Teacher -Theologian -Town crier -Translator -Traveler -Troubadour -Watchmaker -Weaponsmith -Writer -Bard -Chancellor -Chronicler -Court jester -Executioner -Falconer -Footman -Gardener -Groom -Harpist -Herald -Jester -Lady-in-waiting -Page -Stablehand -Sword bearer -Valet -Knight -Mage -Rogue -Samurai -Barbarian -Assassin -Sorcerer -Paladin -Druid -Gladiator -Pirate -Ranger -Bard -Warlock -Monk -Necromancer -Witch -Alchemist -Summoner -Demon hunter -Archmage -Crusader -Elemental mage -Shadow assassin -Dark knight -Dragon slayer -Illusionist -Beastmaster -Time traveler -Vampire hunter -Blacksmith -Falconer -Astronomer -Herbalist -Inquisitor -Oracle -Scribe -Siege engineer -Swashbuckler -Templar -Thunderer -Warden -Arcanist -Bladesinger -Celestial -Dragon rider -Enchanter -Healer -Jester -Lancer -Marshal -Mystic -Necrophage -Phantom -Rune mage -Sentinel -Shadowmage -Soul reaver -Spellblade -Star mage -Technomancer -Theurge -Titan -Trickster -Valkyrie -Warlord -Weaver -Windcaller -Witch hunter -Abjurer -Arcane trickster -Beast tamer -Blood mage -Bounty hunter -Chaos mage -Chronomancer -Cryptographer -Death knight -Dragon knight -Dreamweaver -Elementalist -Enforcer -Executioner -Explorer -Fire mage -Frost mage -Geomancer -Ghost hunter -Grave robber -Guardian -Gunner -Harbinger -Ice queen/king -Investigator -Judge -Knight errant -Librarian -Loremaster -Mage slayer -Mind reader -Bishop -Cardinal -Chaplain -Deacon -Elder -Friar -Imām -Monk -Nuncio -Pastor -Priest -Rabbi -Reverend -Sister -Vicar -Abbot -Canon -Chancellor -Confessor -Curate -Exorcist -Inquisitor -Lector -Missionary -Papal legate -Private -Private First Class -Lance Corporal -Corporal -Sergeant -Staff Sergeant -Gunnery Sergeant -Master Sergeant -First Sergeant -Sergeant Major -Command Sergeant Major -Sergeant Major of the Army -Second Lieutenant -First Lieutenant -Captain -Major -Lieutenant Colonel -Colonel -Brigadier General -General -King -Queen -Lord -Lady -Duke -Duchess -Count -Countess -Baron -Baroness -Nobleman -Vizier -Sultan -Geisha -Yogi -Adventurer -Royalty -Cowboy -Cowgirl -Pop Singer -President -Construction worker -Idol -Nerd -Geek -Muse -Ballerina -Fighting game character \ No newline at end of file +Pirate;both +Explorer;both +Scientist;both +Detective;both +Athlete;both +Musician;both +Chef;both +Politician;both +Entrepreneur;both +Artist;both +Sailor;both +Soldier;both +Astronaut;both +Author;both +Actor;both +Dancer;both +Singer;both +Architect;both +Engineer;both +Doctor;both +Lawyer;both +Teacher;both +Professor;both +Historian;both +Philosopher;both +Mathematician;both +Programmer;both +Designer;both +Journalist;both +Photographer;both +Filmmaker;both +Activist;both +Environmentalist;both +Humanitarian;both +Psychologist;both +Anthropologist;both +Sociologist;both +Economist;both +Businessperson;both +CEO;both +Marketer;both +Salesperson;both +Financial analyst;both +Economist;both +Geologist;both +Biologist;both +Chemist;both +Physicist;both +Veterinarian;both +Zoologist;both +Botanist;both +Ecologist;both +Ornithologist;both +Entomologist;both +Archeologist;both +Paleontologist;both +Cartographer;both +Surveyor;both +Explorer;both +Mountaineer;both +Rock climber;both +Surfer;both +Scuba diver;both +Skydiver;both +Base jumper;both +Race car driver;both +Pilot;both +Train conductor;both +Ship captain;both +Air traffic controller;both +Firefighter;both +Paramedic;both +Emergency medical technician;both +Police officer;both +Private investigator;both +Lawyer;both +Judge;both +Legal assistant;both +Paralegal;both +Librarian;both +Museum curator;both +Gallery owner;both +Music producer;both +Sound engineer;both +Record label executive;both +DJ;both +Music journalist;both +Music critic;both +Music teacher;both +Dance teacher;both +Theater director;both +Playwright;both +Set designer;both +Costume designer;both +Makeup artist;both +Fashion designer;both +Interior designer;both +Landscape architect;both +Personal trainer;both +Yoga instructor;both +Blacksmith;both +Baker;both +Brewer;both +Butcher;both +Carpenter;both +Cook;both +Cooper;both +Dockworker;both +Farmer;both +Fisherman;both +Glassblower;both +Hunter;both +Innkeeper;both +Jeweler;both +Leatherworker;both +Lumberjack;both +Mason;both +Miller;both +Miner;both +Potter;both +Sailor;both +Shepherd;both +Shoemaker;both +Silk weaver;both +Soldier;both +Spice merchant;both +Spinner;both +Tailor;both +Tanner;both +Trader;both +Vintner;both +Weaver;both +Woodcarver;both +Alchemist;both +Apothecary;both +Architect;both +Artist;both +Astronomer;both +Barber;both +Bookbinder;both +Calligrapher;both +Cartographer;both +Clerk;both +Clockmaker;both +Diplomat;both +Doctor;both +Engineer;both +Explorer;both +Farrier;both +Geographer;both +Goldsmith;both +Historian;both +Illustrator;both +Judge;both +Librarian;both +Mathematician;both +Mercenary;both +Musician;both +Notary;both +Painter;both +Philosopher;both +Physician;both +Pilgrim;both +Pirate;both +Printer;both +Professor;both +Rabbi;both +Sailor;both +Sculptor;both +Scribe;both +Shipbuilder;both +Spy;both +Surgeon;both +Tax collector;both +Teacher;both +Theologian;both +Town crier;both +Translator;both +Traveler;both +Troubadour;both +Watchmaker;both +Weaponsmith;both +Writer;both +Bard;both +Chancellor;both +Chronicler;both +Court jester;both +Executioner;both +Falconer;both +Footman;both +Gardener;both +Groom;both +Harpist;both +Herald;both +Jester;both +Lady-in-waiting;female +Page;both +Stablehand;both +Sword bearer;both +Valet;both +Knight;both +Mage;both +Rogue;both +Samurai;both +Barbarian;both +Assassin;both +Sorcerer;both +Paladin;both +Druid;both +Gladiator;both +Pirate;both +Ranger;both +Bard;both +Warlock;both +Monk;both +Necromancer;both +Witch;female +Alchemist;both +Summoner;both +Demon hunter;both +Archmage;both +Crusader;both +Elemental mage;both +Shadow assassin;both +Dark knight;both +Dragon slayer;both +Illusionist;both +Beastmaster;both +Time traveler;both +Vampire hunter;both +Blacksmith;both +Falconer;both +Astronomer;both +Herbalist;both +Inquisitor;both +Oracle;both +Scribe;both +Siege engineer;both +Swashbuckler;both +Templar;both +Thunderer;both +Warden;both +Arcanist;both +Bladesinger;both +Celestial;both +Dragon rider;both +Enchanter;both +Healer;both +Jester;both +Lancer;both +Marshal;both +Mystic;both +Necrophage;both +Phantom;both +Rune mage;both +Sentinel;both +Shadowmage;both +Soul reaver;both +Spellblade;both +Star mage;both +Technomancer;both +Theurge;both +Titan;both +Trickster;both +Valkyrie;both +Warlord;both +Weaver;both +Windcaller;both +Witch hunter;both +Abjurer;both +Arcane trickster;both +Beast tamer;both +Blood mage;both +Bounty hunter;both +Chaos mage;both +Chronomancer;both +Cryptographer;both +Death knight;both +Dragon knight;both +Dreamweaver;both +Elementalist;both +Enforcer;both +Executioner;both +Explorer;both +Fire mage;both +Frost mage;both +Geomancer;both +Ghost hunter;both +Grave robber;both +Guardian;both +Gunner;both +Harbinger;both +Ice queen;female +Ice king;male +Investigator;both +Judge;both +Knight errant;both +Librarian;both +Loremaster;both +Mage slayer;both +Mind reader;both +Bishop;both +Cardinal;both +Chaplain;both +Deacon;both +Elder;both +Friar;both +Imām;both +Monk;both +Nuncio;both +Pastor;both +Priest;both +Rabbi;both +Reverend;both +Sister;female +Vicar;both +Abbot;both +Canon;both +Chancellor;both +Confessor;both +Curate;both +Exorcist;both +Inquisitor;both +Lector;both +Missionary;both +Papal legate;both +Private;both +Private First Class;both +Lance Corporal;both +Corporal;both +Sergeant;both +Staff Sergeant;both +Gunnery Sergeant;both +Master Sergeant;both +First Sergeant;both +Sergeant Major;both +Command Sergeant Major;both +Sergeant Major of the Army;both +Second Lieutenant;both +First Lieutenant;both +Captain;both +Major;both +Lieutenant Colonel;both +Colonel;both +Brigadier General;both +General;both +King;male +Queen;female +Lord;male +Lady;female +Duke;male +Duchess;female +Count;male +Countess;female +Baron;male +Baroness;female +Nobleman;male +Vizier;both +Sultan;both +Geisha;both +Yogi;both +Adventurer;both +Royalty;both +Cowboy;male +Cowgirl;female +Pop Singer;both +President;both +Construction worker;both +Idol;both +Nerd;both +Geek;both +Muse;both +Ballerina;female +Ballerino;male +Fighting game character;both +femme fatale;female +bimbo;female +hunk;male +plain jane;female +southern belle;female \ No newline at end of file diff --git a/csvfiles/outfitdescriptors.csv b/csvfiles/outfitdescriptors.csv index 307cb9a..933a508 100644 --- a/csvfiles/outfitdescriptors.csv +++ b/csvfiles/outfitdescriptors.csv @@ -48,6 +48,7 @@ Breathtaking Bright Captivating Cartoony +Casual Celestial Charming Chic diff --git a/prompttester.py b/prompttester.py index ee4b6ef..45192a5 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,7 +51,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,5 +generateprompts(10,8 ,"humanoid" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" From eb5cd6443660575887f0d5ae4d354fbffc40cc55 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Fri, 6 Oct 2023 09:10:24 +0200 Subject: [PATCH 26/42] multiple subjects are in, nice --- OneButtonPromptNodes.py | 7 ++- build_dynamic_prompt.py | 77 +++++++++++++++++++++--------- csvfiles/accessories.csv | 5 +- csvfiles/buildings.csv | 1 + csvfiles/config/default_config.csv | 1 + csvfiles/descriptors.csv | 2 + csvfiles/humanoids.csv | 4 +- csvfiles/jobs.csv | 3 +- csvfiles/manwomanmultiples.csv | 8 ++++ csvfiles/manwomanrelations.csv | 4 +- csvfiles/othertypes.csv | 3 +- csvfiles/vehicles.csv | 7 ++- prompttester.py | 8 +++- promptvarianttester.py | 2 +- scripts/onebuttonprompt.py | 8 +++- 15 files changed, 103 insertions(+), 37 deletions(-) create mode 100644 csvfiles/manwomanmultiples.csv diff --git a/OneButtonPromptNodes.py b/OneButtonPromptNodes.py index 3c838b3..1cd8b8c 100644 --- a/OneButtonPromptNodes.py +++ b/OneButtonPromptNodes.py @@ -53,6 +53,7 @@ generateflora = True generateanimal = True generatemanwoman = True generatemanwomanrelation = True +generatemanwomanmultiple = True generatefictionalcharacter = True generatenonfictionalcharacter = True generatehumanoids = True @@ -88,6 +89,8 @@ for item in config: generatemanwoman = False if item[0] == 'subject_manwomanrelation' and item[1] != 'on': generatemanwomanrelation = False + if item[0] == 'subject_manwomanmultiple' and item[1] != 'on': + generatemanwomanmultiple = False if item[0] == 'subject_fictional' and item[1] != 'on': generatefictionalcharacter = False if item[0] == 'subject_nonfictional' and item[1] != 'on': @@ -118,7 +121,7 @@ if(generatevehicle or generateobject or generatefood or generatebuilding or gene subjects.append("object") if(generateanimal): subjects.append("animal") -if(generatemanwoman or generatemanwomanrelation or generatefictionalcharacter or generatenonfictionalcharacter or generatehumanoids or generatejob): +if(generatemanwoman or generatemanwomanrelation or generatefictionalcharacter or generatenonfictionalcharacter or generatehumanoids or generatejob or generatemanwomanmultiple): subjects.append("humanoid") if(generatelandscape): subjects.append("landscape") @@ -160,6 +163,8 @@ if(generatejob): subjectsubtypeshumanoid.append("based on job or title") if(generatefirstnames): subjectsubtypeshumanoid.append("based on first name") +if(generatemanwomanmultiple): + subjectsubtypeshumanoid.append("multiple humans") # concepts if(generateevent): diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 13b4377..d61416c 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -105,6 +105,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all songlinelist = csv_to_list("songlines", antilist) musicgenrelist = csv_to_list("musicgenres", antilist) manwomanrelationlist = csv_to_list(csvfilename="manwomanrelations",antilist=antilist,skipheader=True,gender=gender) + manwomanmultiplelist = csv_to_list(csvfilename="manwomanmultiples",antilist=antilist,skipheader=True,gender=gender,delimiter="?") waterlocationlist = csv_to_list("waterlocations", antilist) containerlist = csv_to_list("containers", antilist) firstnamelist = csv_to_list(csvfilename="firstnames",antilist=antilist,skipheader=True,gender=gender) @@ -216,6 +217,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all generateanimal = True generatemanwoman = True generatemanwomanrelation = True + generatemanwomanmultiple = True generatefictionalcharacter = True generatenonfictionalcharacter = True generatehumanoids = True @@ -323,6 +325,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all generatemanwoman = False if item[0] == 'subject_manwomanrelation' and item[1] != 'on': generatemanwomanrelation = False + if item[0] == 'subject_manwomanmultiple' and item[1] != 'on': + generatemanwomanmultiple = False if item[0] == 'subject_fictional' and item[1] != 'on': generatefictionalcharacter = False if item[0] == 'subject_nonfictional' and item[1] != 'on': @@ -531,9 +535,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all generatehumanoids = bool(humanoidlist) and generatehumanoids generatemanwoman = bool(manwomanlist) and generatemanwoman generatemanwomanrelation = bool(manwomanrelationlist) and generatemanwomanrelation + generatemanwomanmultiple = bool(manwomanmultiplelist) and generatemanwomanmultiple generatejob = bool(joblist) and generatejob generatefirstnames = bool(firstnamelist) and generatefirstnames - generatehumanoid = generatefictionalcharacter or generatenonfictionalcharacter or generatehumanoids or generatemanwoman or generatejob or generatemanwomanrelation or generatefirstnames + generatehumanoid = generatefictionalcharacter or generatenonfictionalcharacter or generatehumanoids or generatemanwoman or generatejob or generatemanwomanrelation or generatefirstnames or generatemanwomanmultiple if(generatefictionalcharacter): @@ -556,6 +561,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(generatemanwomanrelation): humanoidsubjectchooserlist.append("manwomanrelation") + + if(generatemanwomanmultiple): + humanoidsubjectchooserlist.append("manwomanmultiple") if(generatejob): humanoidsubjectchooserlist.append("job") @@ -1015,6 +1023,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(random.randint(4,13) > insanitylevel and "manwomanrelation" in humanoidsubjectchooserlist): humanoidsubjectchooserlist.remove("manwomanrelation") + if(random.randint(4,13) > insanitylevel and "manwomanmultiple" in humanoidsubjectchooserlist): + humanoidsubjectchooserlist.remove("manwomanmultiple") if(random.randint(4,13) > insanitylevel and "firstname" in humanoidsubjectchooserlist): humanoidsubjectchooserlist.remove("firstname") if(random.randint(3,11) > insanitylevel and "job" in humanoidsubjectchooserlist): @@ -1042,6 +1052,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all subjectchooser = "human" if(subtypehumanoid == "generic human relations"): subjectchooser = "manwomanrelation" + if(subtypehumanoid == "multiple humans"): + subjectchooser = "manwomanmultiple" if(subtypehumanoid == "celebrities e.a."): subjectchooser = "non fictional" if(subtypehumanoid == "fictional characters"): @@ -1079,6 +1091,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all heshelist = ["she"] hisherlist = ["her"] himherlist = ["her"] + if(subjectchooser in ["manwomanmultiple"]): + heshelist = ["they"] + hisherlist = ["their"] + himherlist = ["them"] @@ -1424,21 +1440,21 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(descriptorsintheback < 2): # Common to have 1 description, uncommon to have 2 if(chance_roll(insanitylevel, subjectdescriptor1chance) and generatedescriptors == True): - if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"]): completeprompt += "-humandescriptor- " else: completeprompt += "-descriptor- " if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): - if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"]): completeprompt += "-humandescriptor- " else: completeprompt += "-descriptor- " - if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, subjectbodytypechance) and generatebodytype == True): + if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","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","firstname"] and chance_roll(insanitylevel, subjectculturechance) and generatedescriptors == True): + if(subjectchooser in ["object","animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"] and chance_roll(insanitylevel, subjectculturechance) and generatedescriptors == True): completeprompt += "-culture- " if(mainchooser == "object"): @@ -1527,7 +1543,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # move job or activity logic here. We want to place it at 2 different places maybe genjoboractivity = False - if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, joboractivitychance) and humanspecial != 1 and generatesubject == True): + if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"] and chance_roll(insanitylevel, joboractivitychance) and humanspecial != 1 and generatesubject == True): genjoboractivity = True genjoboractivitylocationslist = ["front","middle","back", "back"] genjoboractivitylocation = random.choice(genjoboractivitylocationslist) @@ -1549,6 +1565,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(subjectchooser == "manwomanrelation"): completeprompt += "-manwomanrelation- " + if(subjectchooser == "manwomanmultiple"): + completeprompt += "-manwomanmultiple- " + if(subjectchooser == "job"): completeprompt += "-malefemale- " completeprompt += "-job- " @@ -1702,16 +1721,18 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(descriptorsintheback == 2): # Common to have 1 description, uncommon to have 2 if(chance_roll(insanitylevel, subjectdescriptor1chance) and generatedescriptors == True): - if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple", "firstname"]): if(random.randint(0,3) > 0): completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -humandescriptor- " + elif(subjectchooser == "manwomanmultiple"): + completeprompt += ", the -samehumansubject are OR(;very;rare) -humandescriptor-" else: completeprompt += ", OR(;the;normal) OR(-manwoman-;-samehumansubject-) is OR(;very;rare) -humandescriptor-" else: completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -descriptor- " if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): - if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple","firstname"]): completeprompt += " and -humandescriptor- " else: completeprompt += " and -descriptor- " @@ -1724,7 +1745,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","firstname"] and chance_roll(insanitylevel, humanadditionchance) and generatehumanaddition == True): + if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple","firstname"] and chance_roll(insanitylevel, humanadditionchance) and generatehumanaddition == True): humanspecial = 1 completeprompt += "-humanaddition- " @@ -1740,7 +1761,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","firstname"] and chance_roll(insanitylevel, emojichance) and generateemoji== True): + if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple","firstname"] and chance_roll(insanitylevel, emojichance) and generateemoji== True): completeprompt += "-emoji-, " @@ -1770,20 +1791,20 @@ 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", "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): completeprompt += " " + random.choice(buildoutfitlist) + ", " elif(overrideoutfit != ""): completeprompt += " " + random.choice(buildoutfitlist) + ", " - if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, posechance) and humanspecial != 1 and generatepose == True): + if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple", "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", "firstname"] and chance_roll(insanitylevel, hairchance) and generatehairstyle == True): + if(subjectchooser in ["human","job","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple", "firstname"] and chance_roll(insanitylevel, hairchance) and generatehairstyle == True): completeprompt += random.choice(buildhairlist) + ", " if(unique_dist(insanitylevel)): completeprompt += " -hairvomit-, " - if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation", "firstname"] and chance_roll(insanitylevel, accessorychance) and generateaccessorie == True and generateaccessories == True): + if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple", "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): @@ -2219,7 +2240,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # Sometimes change he/she to the actual subject # Doesnt work if someone puts in a manual subject - if(mainchooser == "humanoid" and givensubject == ""): + if(mainchooser == "humanoid" and givensubject == "" and subjectchooser != "manwomanmultiple"): samehumanreplacementlist = ["-heshe-","-heshe-","-heshe-","-heshe-","-heshe-", "-samehumansubject-", "-samehumansubject-", "-samehumansubject-", "-samehumansubject-", "-samehumansubject-"] random.shuffle(samehumanreplacementlist) @@ -2255,7 +2276,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(rare_dist(insanitylevel)): # Use base hair descriptor, until we are not. completeprompt = completeprompt.replace("-hairdescriptor-", "-descriptor-",1) - # hair descriptor + # human descriptor if(rare_dist(insanitylevel)): # Use base human descriptor, until we are not. completeprompt = completeprompt.replace("-humandescriptor-", "-descriptor-",1) @@ -2275,6 +2296,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # If we don't have an override outfit, then remove this part completeprompt = completeprompt.replace("-overrideoutfit-", "") + # sometimes replace a descriptor with a artmovement, only on high insanitylevels + if(insanitylevel > 7 and unique_dist(insanitylevel)): + completeprompt = completeprompt.replace("-descriptor-", "-artmovement-",1) # lol, this needs a rewrite :D @@ -2350,6 +2374,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-direction-" in completeprompt or "-styletilora-" in completeprompt or "-manwomanrelation-" in completeprompt or + "-manwomanmultiple-" in completeprompt or "-waterlocation-" in completeprompt or "-container-" in completeprompt or "-firstname-" in completeprompt or @@ -2368,8 +2393,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-hairdescriptor-" in completeprompt or "-hairvomit-" in completeprompt or "-humandescriptor-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-"] - 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist] + 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-"] + 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2513,6 +2538,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender songlinelist = csv_to_list("songlines", antilist) musicgenrelist = csv_to_list("musicgenres", antilist) manwomanrelationlist = csv_to_list(csvfilename="manwomanrelations",antilist=antilist,skipheader=True,gender=gender) + manwomanmultiplelist = csv_to_list(csvfilename="manwomanmultiples",antilist=antilist,skipheader=True,gender=gender,delimiter="?") waterlocationlist = csv_to_list("waterlocations", antilist) containerlist = csv_to_list("containers", antilist) firstnamelist = csv_to_list(csvfilename="firstnames",antilist=antilist,skipheader=True,gender=gender) @@ -2526,7 +2552,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender hairdescriptorlist = csv_to_list("hairdescriptors",antilist) humandescriptorlist = csv_to_list("humandescriptors",antilist) - humanlist = fictionallist + nonfictionallist + humanoidlist + malefemalelist + manwomanlist + manwomanrelationlist + humanlist = fictionallist + nonfictionallist + humanoidlist + malefemalelist + manwomanlist + manwomanrelationlist + manwomanmultiplelist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist outfitprinttotallist = objecttotallist + locationlist + colorlist + musicgenrelist + seasonlist + animallist + patternlist @@ -2784,6 +2810,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender prompt = prompt.replace(combination," -musicgenre- ") if lowercase_combination in [x.lower() for x in manwomanrelationlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -manwomanrelation- ") + if lowercase_combination in [x.lower() for x in manwomanmultiplelist] and chance_roll(insanitylevel, "uncommon"): + prompt = prompt.replace(combination," -manwomanmultiple- ") if lowercase_combination in [x.lower() for x in waterlocationlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -waterlocation- ") if lowercase_combination in [x.lower() for x in containerlist] and chance_roll(insanitylevel, "uncommon"): @@ -2901,6 +2929,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-direction-" in completeprompt or "-styletilora-" in completeprompt or "-manwomanrelation-" in completeprompt or + "-manwomanmultiple-" in completeprompt or "-waterlocation-" in completeprompt or "-container-" in completeprompt or "-firstname-" in completeprompt or @@ -2915,8 +2944,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-hairdescriptor-" in completeprompt or "-hairvomit-" in completeprompt or "-humandescriptor-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-"] - 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist] + 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-"] + 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -3045,7 +3074,7 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy if(wildcard in ["-malefemale-"] and "-samehumansubject-" in completeprompt): if(completeprompt.index(wildcard) < completeprompt.index("-samehumansubject-")): - completeprompt = completeprompt.replace("-samehumansubject-", "the " + replacementvalueforoverrides,1) + completeprompt = completeprompt.replace("-samehumansubject-", "the " + replacementvalueforoverrides) if(wildcard in ["-animal-" , "-object-" @@ -3056,7 +3085,7 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy , "-flora-"] and "-sameothersubject-" in completeprompt): if(completeprompt.index(wildcard) < completeprompt.index("-sameothersubject-")): - completeprompt = completeprompt.replace("-sameothersubject-", "the " + replacementvalueforoverrides,1) + completeprompt = completeprompt.replace("-sameothersubject-", "the " + replacementvalueforoverrides) @@ -3143,6 +3172,8 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5): completeprompt = re.sub('a his', 'his', completeprompt) completeprompt = re.sub('a her', 'her', completeprompt) + completeprompt = re.sub('they is', 'they are', completeprompt) + completeprompt = re.sub('they has', 'they have', completeprompt) completeprompt = re.sub('(?, background is a lush jungle and a woman wearing a summer dress, -artmovement-", 5) \ No newline at end of file +generatepromptvariants(10,"purple (galaxy) in a (bottle:1.2), , background is a lush jungle and a woman wearing a summer dress, -artmovement-", 5) \ No newline at end of file diff --git a/scripts/onebuttonprompt.py b/scripts/onebuttonprompt.py index d71d8a1..c67e634 100644 --- a/scripts/onebuttonprompt.py +++ b/scripts/onebuttonprompt.py @@ -88,6 +88,7 @@ generateflora = True generateanimal = True generatemanwoman = True generatemanwomanrelation = True +generatemanwomanmultiple = True generatefictionalcharacter = True generatenonfictionalcharacter = True generatehumanoids = True @@ -123,6 +124,8 @@ for item in config: generatemanwoman = False if item[0] == 'subject_manwomanrelation' and item[1] != 'on': generatemanwomanrelation = False + if item[0] == 'subject_manwomanmultiple' and item[1] != 'on': + generatemanwomanmultiple = False if item[0] == 'subject_fictional' and item[1] != 'on': generatefictionalcharacter = False if item[0] == 'subject_nonfictional' and item[1] != 'on': @@ -153,7 +156,7 @@ if(generatevehicle or generateobject or generatefood or generatebuilding or gene subjects.append("object") if(generateanimal): subjects.append("animal") -if(generatemanwoman or generatemanwomanrelation or generatefictionalcharacter or generatenonfictionalcharacter or generatehumanoids or generatejob): +if(generatemanwoman or generatemanwomanrelation or generatefictionalcharacter or generatenonfictionalcharacter or generatehumanoids or generatejob or generatemanwomanmultiple): subjects.append("humanoid") if(generatelandscape): subjects.append("landscape") @@ -195,6 +198,9 @@ if(generatejob): subjectsubtypeshumanoid.append("based on job or title") if(generatefirstnames): subjectsubtypeshumanoid.append("based on first name") +if(generatemanwomanmultiple): + subjectsubtypeshumanoid.append("multiple humans") + # concepts if(generateevent): From f81705bcc498925b346216a095a415c3ad6a5c4b Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Fri, 6 Oct 2023 09:26:53 +0200 Subject: [PATCH 27/42] minor fixes --- build_dynamic_prompt.py | 10 +++++++--- prompttester.py | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index d61416c..d0bd043 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -1430,7 +1430,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all elif(generateshot == True): completeprompt += ", " - + genjoboractivity = False # start subject building if(generatesubject == True): # start with descriptive qualities @@ -1450,6 +1450,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += "-humandescriptor- " else: completeprompt += "-descriptor- " + + # age, very rare to add. + if(subjectchooser in ["human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"] and extraordinary_dist(insanitylevel)): + completeprompt += str(random.randint(20,99)) + " OR(y.o.;year old) " if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"] and chance_roll(insanitylevel, subjectbodytypechance) and generatebodytype == True): completeprompt += "-bodytype- " @@ -1542,7 +1546,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all hybridorswap = "" # move job or activity logic here. We want to place it at 2 different places maybe - genjoboractivity = False + if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"] and chance_roll(insanitylevel, joboractivitychance) and humanspecial != 1 and generatesubject == True): genjoboractivity = True genjoboractivitylocationslist = ["front","middle","back", "back"] @@ -1727,7 +1731,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all elif(subjectchooser == "manwomanmultiple"): completeprompt += ", the -samehumansubject are OR(;very;rare) -humandescriptor-" else: - completeprompt += ", OR(;the;normal) OR(-manwoman-;-samehumansubject-) is OR(;very;rare) -humandescriptor-" + completeprompt += ", OR(the -manwoman-;-samehumansubject-) is OR(;very;rare) -humandescriptor-" else: completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -descriptor- " diff --git a/prompttester.py b/prompttester.py index 33e1ae6..b5d7932 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,8 +51,8 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,8 - ,"" # subject +generateprompts(10,5 + ,"humanoid" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT -heshe- -heshe- -heshe- -minioutfit-" From 312b30e873ed01c6a1560204e808710f661142fa Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 07:19:49 +0200 Subject: [PATCH 28/42] minor additions --- build_dynamic_prompt.py | 6 ++++++ csvfiles/body_types.csv | 4 +++- csvfiles/manwoman.csv | 2 +- csvfiles/manwomanmultiples.csv | 8 ++++++-- prompttester.py | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index d0bd043..ff8fac0 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -3179,6 +3179,12 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5): completeprompt = re.sub('they is', 'they are', completeprompt) completeprompt = re.sub('they has', 'they have', completeprompt) + # clean up some hacky multiples with adding a s to the end + completeprompt = re.sub('fs ', 'ves ', completeprompt) + completeprompt = re.sub('fs,', 'ves,', completeprompt) + completeprompt = re.sub('sss ', 'ss ', completeprompt) + completeprompt = re.sub('sss,', 'ss,', completeprompt) + completeprompt = re.sub('(? Date: Sat, 7 Oct 2023 07:47:19 +0200 Subject: [PATCH 29/42] something special, something secret --- build_dynamic_prompt.py | 65 ++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 17 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index ff8fac0..e229baf 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -904,6 +904,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all hybridorswap = "" artistmode = "normal" insideshot = 0 + buildingfullmode = False completeprompt += prefixprompt @@ -999,7 +1000,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all - + # choose the main subject type mainchooser = random.choice(mainchooserlist) if(forcesubject != "" and forcesubject != "all"): @@ -1435,6 +1436,16 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(generatesubject == True): # start with descriptive qualities + # Once in a very rare while, we get a ... full of ...s + if(novel_dist(insanitylevel) and subjectchooser in ["animal", "animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","firstname"]): + buildingfullmode = True + insideshot = 1 + heshelist = ["they"] + hisherlist = ["their"] + himherlist = ["them"] + completeprompt += "a OR(-building-;-location-;-waterlocation-;-container-;rare) full of " + + # Sometimes the descriptors are at the back, in more natural language. Lets determine. descriptorsintheback = random.randint(0,2) if(descriptorsintheback < 2): @@ -1549,7 +1560,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"] and chance_roll(insanitylevel, joboractivitychance) and humanspecial != 1 and generatesubject == True): genjoboractivity = True - genjoboractivitylocationslist = ["front","middle","back", "back"] + genjoboractivitylocationslist = ["front","middle", "middle","back","back", "back"] genjoboractivitylocation = random.choice(genjoboractivitylocationslist) @@ -1564,25 +1575,25 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(givensubject==""): if(subjectchooser == "human"): - completeprompt += "-manwoman- " + completeprompt += "-manwoman-" if(subjectchooser == "manwomanrelation"): - completeprompt += "-manwomanrelation- " + completeprompt += "-manwomanrelation-" if(subjectchooser == "manwomanmultiple"): - completeprompt += "-manwomanmultiple- " + completeprompt += "-manwomanmultiple-" if(subjectchooser == "job"): completeprompt += "-malefemale- " - completeprompt += "-job- " + completeprompt += "-job-" if(subjectchooser == "fictional"): - if(rare_dist(insanitylevel) and advancedprompting == True): + if(rare_dist(insanitylevel) and advancedprompting == True and buildingfullmode == False): hybridorswaplist = ["hybrid", "swap"] hybridorswap = random.choice(hybridorswaplist) completeprompt += "[" - completeprompt += "-fictional- " + completeprompt += "-fictional-" if(hybridorswap == "hybrid"): completeprompt += "|" + random.choice(hybridhumanlist) + " ] " @@ -1591,12 +1602,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all hybridorswap = "" if(subjectchooser == "non fictional"): - if(rare_dist(insanitylevel) and advancedprompting == True): + if(rare_dist(insanitylevel) and advancedprompting == True and buildingfullmode == False): hybridorswaplist = ["hybrid", "swap"] hybridorswap = random.choice(hybridorswaplist) completeprompt += "[" - completeprompt += "-nonfictional- " + completeprompt += "-nonfictional-" if(hybridorswap == "hybrid"): completeprompt += "|" + random.choice(hybridhumanlist) + "] " @@ -1607,12 +1618,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(subjectchooser == "humanoid"): if(gender != "all"): completeprompt += "-malefemale- " - if(rare_dist(insanitylevel) and advancedprompting == True): + if(rare_dist(insanitylevel) and advancedprompting == True and buildingfullmode == False): hybridorswaplist = ["hybrid", "swap"] hybridorswap = random.choice(hybridorswaplist) completeprompt += "[" - completeprompt += "-humanoid- " + completeprompt += "-humanoid-" if(hybridorswap == "hybrid"): completeprompt += "|" + random.choice(hybridhumanlist) + "] " @@ -1621,19 +1632,21 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all hybridorswap = "" if(subjectchooser == "firstname"): - if(rare_dist(insanitylevel) and advancedprompting == True): + if(rare_dist(insanitylevel) and advancedprompting == True and buildingfullmode == False): hybridorswaplist = ["hybrid", "swap"] hybridorswap = random.choice(hybridorswaplist) completeprompt += "[" - completeprompt += "-firstname- " + completeprompt += "-firstname-" if(hybridorswap == "hybrid"): completeprompt += "|" + "-firstname-" + "] " if(hybridorswap == "swap"): completeprompt += ":" + "-firstname-" + ":" + str(random.randint(1,5)) + "] " hybridorswap = "" - + if(buildingfullmode == True): + completeprompt += "s" + completeprompt += " " else: completeprompt += " " + givensubject + " " @@ -1678,7 +1691,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += "-objectstrengthend-" # shots from inside can create cool effects in landscapes - if(chance_roll(insanitylevel, subjectlandscapeaddonlocationchance)): + if(chance_roll(insanitylevel, subjectlandscapeaddonlocationchance) and insideshot == 0): insideshot = 1 completeprompt += " from inside of a -addontolocationinside- " @@ -1729,7 +1742,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(random.randint(0,3) > 0): completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -humandescriptor- " elif(subjectchooser == "manwomanmultiple"): - completeprompt += ", the -samehumansubject are OR(;very;rare) -humandescriptor-" + completeprompt += ", the -samehumansubject- are OR(;very;rare) -humandescriptor-" else: completeprompt += ", OR(the -manwoman-;-samehumansubject-) is OR(;very;rare) -humandescriptor-" else: @@ -3151,6 +3164,7 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5): completeprompt = re.sub(',::', '::', completeprompt) completeprompt = re.sub(',:', ':', completeprompt) + completeprompt = re.sub(',,', ', ', completeprompt) completeprompt = re.sub(',,', ', ', completeprompt) completeprompt = re.sub(',,,', ', ', completeprompt) completeprompt = re.sub(', ,', ',', completeprompt) @@ -3168,6 +3182,15 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5): completeprompt = re.sub(', of a', ' of a', completeprompt) completeprompt = re.sub('of a,', 'of a', completeprompt) completeprompt = re.sub('of a of a', 'of a', completeprompt) + completeprompt = re.sub(' a a ', ' a ', completeprompt) + + # a / an + completeprompt = re.sub(' a a', ' an a', completeprompt) + completeprompt = re.sub(' a e', ' an e', completeprompt) + completeprompt = re.sub(' a i', ' an i', completeprompt) + completeprompt = re.sub(' a u', ' an u', completeprompt) + completeprompt = re.sub(' a o', ' an o', completeprompt) + completeprompt = re.sub('art art', 'art', completeprompt) completeprompt = re.sub('-artiststyle- art,', '', completeprompt) @@ -3184,6 +3207,14 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5): completeprompt = re.sub('fs,', 'ves,', completeprompt) completeprompt = re.sub('sss ', 'ss ', completeprompt) completeprompt = re.sub('sss,', 'ss,', completeprompt) + completeprompt = re.sub(' Mans', ' Men,', completeprompt) + completeprompt = re.sub(' mans', ' men', completeprompt) + completeprompt = re.sub(' Womans,', ' Women', completeprompt) + completeprompt = re.sub(' womans,', ' women,', completeprompt) + completeprompt = re.sub('\(Mans', '(Men,', completeprompt) + completeprompt = re.sub('\(mans', '(men', completeprompt) + completeprompt = re.sub('\(Womans', '(Women', completeprompt) + completeprompt = re.sub('\(womans', '(women', completeprompt) completeprompt = re.sub('(? Date: Sat, 7 Oct 2023 07:55:55 +0200 Subject: [PATCH 30/42] adding outfit override to comfyUI node --- OneButtonPromptNodes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OneButtonPromptNodes.py b/OneButtonPromptNodes.py index 1cd8b8c..e799be5 100644 --- a/OneButtonPromptNodes.py +++ b/OneButtonPromptNodes.py @@ -210,6 +210,10 @@ class OneButtonPrompt: "multiline": False, #True if you want the field to look like the one on the ClipTextEncode node "default": "" }), + "custom_outfit": ("STRING", { + "multiline": False, # This is the overwrite for an outfit, super nice + "default": "" + }), "subject_subtype_objects": (subjectsubtypesobject, {"default": "all"}), "subject_subtypes_humanoids": (subjectsubtypeshumanoid, {"default": "all"}), "humanoids_gender": (genders, {"default": "all"}), @@ -229,8 +233,8 @@ class OneButtonPrompt: CATEGORY = "OneButtonPrompt" - def Comfy_OBP(self, insanitylevel, custom_subject, seed, artist, imagetype, subject, imagemodechance, humanoids_gender, subject_subtype_objects, subject_subtypes_humanoids, subject_subtypes_concepts, emojis): - generatedprompt = build_dynamic_prompt(insanitylevel,subject,artist,imagetype,False,"","","",1,"",custom_subject,True,"",imagemodechance, humanoids_gender, subject_subtype_objects, subject_subtypes_humanoids, subject_subtypes_concepts, False, emojis, seed) + def Comfy_OBP(self, insanitylevel, custom_subject, seed, artist, imagetype, subject, imagemodechance, humanoids_gender, subject_subtype_objects, subject_subtypes_humanoids, subject_subtypes_concepts, emojis, custom_outfit): + generatedprompt = build_dynamic_prompt(insanitylevel,subject,artist,imagetype,False,"","","",1,"",custom_subject,True,"",imagemodechance, humanoids_gender, subject_subtype_objects, subject_subtypes_humanoids, subject_subtypes_concepts, False, emojis, seed, custom_outfit) #print(generatedprompt) return (generatedprompt,) From 0fb1f16c49946f8a8797647f42068d22fd8d7eea Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 08:01:25 +0200 Subject: [PATCH 31/42] This should put outfit override in Auto1111 No way to test, scary change :D --- main.py | 4 ++-- scripts/onebuttonprompt.py | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/main.py b/main.py index 799284a..dffca40 100644 --- a/main.py +++ b/main.py @@ -13,7 +13,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="",imagemodechance=20, gender="all", chosensubjectsubtypeobject="all", chosensubjectsubtypehumanoid="all", chosensubjectsubtypeconcept="all", increasestability = False, qualityhiresfix = False, qualitymode = "highest", qualitykeep="keep used", basesize = "512", promptvariantinsanitylevel = 0): +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, gender="all", chosensubjectsubtypeobject="all", chosensubjectsubtypehumanoid="all", chosensubjectsubtypeconcept="all", increasestability = False, qualityhiresfix = False, qualitymode = "highest", qualitykeep="keep used", basesize = "512", promptvariantinsanitylevel = 0, givenoutfit = ""): loops = int(amount) # amount of images to generate steps = 0 upscalefilelist=[] @@ -133,7 +133,7 @@ def generateimages(amount = 1, size = "all",model = "currently selected model",s else: - randomprompt = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, False,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept) + randomprompt = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, False,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept,True,False,-1,givenoutfit) # make the filename, from from a to the first comma # find the index of the first comma after "of a" or end of the prompt diff --git a/scripts/onebuttonprompt.py b/scripts/onebuttonprompt.py index c67e634..5ac40cd 100644 --- a/scripts/onebuttonprompt.py +++ b/scripts/onebuttonprompt.py @@ -226,12 +226,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, imagemodechance,chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept): + def gen_prompt(insanitylevel, subject, artist, imagetype, antistring, prefixprompt, suffixprompt, promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage, imagemodechance,chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept,givenoutfit): promptlist = [] for i in range(5): - promptlist.append(build_dynamic_prompt(insanitylevel,subject,artist, imagetype, False, antistring,prefixprompt,suffixprompt,promptcompounderlevel,seperator,givensubject,smartsubject, giventypeofimage, imagemodechance,chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept)) + promptlist.append(build_dynamic_prompt(insanitylevel,subject,artist, imagetype, False, antistring,prefixprompt,suffixprompt,promptcompounderlevel,seperator,givensubject,smartsubject, giventypeofimage, imagemodechance,chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept,True,False,-1,givenoutfit)) return promptlist @@ -299,6 +299,8 @@ class Script(scripts.Script): with gr.Row(): givensubject = gr.Textbox(label="Overwrite subject: ", value="") smartsubject = gr.Checkbox(label="Smart subject", value = True) + with gr.Row(): + givenoutfit = gr.Textbox(label="Overwrite outfit: ", value="") with gr.Row(): gr.Markdown(""" @@ -800,7 +802,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,imagemodechance, chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept], outputs=[prompt1, prompt2, prompt3,prompt4,prompt5]) + genprom.click(gen_prompt, inputs=[insanitylevel,subject, artist, imagetype, antistring,prefixprompt, suffixprompt,promptcompounderlevel, seperator, givensubject,smartsubject,giventypeofimage,imagemodechance, chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept, givenoutfit], outputs=[prompt1, prompt2, prompt3,prompt4,prompt5]) prompt1toworkflow.click(prompttoworkflowprompt, inputs=prompt1, outputs=workprompt) prompt2toworkflow.click(prompttoworkflowprompt, inputs=prompt2, outputs=workprompt) @@ -808,7 +810,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,imagemodechance, chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept, increasestability, qualityhiresfix, qualitymode, qualitykeep, basesize, promptvariantinsanitylevel]) + 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, chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept, increasestability, qualityhiresfix, qualitymode, qualitykeep, basesize, promptvariantinsanitylevel, givenoutfit]) interrupt.click(tryinterrupt, inputs=[apiurl]) automatedoutputsfolderbutton.click(openfolder) @@ -971,12 +973,12 @@ class Script(scripts.Script): - return [insanitylevel,subject, artist, imagetype, prefixprompt,suffixprompt,negativeprompt, promptcompounderlevel, ANDtoggle, silentmode, workprompt, antistring, seperator, givensubject, smartsubject, giventypeofimage, imagemodechance, chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept, promptvariantinsanitylevel] + return [insanitylevel,subject, artist, imagetype, prefixprompt,suffixprompt,negativeprompt, promptcompounderlevel, ANDtoggle, silentmode, workprompt, antistring, seperator, givensubject, smartsubject, giventypeofimage, imagemodechance, chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept, promptvariantinsanitylevel, givenoutfit] - def run(self, p, insanitylevel, subject, artist, imagetype, prefixprompt,suffixprompt,negativeprompt, promptcompounderlevel, ANDtoggle, silentmode, workprompt, antistring,seperator, givensubject, smartsubject, giventypeofimage, imagemodechance, chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept, promptvariantinsanitylevel): + def run(self, p, insanitylevel, subject, artist, imagetype, prefixprompt,suffixprompt,negativeprompt, promptcompounderlevel, ANDtoggle, silentmode, workprompt, antistring,seperator, givensubject, smartsubject, giventypeofimage, imagemodechance, chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept, promptvariantinsanitylevel, givenoutfit): images = [] infotexts = [] @@ -1050,7 +1052,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,imagemodechance,chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept) + preppedprompt += build_dynamic_prompt(insanitylevel,subject,artist, imagetype, False, antistring, prefixprompt, suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance,chosengender, chosensubjectsubtypeobject, chosensubjectsubtypehumanoid, chosensubjectsubtypeconcept,True,False,-1,givenoutfit) # set the artist mode back when done (for automatic mode) artist = artistcopy From 76d4536032b47322d141c18a03c92d23a43316aa Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 09:21:40 +0200 Subject: [PATCH 32/42] facebuilder! --- build_dynamic_prompt.py | 35 +++++++++++++++++++---- csvfiles/config/default_config.csv | 1 + csvfiles/faceparts.csv | 6 ++++ csvfiles/jobs.csv | 4 ++- csvfiles/locations.csv | 4 ++- csvfiles/objects.csv | 4 ++- csvfiles/special_lists/buildface.csv | 3 ++ csvfiles/special_lists/buildfaceparts.csv | 8 ++++++ prompttester.py | 4 +-- userfiles/add own csv files here.txt | 2 ++ userfiles/custom_outfits_sample.csv | 3 ++ 11 files changed, 63 insertions(+), 11 deletions(-) create mode 100644 csvfiles/faceparts.csv create mode 100644 csvfiles/special_lists/buildface.csv create mode 100644 csvfiles/special_lists/buildfaceparts.csv create mode 100644 userfiles/custom_outfits_sample.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index e229baf..0e9c21e 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -115,6 +115,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all chairlist = csv_to_list("chairs", antilist) cardnamelist = csv_to_list("card_names", antilist) coveringlist = csv_to_list("coverings", antilist) + facepartlist = csv_to_list("faceparts", antilist) + # additional descriptor lists outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) @@ -176,6 +178,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all generatecustominputsuffix = bool(custominputsuffixlist) # True of not empty customsubjectslist = csv_to_list("custom_subjects",antilist,"./userfiles/") + customoutfitslist = csv_to_list("custom_outfits",antilist,"./userfiles/") # special lists backgroundtypelist = csv_to_list("backgroundtypes", antilist,"./csvfiles/special_lists/",0,"?") @@ -192,6 +195,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all imagetypemodelist = csv_to_list("imagetypemodes", antilist,"./csvfiles/special_lists/",0,"?") miniactivitylist = csv_to_list("miniactivity", antilist,"./csvfiles/special_lists/",0,"?") animalsuffixadditionlist = csv_to_list("animalsuffixadditions", antilist,"./csvfiles/special_lists/",0,"?") + buildfacepartlist = csv_to_list("buildfaceparts", antilist,"./csvfiles/special_lists/",0,"?") + buildfacelist = csv_to_list("buildface", antilist,"./csvfiles/special_lists/",0,"?") styleslist = csv_to_list("styles", antilist,"./csvfiles/templates/",0,"?") @@ -261,6 +266,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all overalladditionchance = 'extraordinary' emojichance = 'legendary' + buildfacechance = 'legendary' joboractivitychance = 'normal' custominputmidrepeats = 2 @@ -412,6 +418,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all emojichance = item[1] if(hardturnoffemojis==True): emojichance='never' + if item[0] == 'emojichance': + buildfacechance = item[1] if item[0] == 'joboractivitychance': joboractivitychance = item[1] @@ -707,6 +715,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all generateshot = bool(shotsizelist) and not specialmode generatetimeperiod = bool(timeperiodlist) and not specialmode generateemoji = bool(emojilist) and not templatemode + generateface = bool(buildfacelist) and not templatemode # specials: generatebackground = bool(backgroundtypelist) and not specialmode @@ -1798,6 +1807,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # skintypelist = ["-color-", "-material-"] # completeprompt += ", with " + random.choice(skintypelist) + " skin, " + # add face builder sometimes on generic humans + if(subjectchooser in ["human", "humanoid", "manwomanrelation","firstname"] and chance_roll(insanitylevel, buildfacechance) and generateface== True): + completeprompt += random.choice(buildfacelist) + ", " + # custom mid list for i in range(custominputmidrepeats): if(chance_roll(insanitylevel, custominputmidchance) and generatecustominputmid == True): @@ -2360,6 +2373,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-vomit-" in completeprompt or "-rpgclass-" in completeprompt or "-subjectfromfile-" in completeprompt or + "-outfitfromfile-" in completeprompt or "-brand-" in completeprompt or "-space-" in completeprompt or "-artist-" in completeprompt or @@ -2409,9 +2423,11 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-outfitdescriptor-" in completeprompt or "-hairdescriptor-" in completeprompt or "-hairvomit-" in completeprompt or - "-humandescriptor-" 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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-"] - 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist] + "-humandescriptor-" in completeprompt or + "-facepart-" in completeprompt or + "-buildfacepart-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-"] + 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2565,6 +2581,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender chairlist = csv_to_list("chairs", antilist) cardnamelist = csv_to_list("card_names", antilist) coveringlist = csv_to_list("coverings", antilist) + facepartlist = csv_to_list("faceparts", antilist) + outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) hairdescriptorlist = csv_to_list("hairdescriptors",antilist) humandescriptorlist = csv_to_list("humandescriptors",antilist) @@ -2605,6 +2623,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender generatecustominputsuffix = bool(custominputsuffixlist) # True of not empty customsubjectslist = csv_to_list("custom_subjects",antilist,"./userfiles/") + customoutfitslist = csv_to_list("custom_outfits",antilist,"./userfiles/") # special lists backgroundtypelist = csv_to_list("backgroundtypes", antilist,"./csvfiles/special_lists/",0,"?") @@ -2849,6 +2868,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender prompt = prompt.replace(combination," -cardname- ") if lowercase_combination in [x.lower() for x in coveringlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -covering- ") + if lowercase_combination in [x.lower() for x in facepartlist] and chance_roll(insanitylevel, "uncommon"): + prompt = prompt.replace(combination," -facepart- ") if lowercase_combination in [x.lower() for x in fantasyartistlist] and chance_roll(insanitylevel, "uncommon"): @@ -2917,6 +2938,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-vomit-" in completeprompt or "-rpgclass-" in completeprompt or "-subjectfromfile-" in completeprompt or + "-outfitfromfile-" in completeprompt or "-brand-" in completeprompt or "-space-" in completeprompt or "-artist-" in completeprompt or @@ -2960,9 +2982,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-outfitdescriptor-" in completeprompt or "-hairdescriptor-" in completeprompt or "-hairvomit-" in completeprompt or - "-humandescriptor-" 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-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-"] - 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, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist] + "-humandescriptor-" in completeprompt or + "-facepart-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-"] + 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/config/default_config.csv b/csvfiles/config/default_config.csv index cfd96d4..2696bcf 100644 --- a/csvfiles/config/default_config.csv +++ b/csvfiles/config/default_config.csv @@ -64,6 +64,7 @@ humanadditionchance;rare overalladditionchance;extraordinary # humanoid other stuff; emojichance;legendary +buildfacechance;legendary joboractivitychance;normal # things in the middle of the prompt; custominputmidrepeats;2 diff --git a/csvfiles/faceparts.csv b/csvfiles/faceparts.csv new file mode 100644 index 0000000..48caeea --- /dev/null +++ b/csvfiles/faceparts.csv @@ -0,0 +1,6 @@ +lips +mouth +eyes +eyebrows +nose +chin \ No newline at end of file diff --git a/csvfiles/jobs.csv b/csvfiles/jobs.csv index 4f08294..6401c70 100644 --- a/csvfiles/jobs.csv +++ b/csvfiles/jobs.csv @@ -378,4 +378,6 @@ bimbo;female hunk;male plain jane;female southern belle;female -doll;both \ No newline at end of file +doll;both +villain;both +protagonist;both \ No newline at end of file diff --git a/csvfiles/locations.csv b/csvfiles/locations.csv index f3d8842..a7261f1 100644 --- a/csvfiles/locations.csv +++ b/csvfiles/locations.csv @@ -680,4 +680,6 @@ alternate dimensions jupiter clouds crack in the earth Mushroom Kingdom --animal- den \ No newline at end of file +-animal- den +Loch +Loch Ness \ No newline at end of file diff --git a/csvfiles/objects.csv b/csvfiles/objects.csv index e34bdc5..0382f0e 100644 --- a/csvfiles/objects.csv +++ b/csvfiles/objects.csv @@ -323,4 +323,6 @@ Mobius strip Klein bottle Sphericon Totem --material- Totem \ No newline at end of file +-material- Totem +Doll +matryoshka doll \ No newline at end of file diff --git a/csvfiles/special_lists/buildface.csv b/csvfiles/special_lists/buildface.csv new file mode 100644 index 0000000..5b1cf5f --- /dev/null +++ b/csvfiles/special_lists/buildface.csv @@ -0,0 +1,3 @@ +OR(;-hisher-;rare) face is a combination of OR(-nonfictional-;-fictional-;legendary) OR(;, OR(-nonfictional-;-fictional-;legendary);rare) and OR(-nonfictional-;-fictional-;legendary) +OR(;-hisher-;rare) -facepart- of OR(-nonfictional-;-fictional-;legendary), OR(;-hisher-;rare) -facepart- of OR(-nonfictional-;-fictional-;legendary) +OR(;-heshe- has a ;rare) -buildfacepart- OR(; OR(,;and) -buildfacepart-;uncommon) OR(; and -buildfacepart-;legendary) \ No newline at end of file diff --git a/csvfiles/special_lists/buildfaceparts.csv b/csvfiles/special_lists/buildfaceparts.csv new file mode 100644 index 0000000..961ff67 --- /dev/null +++ b/csvfiles/special_lists/buildfaceparts.csv @@ -0,0 +1,8 @@ +OR(full;thick;thin;plump;cute;beautiful;Pouty;Sensual;Voluptuous;Delicate;Soft;Supple;Natural;Glossy;Defined;Tender;Rosy) lips +OR(full;thick;thin;open;wide;narrow;expressive;Mysterious;cute;beautiful) mouth +OR(detailed;clear;cute;beautiful;weary;tired;glowing;narrow;almond-shaped;round;large;small;Sparkling;Luminous;Dreamy;Mysterious) eyes +OR(thick;arched;bushy;small;large;Well-groomed;Sculpted;Tapered;Curved;Natural;Full;Elegant;Prominent) eyebrows +OR(large;small;short;long;cute;Button;Upturned;Snub;Sharp;Flat;High-bridged;Bulbous) nose +OR(strong;pronounced;weak;small;large;Chiseled;Square;Defined;Dimpled;Round;Double;Slender;Soft) chin +OR(oval;wide;large;small;triangle;round;square;hearth-;diamond-;pear-;Rectangular;Long;Angular;Symmetrical;Asymmetrical;full;Slim;Narrow) shaped face +OR(rosy;defined;Chubby;Sculpted;cute;beautiful;hollow;dimpled;peachy;defined;flushed;plump;rounded;high;subtle) cheeks \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index d8a488e..86d214a 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,11 +51,11 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,5 +generateprompts(10,8 ,"humanoid" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT a OR(group;couple;crowd;bunch) of OR(-fictional-;-nonfictional-;-humanoid-)s" + ,"SUFFIXPROMPT OR(;-heshe- has a ;rare) -buildfacepart- OR(; OR(,;and) -buildfacepart-;uncommon) OR(; and -buildfacepart-;legendary)" ,"",1,"" ,"" # subject override ,True, diff --git a/userfiles/add own csv files here.txt b/userfiles/add own csv files here.txt index 8c2eaac..9758027 100644 --- a/userfiles/add own csv files here.txt +++ b/userfiles/add own csv files here.txt @@ -32,5 +32,7 @@ cat - custom_subjects.csv Values to be attached to -subjectfromfile- wildcard. This wildcard can be used in the subject override field, and it will pick the subjects randomly from this file. +- custom_outfits.csv +Values to be attached to -outfitfromfile- wildcard. This wildcard can be used in the outfit override field, and it will pick the outfits randomly from this file. Happy prompting! \ No newline at end of file diff --git a/userfiles/custom_outfits_sample.csv b/userfiles/custom_outfits_sample.csv new file mode 100644 index 0000000..26aa317 --- /dev/null +++ b/userfiles/custom_outfits_sample.csv @@ -0,0 +1,3 @@ +space suit +red dress +formal business suit \ No newline at end of file From 0a331714415cf05206ca914678802634cf74c7e3 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 10:01:06 +0200 Subject: [PATCH 33/42] More face sculptering Make the best or worst face ever --- build_dynamic_prompt.py | 5 +++++ csvfiles/special_lists/buildface.csv | 3 ++- csvfiles/special_lists/buildfaceparts.csv | 2 +- prompttester.py | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 0e9c21e..b1df345 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -3225,6 +3225,11 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5): completeprompt = re.sub('they is', 'they are', completeprompt) completeprompt = re.sub('they has', 'they have', completeprompt) + # some space tricks + completeprompt = re.sub('- shaped', '-shaped', completeprompt) + completeprompt = re.sub('mecha- ', 'mecha-', completeprompt) + + # clean up some hacky multiples with adding a s to the end completeprompt = re.sub('fs ', 'ves ', completeprompt) completeprompt = re.sub('fs,', 'ves,', completeprompt) diff --git a/csvfiles/special_lists/buildface.csv b/csvfiles/special_lists/buildface.csv index 5b1cf5f..dfa7a7b 100644 --- a/csvfiles/special_lists/buildface.csv +++ b/csvfiles/special_lists/buildface.csv @@ -1,3 +1,4 @@ OR(;-hisher-;rare) face is a combination of OR(-nonfictional-;-fictional-;legendary) OR(;, OR(-nonfictional-;-fictional-;legendary);rare) and OR(-nonfictional-;-fictional-;legendary) OR(;-hisher-;rare) -facepart- of OR(-nonfictional-;-fictional-;legendary), OR(;-hisher-;rare) -facepart- of OR(-nonfictional-;-fictional-;legendary) -OR(;-heshe- has a ;rare) -buildfacepart- OR(; OR(,;and) -buildfacepart-;uncommon) OR(; and -buildfacepart-;legendary) \ No newline at end of file +OR(;-heshe- has ;rare) OR(;very;legendary) -buildfacepart- OR(; OR(,;and) -buildfacepart-;normal) OR(; and -buildfacepart-;legendary) +OR(;-heshe- has ;rare) OR(;very;legendary) -humandescriptor- -facepart- OR(; and -humandescriptor- -facepart-;uncommon) \ No newline at end of file diff --git a/csvfiles/special_lists/buildfaceparts.csv b/csvfiles/special_lists/buildfaceparts.csv index 961ff67..c7367ee 100644 --- a/csvfiles/special_lists/buildfaceparts.csv +++ b/csvfiles/special_lists/buildfaceparts.csv @@ -4,5 +4,5 @@ OR(detailed;clear;cute;beautiful;weary;tired;glowing;narrow;almond-shaped;round; OR(thick;arched;bushy;small;large;Well-groomed;Sculpted;Tapered;Curved;Natural;Full;Elegant;Prominent) eyebrows OR(large;small;short;long;cute;Button;Upturned;Snub;Sharp;Flat;High-bridged;Bulbous) nose OR(strong;pronounced;weak;small;large;Chiseled;Square;Defined;Dimpled;Round;Double;Slender;Soft) chin -OR(oval;wide;large;small;triangle;round;square;hearth-;diamond-;pear-;Rectangular;Long;Angular;Symmetrical;Asymmetrical;full;Slim;Narrow) shaped face +OR(oval;wide;large;small;triangle;round-;square-;hearth-;diamond-;pear-;Rectangular;Long;Angular;Symmetrical;Asymmetrical;full;Slim;Narrow) shaped face OR(rosy;defined;Chubby;Sculpted;cute;beautiful;hollow;dimpled;peachy;defined;flushed;plump;rounded;high;subtle) cheeks \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 86d214a..adfa462 100644 --- a/prompttester.py +++ b/prompttester.py @@ -55,7 +55,7 @@ generateprompts(10,8 ,"humanoid" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT OR(;-heshe- has a ;rare) -buildfacepart- OR(; OR(,;and) -buildfacepart-;uncommon) OR(; and -buildfacepart-;legendary)" + ,"SUFFIXPROMPT OR(;-heshe- has ;rare) OR(;very;legendary) -humandescriptor- -facepart- OR(; and -humandescriptor- -facepart-;uncommon)" ,"",1,"" ,"" # subject override ,True, From bbde93d860db0c8ee531dd500bef97e3ff17b795 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 10:45:42 +0200 Subject: [PATCH 34/42] Another minor outfit improvement --- build_dynamic_prompt.py | 8 +++++--- csvfiles/body_types.csv | 6 +++++- csvfiles/outfitdescriptors.csv | 1 + csvfiles/outfitvomit.csv | 10 ++++++++++ csvfiles/special_lists/buildoutfit.csv | 3 ++- prompttester.py | 4 ++-- 6 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 csvfiles/outfitvomit.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index b1df345..3793dce 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -116,6 +116,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all cardnamelist = csv_to_list("card_names", antilist) coveringlist = csv_to_list("coverings", antilist) facepartlist = csv_to_list("faceparts", antilist) + outfitvomitlist = csv_to_list(csvfilename="outfitvomit",antilist=antilist,delimiter="?") # additional descriptor lists @@ -2425,9 +2426,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-hairvomit-" in completeprompt or "-humandescriptor-" in completeprompt or "-facepart-" in completeprompt or - "-buildfacepart-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-"] - 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist] + "-buildfacepart-" in completeprompt or + "-outfitvomit-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-"] + 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/body_types.csv b/csvfiles/body_types.csv index 62035aa..a6a5b12 100644 --- a/csvfiles/body_types.csv +++ b/csvfiles/body_types.csv @@ -13,6 +13,7 @@ morbidly obese;both thick;female thicc;female hourglass figure;female +pear-shaped figure;female stout;both rotund;both hefty;both @@ -43,4 +44,7 @@ tall;both strong;both very tall, long legs;female busty;female -busty petite;female \ No newline at end of file +busty petite;female +ripped;male +elegant;female +broad-shouldered;both \ No newline at end of file diff --git a/csvfiles/outfitdescriptors.csv b/csvfiles/outfitdescriptors.csv index 933a508..60b6e22 100644 --- a/csvfiles/outfitdescriptors.csv +++ b/csvfiles/outfitdescriptors.csv @@ -144,6 +144,7 @@ Nerdy Noble Otherworldly Oversized +Peplum Playful Pretty Psychadelic diff --git a/csvfiles/outfitvomit.csv b/csvfiles/outfitvomit.csv new file mode 100644 index 0000000..a9bfd9a --- /dev/null +++ b/csvfiles/outfitvomit.csv @@ -0,0 +1,10 @@ +has OR(;large;small;giant;tiny;normal) OR(;-color-;normal) bowOR(;s;normal) +has OR(;large;small;giant;tiny;normal) OR(;Leather;normal) OR(belt;strap)OR(;s;normal) +has OR(Metal;Iron;Diamond;Steel;metallic) OR(plates;plating) +has a crest on chest +is OR(zipped up;unzipped;partially unzipped) +is OR(off-the-shoulder;strapless;cropped;ruffled) +is OR(;very;normal) OR(large;small;tight;loose;baggy;delicate;wet;-outfitdescriptor-) +is made from OR(satin;curderoy;lace;cotton;metal;-material-) +has lots of OR(tiny;intricate) details OR(;and motifs;normal) +is inspired by OR(nature;futurism;fashion;fantasy;sci-fi;ancient times;cinema) \ No newline at end of file diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index 6354bda..1116668 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -7,4 +7,5 @@ , 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-;-hisher- traditional;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) \ No newline at end of file +, -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- \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index adfa462..f6dbcac 100644 --- a/prompttester.py +++ b/prompttester.py @@ -51,11 +51,11 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,8 +generateprompts(10,5 ,"humanoid" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT OR(;-heshe- has ;rare) OR(;very;legendary) -humandescriptor- -facepart- OR(; and -humandescriptor- -facepart-;uncommon)" + ,"SUFFIXPROMPT , , OR(wearing;dressed in;in;normal) OR(;a very;rare) OR(;-outfitdescriptor-;normal) OR(-minioutfit-;-outfit-;uncommon), OR(-hisher-;The;normal) -sameoutfit- -outfitvomit-" ,"",1,"" ,"" # subject override ,True, From 975094ef1b475698185555d1fc13da6db7ae59e8 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:04:17 +0200 Subject: [PATCH 35/42] location descriptors --- build_dynamic_prompt.py | 26 ++++- csvfiles/locationdescriptors.csv | 192 +++++++++++++++++++++++++++++++ prompttester.py | 4 +- 3 files changed, 216 insertions(+), 6 deletions(-) create mode 100644 csvfiles/locationdescriptors.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 3793dce..79704c5 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -123,6 +123,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) hairdescriptorlist = csv_to_list("hairdescriptors",antilist) humandescriptorlist = csv_to_list("humandescriptors",antilist) + locationdescriptorlist = csv_to_list("locationdescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -915,6 +916,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all artistmode = "normal" insideshot = 0 buildingfullmode = False + subjectchooser = "" + mainchooser = "" completeprompt += prefixprompt @@ -1463,12 +1466,16 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(chance_roll(insanitylevel, subjectdescriptor1chance) and generatedescriptors == True): if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"]): completeprompt += "-humandescriptor- " + elif(mainchooser == "landscape"): + completeprompt += "-locationdescriptor- " else: completeprompt += "-descriptor- " if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation", "manwomanmultiple","firstname"]): completeprompt += "-humandescriptor- " + elif(mainchooser == "landscape"): + completeprompt += "-locationdescriptor- " else: completeprompt += "-descriptor- " @@ -1755,12 +1762,16 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += ", the -samehumansubject- are OR(;very;rare) -humandescriptor-" else: completeprompt += ", OR(the -manwoman-;-samehumansubject-) is OR(;very;rare) -humandescriptor-" + elif(mainchooser == "landscape"): + completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -locationdescriptor- " else: completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -descriptor- " if(chance_roll(insanitylevel, subjectdescriptor2chance) and generatedescriptors == True): if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple","firstname"]): completeprompt += " and -humandescriptor- " + elif(mainchooser == "landscape"): + completeprompt += " and -locationdescriptor- " else: completeprompt += " and -descriptor- " completeprompt += ", " @@ -2310,6 +2321,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # human descriptor if(rare_dist(insanitylevel)): # Use base human descriptor, until we are not. completeprompt = completeprompt.replace("-humandescriptor-", "-descriptor-",1) + + # location descriptor + if(rare_dist(insanitylevel)): # Use base location descriptor, until we are not. + completeprompt = completeprompt.replace("-locationdescriptor-", "-descriptor-",1) # first some manual stuff for outfit @@ -2428,8 +2443,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-facepart-" in completeprompt or "-buildfacepart-" in completeprompt or "-outfitvomit-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-"] - 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist] + 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-"] + 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2588,6 +2603,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) hairdescriptorlist = csv_to_list("hairdescriptors",antilist) humandescriptorlist = csv_to_list("humandescriptors",antilist) + locationdescriptorlist = csv_to_list("locationdescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist + malefemalelist + manwomanlist + manwomanrelationlist + manwomanmultiplelist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -2767,6 +2783,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender prompt = prompt.replace(combination," -hairvomit- ") if lowercase_combination in [x.lower() for x in humandescriptorlist] and chance_roll(insanitylevel, "rare"): prompt = prompt.replace(combination," -humandescriptor- ") + if lowercase_combination in [x.lower() for x in locationdescriptorlist] and chance_roll(insanitylevel, "rare"): + prompt = prompt.replace(combination," -locationdescriptor- ") if lowercase_combination in [x.lower() for x in directionlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -direction- ") @@ -2986,8 +3004,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-hairvomit-" in completeprompt or "-humandescriptor-" in completeprompt or "-facepart-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-"] - 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist] + 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-"] + 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/locationdescriptors.csv b/csvfiles/locationdescriptors.csv new file mode 100644 index 0000000..383c073 --- /dev/null +++ b/csvfiles/locationdescriptors.csv @@ -0,0 +1,192 @@ +1600'S +1700'S +1800'S +1900'S +1920'S +1940'S +1950'S +1950S Suburbia +1960'S +1970'S +1980'S +1990'S +2000'S +Abandoned +Abstract +Absurd +Aesthetically Pleasing +Airy +Alhambresque +Alien +Alluring +Ancient +Angelic +Apocalyptic +Appealing +Artistic +Astonishing +Atmospheric +Authentic +Average +Award-Winning +Awe-Inspiring +Awful +Baroque +Basic +Beautiful +Bewitching +Biopunk +Bizarre +Breathtaking +Bright +Brutal +Burning +Charming +Charred +Classic +Cloudy +Cluttered +Colorful +Contemporary +Cozy +Crude +Crowded +Cyberpunk +Dense +Depressing +Deserted +Desolate +Detailed +Deteriorating +Dieselpunk +Dirty +Divine +Drab +Dramatic +Dreamlike +Dreamy +Dull +Dusty +Dynamic +Dystopian +Eclectic +Eerie +Enchanted +Enchanting +Epic +Ethereal +Evil +Evocative +Exceptional +Exotic +Exquisite +Extraordinary +Extreme +Fairy-Tale +Fantastical +Fiery +Flaming +Flat +Floating +Flowery +Foggy +Folded +Futuristic +Ghastly +Gigantic +Gloomy +Glowing +Gorgeous +Grand +Gruesome +Harsh +Haunted +Heavenly +Hideous +Historical +Holy +Homey +Horrid +Hostile +Hyperdetailed +Illuminated +Impressionist +Impressive +Incredibly Detailed +Inspirational +Internally Glowing +Intricate +Jagged +Layered +Level +Lifeless +Light +Lively +Lovely +Luminescent +Lush +Magical +Magnificent +Majestic +Masterpiece +Melancholy +Mesmerizing +Messy +Moist +Moody +Morbid +Mundane +Mysterious +Mystical +Mystifying +Mythical +Natural +Neat +Oppressive +Organic +Otherworldly +Overgrown +Painterly +Peaceful +Phenomenal +Pictorial +Plain +Pretty +Primordial +Pure +Radiant +Realistic +Refined +Retrofuturistic +Romantic +Ruined +Sci-fi +Serene +Shadowy +Soothing +Sparse +Striking +Stunning +Supernatural +Surreal +Timeless +Traditional +Tranquil +Tribal +Tropical +Twisted +Ugly +Ultrarealistic +Unappealing +Unattractive +Underwater +Unique +Unnatural +Unusual +Uptight +Varied +Verdant +Vibrant +Vile +Warm +Wretched \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index f6dbcac..7dd9921 100644 --- a/prompttester.py +++ b/prompttester.py @@ -52,10 +52,10 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("All done!") generateprompts(10,5 - ,"humanoid" # subject + ,"landscape" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT , , OR(wearing;dressed in;in;normal) OR(;a very;rare) OR(;-outfitdescriptor-;normal) OR(-minioutfit-;-outfit-;uncommon), OR(-hisher-;The;normal) -sameoutfit- -outfitvomit-" + ,"SUFFIXPROMPT" ,"",1,"" ,"" # subject override ,True, From b4fb69e749866bf4efdae26087c847758d322de0 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:23:58 +0200 Subject: [PATCH 36/42] adding some normal easy descriptors for low level generations --- build_dynamic_prompt.py | 40 +++++++++++++++++++++--------- csvfiles/basicbitchdescriptors.csv | 16 ++++++++++++ prompttester.py | 2 +- 3 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 csvfiles/basicbitchdescriptors.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 79704c5..40e1697 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -124,6 +124,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all hairdescriptorlist = csv_to_list("hairdescriptors",antilist) humandescriptorlist = csv_to_list("humandescriptors",antilist) locationdescriptorlist = csv_to_list("locationdescriptors",antilist) + basicbitchdescriptorlist = csv_to_list("basicbitchdescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -1715,7 +1716,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(chance_roll(insanitylevel, subjectlandscapeaddonlocationchance) and insideshot == 0): completeprompt += " and " if(chance_roll(insanitylevel, subjectlandscapeaddonlocationdescriptorchance)): - completeprompt += "-descriptor- " + completeprompt += "-locationdescriptor- " if(chance_roll(insanitylevel, subjectlandscapeaddonlocationculturechance)): completeprompt += "-culture- " @@ -2316,22 +2317,22 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # hair descriptor if(rare_dist(insanitylevel)): # Use base hair descriptor, until we are not. - completeprompt = completeprompt.replace("-hairdescriptor-", "-descriptor-",1) + completeprompt = completeprompt.replace("-hairdescriptor-", "-descriptor-") # human descriptor if(rare_dist(insanitylevel)): # Use base human descriptor, until we are not. - completeprompt = completeprompt.replace("-humandescriptor-", "-descriptor-",1) + completeprompt = completeprompt.replace("-humandescriptor-", "-descriptor-") # location descriptor if(rare_dist(insanitylevel)): # Use base location descriptor, until we are not. - completeprompt = completeprompt.replace("-locationdescriptor-", "-descriptor-",1) + completeprompt = completeprompt.replace("-locationdescriptor-", "-descriptor-") # first some manual stuff for outfit if(unique_dist(insanitylevel)): # sometimes, its just nice to have descriptor and a normal "outfit". We use mini outfits for this! completeprompt = completeprompt.replace("-outfit-", "-minioutfit-",1) if(rare_dist(insanitylevel)): # Use base outfit descriptor, until we are not. - completeprompt = completeprompt.replace("-outfitdescriptor-", "-descriptor-",1) + completeprompt = completeprompt.replace("-outfitdescriptor-", "-descriptor-") if(overrideoutfit != ""): completeprompt = completeprompt.replace("-sameoutfit-", overrideoutfit) @@ -2342,10 +2343,18 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # If we don't have an override outfit, then remove this part completeprompt = completeprompt.replace("-overrideoutfit-", "") - # sometimes replace a descriptor with a artmovement, only on high insanitylevels + # sometimes replace one descriptor with a artmovement, only on high insanitylevels if(insanitylevel > 7 and unique_dist(insanitylevel)): completeprompt = completeprompt.replace("-descriptor-", "-artmovement-",1) + # On low insanity levels (lower than 5) ,a chance refer to the basic bitch list on some occasions + if(random.randint(0,insanitylevel) == 0 and insanitylevel < 5): + completeprompt = completeprompt.replace("-locationdescriptor-", "-basicbitchdescriptor-") + completeprompt = completeprompt.replace("-humandescriptor-", "-basicbitchdescriptor-") + completeprompt = completeprompt.replace("-outfitdescriptor-", "-basicbitchdescriptor-") + completeprompt = completeprompt.replace("-descriptor-", "-basicbitchdescriptor-") + + # lol, this needs a rewrite :D while ( @@ -2442,9 +2451,11 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-humandescriptor-" in completeprompt or "-facepart-" in completeprompt or "-buildfacepart-" in completeprompt or - "-outfitvomit-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-"] - 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist] + "-outfitvomit-" in completeprompt or + "-locationdescriptor-" in completeprompt or + "-basicbitchdescriptor-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-", "-basicbitchdescriptor-"] + 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist, basicbitchdescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2604,6 +2615,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender hairdescriptorlist = csv_to_list("hairdescriptors",antilist) humandescriptorlist = csv_to_list("humandescriptors",antilist) locationdescriptorlist = csv_to_list("locationdescriptors",antilist) + basicbitchdescriptorlist = csv_to_list("basicbitchdescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist + malefemalelist + manwomanlist + manwomanrelationlist + manwomanmultiplelist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -2785,6 +2797,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender prompt = prompt.replace(combination," -humandescriptor- ") if lowercase_combination in [x.lower() for x in locationdescriptorlist] and chance_roll(insanitylevel, "rare"): prompt = prompt.replace(combination," -locationdescriptor- ") + if lowercase_combination in [x.lower() for x in basicbitchdescriptorlist] and chance_roll(insanitylevel, "rare"): + prompt = prompt.replace(combination," -basicbitchdescriptor- ") if lowercase_combination in [x.lower() for x in directionlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -direction- ") @@ -3003,9 +3017,11 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-hairdescriptor-" in completeprompt or "-hairvomit-" in completeprompt or "-humandescriptor-" in completeprompt or - "-facepart-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-"] - 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist] + "-facepart-" in completeprompt or + "-locationdescriptor-" in completeprompt or + "-basicbitchdescriptor-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-", "-basicbitchdescriptor-"] + 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist, basicbitchdescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/basicbitchdescriptors.csv b/csvfiles/basicbitchdescriptors.csv new file mode 100644 index 0000000..df971c6 --- /dev/null +++ b/csvfiles/basicbitchdescriptors.csv @@ -0,0 +1,16 @@ +alluring +appealing +attractive +beautiful +charming +cute +elegant +exquisite +flawless +glamourous +good-looking +gorgeous +lovely +magnificent +pleasant +pretty \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 7dd9921..67b08bf 100644 --- a/prompttester.py +++ b/prompttester.py @@ -52,7 +52,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("All done!") generateprompts(10,5 - ,"landscape" # subject + ,"all" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT" From d6a65b9b61508653a44530bd435ca12992132135 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 13:08:33 +0200 Subject: [PATCH 37/42] minor cool additions --- csvfiles/outfitvomit.csv | 3 ++- csvfiles/special_lists/buildface.csv | 3 ++- prompttester.py | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/csvfiles/outfitvomit.csv b/csvfiles/outfitvomit.csv index a9bfd9a..8f4e68d 100644 --- a/csvfiles/outfitvomit.csv +++ b/csvfiles/outfitvomit.csv @@ -7,4 +7,5 @@ is OR(off-the-shoulder;strapless;cropped;ruffled) is OR(;very;normal) OR(large;small;tight;loose;baggy;delicate;wet;-outfitdescriptor-) is made from OR(satin;curderoy;lace;cotton;metal;-material-) has lots of OR(tiny;intricate) details OR(;and motifs;normal) -is inspired by OR(nature;futurism;fashion;fantasy;sci-fi;ancient times;cinema) \ No newline at end of file +is inspired by OR(nature;futurism;fashion;fantasy;sci-fi;ancient times;cinema) +also has a OR(;large;flowing;rare) OR(hooded cloak;cloak;cape;coat;-season- coat) \ No newline at end of file diff --git a/csvfiles/special_lists/buildface.csv b/csvfiles/special_lists/buildface.csv index dfa7a7b..71d8f1a 100644 --- a/csvfiles/special_lists/buildface.csv +++ b/csvfiles/special_lists/buildface.csv @@ -1,4 +1,5 @@ OR(;-hisher-;rare) face is a combination of OR(-nonfictional-;-fictional-;legendary) OR(;, OR(-nonfictional-;-fictional-;legendary);rare) and OR(-nonfictional-;-fictional-;legendary) OR(;-hisher-;rare) -facepart- of OR(-nonfictional-;-fictional-;legendary), OR(;-hisher-;rare) -facepart- of OR(-nonfictional-;-fictional-;legendary) OR(;-heshe- has ;rare) OR(;very;legendary) -buildfacepart- OR(; OR(,;and) -buildfacepart-;normal) OR(; and -buildfacepart-;legendary) -OR(;-heshe- has ;rare) OR(;very;legendary) -humandescriptor- -facepart- OR(; and -humandescriptor- -facepart-;uncommon) \ No newline at end of file +OR(;-heshe- has ;rare) OR(;very;legendary) -humandescriptor- -facepart- OR(; and -humandescriptor- -facepart-;uncommon) +OR(;-heshe- has ;rare) -facepart- of OR(-conceptsuffix-;-basicbitchdescriptor-;uncommon) OR(; and -facepart- of OR(-conceptsuffix-;-basicbitchdescriptor-;uncommon);uncommon) \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 67b08bf..83b94c8 100644 --- a/prompttester.py +++ b/prompttester.py @@ -52,10 +52,10 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("All done!") generateprompts(10,5 - ,"all" # subject + ,"humanoid" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT" + ,"SUFFIXPROMPT OR(;-heshe- has ;rare) -facepart- of OR(-conceptsuffix-;-basicbitchdescriptor-;uncommon) OR(; and -facepart- of OR(-conceptsuffix-;-basicbitchdescriptor-;uncommon);uncommon)" ,"",1,"" ,"" # subject override ,True, From e39576c26f47dc3827e1231a441e33addfa339a8 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 13:54:16 +0200 Subject: [PATCH 38/42] animal descriptors are in --- build_dynamic_prompt.py | 31 ++++++-- csvfiles/animaldescriptors.csv | 128 +++++++++++++++++++++++++++++++++ prompttester.py | 2 +- 3 files changed, 154 insertions(+), 7 deletions(-) create mode 100644 csvfiles/animaldescriptors.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 40e1697..9a509c4 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -125,6 +125,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all humandescriptorlist = csv_to_list("humandescriptors",antilist) locationdescriptorlist = csv_to_list("locationdescriptors",antilist) basicbitchdescriptorlist = csv_to_list("basicbitchdescriptors",antilist) + animaldescriptorlist = csv_to_list("animaldescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -1469,6 +1470,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += "-humandescriptor- " elif(mainchooser == "landscape"): completeprompt += "-locationdescriptor- " + elif(mainchooser == "animal"): + completeprompt += "-animaldescriptor- " else: completeprompt += "-descriptor- " @@ -1477,6 +1480,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += "-humandescriptor- " elif(mainchooser == "landscape"): completeprompt += "-locationdescriptor- " + elif(mainchooser == "animal"): + completeprompt += "-animaldescriptor- " else: completeprompt += "-descriptor- " @@ -1765,6 +1770,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += ", OR(the -manwoman-;-samehumansubject-) is OR(;very;rare) -humandescriptor-" elif(mainchooser == "landscape"): completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -locationdescriptor- " + elif(mainchooser == "animal"): + completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -animaldescriptor- " else: completeprompt += ", OR(;-heshe- is;normal) OR(;very;rare) -descriptor- " @@ -1773,6 +1780,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt += " and -humandescriptor- " elif(mainchooser == "landscape"): completeprompt += " and -locationdescriptor- " + elif(mainchooser == "animal"): + completeprompt += " and -animaldescriptor- " else: completeprompt += " and -descriptor- " completeprompt += ", " @@ -2326,6 +2335,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # location descriptor if(rare_dist(insanitylevel)): # Use base location descriptor, until we are not. completeprompt = completeprompt.replace("-locationdescriptor-", "-descriptor-") + + # human descriptor + if(rare_dist(insanitylevel)): # Use base human descriptor, until we are not. + completeprompt = completeprompt.replace("-animaldescriptor-", "-descriptor-") # first some manual stuff for outfit @@ -2353,6 +2366,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all completeprompt = completeprompt.replace("-humandescriptor-", "-basicbitchdescriptor-") completeprompt = completeprompt.replace("-outfitdescriptor-", "-basicbitchdescriptor-") completeprompt = completeprompt.replace("-descriptor-", "-basicbitchdescriptor-") + completeprompt = completeprompt.replace("-animaldescriptor-", "-basicbitchdescriptor-") @@ -2453,9 +2467,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-buildfacepart-" in completeprompt or "-outfitvomit-" in completeprompt or "-locationdescriptor-" in completeprompt or - "-basicbitchdescriptor-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-", "-basicbitchdescriptor-"] - 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist, basicbitchdescriptorlist] + "-basicbitchdescriptor-" in completeprompt or + "-animaldescriptor-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-"] + 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2616,6 +2631,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender humandescriptorlist = csv_to_list("humandescriptors",antilist) locationdescriptorlist = csv_to_list("locationdescriptors",antilist) basicbitchdescriptorlist = csv_to_list("basicbitchdescriptors",antilist) + animaldescriptorlist = csv_to_list("animaldescriptors",antilist) humanlist = fictionallist + nonfictionallist + humanoidlist + malefemalelist + manwomanlist + manwomanrelationlist + manwomanmultiplelist objecttotallist = objectlist + buildinglist + vehiclelist + foodlist + spacelist + floralist + containerlist @@ -2799,6 +2815,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender prompt = prompt.replace(combination," -locationdescriptor- ") if lowercase_combination in [x.lower() for x in basicbitchdescriptorlist] and chance_roll(insanitylevel, "rare"): prompt = prompt.replace(combination," -basicbitchdescriptor- ") + if lowercase_combination in [x.lower() for x in animaldescriptorlist] and chance_roll(insanitylevel, "rare"): + prompt = prompt.replace(combination," -animaldescriptor- ") if lowercase_combination in [x.lower() for x in directionlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -direction- ") @@ -3019,9 +3037,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-humandescriptor-" in completeprompt or "-facepart-" in completeprompt or "-locationdescriptor-" in completeprompt or - "-basicbitchdescriptor-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-", "-basicbitchdescriptor-"] - 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist, basicbitchdescriptorlist] + "-basicbitchdescriptor-" in completeprompt or + "-animaldescriptor-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-"] + 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/animaldescriptors.csv b/csvfiles/animaldescriptors.csv new file mode 100644 index 0000000..1ddb28d --- /dev/null +++ b/csvfiles/animaldescriptors.csv @@ -0,0 +1,128 @@ +Absurd +Adorable +Aggressive +Alien +Ancient +Angelic +Angry +Anime +Apocalyptic +Appealing +Arcane +Astonishing +Asymmetrical +Average +Awful +Basic +Beautiful +Bewitching +Boring +Breathtaking +Brilliant +Celestial +Charming +Chibi +Chic +Classic +Creepy +Cute +Cyberpunk +Cyborg +Dirty +Disgusting +Divine +Drab +Dreamlike +Dreamy +Dull +Eclectic +Enchanted +Enchanting +Energetic +Energizing +Epic +Ethereal +Evil +Exotic +Expressive +Extraordinary +Fairy-Tale +Fantastical +Fantasy +Feminine +Foul +Friendly +Furious +Furry +Fluffy +Futuristic +Ghastly +Giant +Gigantic +Gloomy +Glowing +Gorgeous +Graceful +Groovy +Grotesque +Gruesome +Hairy +Handsome +Happy +Harsh +Hateful +Heavenly +Hideous +Holy +Horrifying +Injured +Kawaii +Kindhearted +Lovely +Loving +Ludicrous +Macho +Magical +Magnificent +Majestic +Masculine +Mean +Misshapen +Monstrous +Mysterious +Mystical +Mystifying +Mythical +Nasty +Natural +Noble +Nonchalant +Old +Plain +Playful +Pretty +Pure +Radiant +Refined +Regal +Robotic +Sad +Scaly +Shabby +Smart +Spellbinding +Striking +Stunning +Tiny +Tropical +Ugly +Unattractive +Unconventional +Unique +Vampiric +Vibrant +Vulgar +Warlike +Weird +Wet +Young \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 83b94c8..011ede5 100644 --- a/prompttester.py +++ b/prompttester.py @@ -52,7 +52,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("All done!") generateprompts(10,5 - ,"humanoid" # subject + ,"animal" # subject ,"all" # artists ,"all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT OR(;-heshe- has ;rare) -facepart- of OR(-conceptsuffix-;-basicbitchdescriptor-;uncommon) OR(; and -facepart- of OR(-conceptsuffix-;-basicbitchdescriptor-;uncommon);uncommon)" From 0f15b87a99b8daae1e3a01b23fcf9c1192d8ae92 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 14:31:32 +0200 Subject: [PATCH 39/42] human expressions added, split up from mood --- build_dynamic_prompt.py | 31 ++++++++++++++++++++++-------- csvfiles/config/default_config.csv | 1 + csvfiles/humanexpressions.csv | 28 +++++++++++++++++++++++++++ csvfiles/moods.csv | 8 ++------ prompttester.py | 6 +++--- 5 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 csvfiles/humanexpressions.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 9a509c4..3b758d8 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -117,6 +117,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all coveringlist = csv_to_list("coverings", antilist) facepartlist = csv_to_list("faceparts", antilist) outfitvomitlist = csv_to_list(csvfilename="outfitvomit",antilist=antilist,delimiter="?") + humanexpressionlist = csv_to_list(csvfilename="humanexpressions",antilist=antilist,delimiter="?") # additional descriptor lists @@ -271,6 +272,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all emojichance = 'legendary' buildfacechance = 'legendary' + humanexpressionchance = 'rare' joboractivitychance = 'normal' custominputmidrepeats = 2 @@ -422,8 +424,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all emojichance = item[1] if(hardturnoffemojis==True): emojichance='never' - if item[0] == 'emojichance': + if item[0] == 'buildfacechance': buildfacechance = item[1] + if item[0] == 'humanexpressionchance': + humanexpressionchance = item[1] if item[0] == 'joboractivitychance': joboractivitychance = item[1] @@ -720,6 +724,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all generatetimeperiod = bool(timeperiodlist) and not specialmode generateemoji = bool(emojilist) and not templatemode generateface = bool(buildfacelist) and not templatemode + generatehumanexpression = bool(humanexpressionlist) and not templatemode # specials: generatebackground = bool(backgroundtypelist) and not specialmode @@ -1811,6 +1816,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # emoji, legendary if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple","firstname"] and chance_roll(insanitylevel, emojichance) and generateemoji== True): completeprompt += "-emoji-, " + + # human expressions + if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple","firstname"] and chance_roll(insanitylevel, humanexpressionchance) and generatehumanexpression== True): + completeprompt += "-humanexpression-, " # cosplaying @@ -2468,9 +2477,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-outfitvomit-" in completeprompt or "-locationdescriptor-" in completeprompt or "-basicbitchdescriptor-" in completeprompt or - "-animaldescriptor-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-"] - 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist] + "-animaldescriptor-" in completeprompt or + "-humanexpression-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-", "-humanexpression-"] + 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist, humanexpressionlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2625,6 +2635,7 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender cardnamelist = csv_to_list("card_names", antilist) coveringlist = csv_to_list("coverings", antilist) facepartlist = csv_to_list("faceparts", antilist) + humanexpressionlist = csv_to_list(csvfilename="humanexpressions",antilist=antilist,delimiter="?") outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) hairdescriptorlist = csv_to_list("hairdescriptors",antilist) @@ -2823,7 +2834,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender if lowercase_combination in [x.lower() for x in emojilist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -emoji- ") - + + if lowercase_combination in [x.lower() for x in humanexpressionlist] and chance_roll(insanitylevel, "uncommon"): + prompt = prompt.replace(combination," -humanexpression- ") + if lowercase_combination in [x.lower() for x in eventlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -event- ") @@ -3038,9 +3052,10 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-facepart-" in completeprompt or "-locationdescriptor-" in completeprompt or "-basicbitchdescriptor-" in completeprompt or - "-animaldescriptor-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-"] - 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist] + "-animaldescriptor-" in completeprompt or + "-humanexpression-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-", "-humanexpression-"] + 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist, humanexpressionlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/config/default_config.csv b/csvfiles/config/default_config.csv index 2696bcf..8044bbf 100644 --- a/csvfiles/config/default_config.csv +++ b/csvfiles/config/default_config.csv @@ -65,6 +65,7 @@ overalladditionchance;extraordinary # humanoid other stuff; emojichance;legendary buildfacechance;legendary +humanexpressionchance;rare joboractivitychance;normal # things in the middle of the prompt; custominputmidrepeats;2 diff --git a/csvfiles/humanexpressions.csv b/csvfiles/humanexpressions.csv new file mode 100644 index 0000000..ed49a9e --- /dev/null +++ b/csvfiles/humanexpressions.csv @@ -0,0 +1,28 @@ +OR(;-heshe- is feeling;uncommon) OR(;very;normal) angry +OR(;-heshe- is feeling;uncommon) furious +OR(;-heshe- is feeling;uncommon) OR(;very;normal) confused +OR(;-heshe- is feeling;uncommon) OR(;very;normal) akward +OR(;-heshe- is;uncommon) crying OR(;,tears on -hisher- face;uncommon) +OR(;-heshe- mood is;uncommon) OR(;very;normal) dark +OR(;-heshe- is looking;uncommon) OR(;very;normal) evil +OR(;-heshe- is feeling;uncommon) OR(;very;normal) fearful +OR(;-heshe- is feeling;uncommon) OR(;very;normal) disappointed +OR(;-heshe- is feeling;uncommon) OR(;very;normal) happy +OR(;-heshe- mood is;uncommon) OR(;very;normal) light +OR(;-heshe- is feeling;uncommon) OR(;very;normal) lonely +OR(;-heshe- is feeling;uncommon) OR(;very;normal) lustful +OR(;-heshe- is feeling;uncommon) OR(;very;normal) sad +OR(;-heshe- is;uncommon) screaming +OR(;-heshe- is;uncommon) smiling +OR(;-heshe- is;uncommon) smirking +OR(;-heshe- is;uncommon) chuckling +OR(;-heshe- is;uncommon) yawning +OR(;-heshe- is;uncommon) bewildered +OR(;-heshe- is;uncommon) winking +OR(;-heshe- is feeling;uncommon) OR(;very;normal) smug +OR(;-heshe- is;uncommon) laughing hysterically +OR(;-heshe- has a;uncommon) OR(;very;normal) OR(smug;light;radiant;wicked;grinning) smile +OR(;-heshe- is;uncommon) biting -himher- lip +OR(;-heshe- is looking;uncommon) OR(;very;normal) OR(neutral;hollow) +OR(;-heshe- is feeling;uncommon) OR(;very;normal) shy OR(;, looking away;uncommon) +OR(;-heshe- is ;uncommon) looking away \ No newline at end of file diff --git a/csvfiles/moods.csv b/csvfiles/moods.csv index 5bea9f4..d569b28 100644 --- a/csvfiles/moods.csv +++ b/csvfiles/moods.csv @@ -3,7 +3,6 @@ Angry Confused Cosy Cozy -Crying Dark Depressing Disgusting @@ -32,12 +31,9 @@ Relieving Romantic Sad Satisfying -Screaming Shameful Shameless -Smiling -Smirking -Smug Suffering Surprising -Tranquil \ No newline at end of file +Tranquil +Zen \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 011ede5..31f7ecc 100644 --- a/prompttester.py +++ b/prompttester.py @@ -52,10 +52,10 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("All done!") generateprompts(10,5 - ,"animal" # subject - ,"all" # artists + ,"humanoid" # subject + ,"character" # artists ,"all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT OR(;-heshe- has ;rare) -facepart- of OR(-conceptsuffix-;-basicbitchdescriptor-;uncommon) OR(; and -facepart- of OR(-conceptsuffix-;-basicbitchdescriptor-;uncommon);uncommon)" + ,"SUFFIXPROMPT -humanexpression-" ,"",1,"" ,"" # subject override ,True, From 2ca2c271cdb33404a1f01ae9bc6de145db7584ca Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 15:07:08 +0200 Subject: [PATCH 40/42] Adding more stuff human vomit added because why not --- build_dynamic_prompt.py | 41 ++++++++++++++++++----- csvfiles/accessories.csv | 5 +-- csvfiles/config/default_config.csv | 1 + csvfiles/eyecolors.csv | 23 +++++++++++++ csvfiles/human_activities.csv | 3 +- csvfiles/humanvomit.csv | 19 +++++++++++ csvfiles/special_lists/buildfaceparts.csv | 2 +- csvfiles/vomit.csv | 3 +- prompttester.py | 12 ++++--- 9 files changed, 90 insertions(+), 19 deletions(-) create mode 100644 csvfiles/eyecolors.csv create mode 100644 csvfiles/humanvomit.csv diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 3b758d8..30960bd 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -118,6 +118,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all facepartlist = csv_to_list("faceparts", antilist) outfitvomitlist = csv_to_list(csvfilename="outfitvomit",antilist=antilist,delimiter="?") humanexpressionlist = csv_to_list(csvfilename="humanexpressions",antilist=antilist,delimiter="?") + humanvomitlist = csv_to_list("humanvomit", antilist) + eyecolorlist = csv_to_list("eyecolors", antilist) # additional descriptor lists @@ -274,6 +276,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all buildfacechance = 'legendary' humanexpressionchance = 'rare' joboractivitychance = 'normal' + humanvomitchance = 'rare' custominputmidrepeats = 2 custominputmidchance = 'uncommon' @@ -428,6 +431,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all buildfacechance = item[1] if item[0] == 'humanexpressionchance': humanexpressionchance = item[1] + if item[0] == 'humanvomitchance': + humanvomitchance = item[1] if item[0] == 'joboractivitychance': joboractivitychance = item[1] @@ -723,8 +728,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all generateshot = bool(shotsizelist) and not specialmode generatetimeperiod = bool(timeperiodlist) and not specialmode generateemoji = bool(emojilist) and not templatemode - generateface = bool(buildfacelist) and not templatemode - generatehumanexpression = bool(humanexpressionlist) and not templatemode + generateface = bool(buildfacelist) and not specialmode + generatehumanexpression = bool(humanexpressionlist) and not specialmode + generatehumanvomit = bool(humanvomitlist) and not specialmode # specials: generatebackground = bool(backgroundtypelist) and not specialmode @@ -1854,7 +1860,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # 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): completeprompt += " " + random.choice(buildoutfitlist) + ", " - elif(overrideoutfit != ""): + elif(overrideoutfit != "" and imagetype != "only templates mode"): completeprompt += " " + random.choice(buildoutfitlist) + ", " if(subjectchooser in ["animal as human","human","fictional", "non fictional", "humanoid", "manwomanrelation","manwomanmultiple", "firstname"] and chance_roll(insanitylevel, posechance) and humanspecial != 1 and generatepose == True): @@ -2020,6 +2026,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if(chance_roll(insanitylevel, vomit2chance)): completeprompt += "-vomit-, " + # human specfic vomit + if(mainchooser == "humanoid" and chance_roll(insanitylevel, humanvomitchance) and generatehumanvomit == True): + completeprompt += "-humanvomit-, " + if(chance_roll(insanitylevel, humanvomitchance)): + completeprompt += "-humanvomit-, " + #adding a great work of art, like starry night has cool effects. But this should happen only very rarely. if(chance_roll(insanitylevel, greatworkchance) and generategreatwork == True): completeprompt += " in the style of -greatwork-, " @@ -2478,9 +2490,11 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all "-locationdescriptor-" in completeprompt or "-basicbitchdescriptor-" in completeprompt or "-animaldescriptor-" in completeprompt or - "-humanexpression-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-", "-humanexpression-"] - 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist, humanexpressionlist] + "-humanexpression-" in completeprompt or + "-humanvomit-" in completeprompt or + "-eyecolor-" 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-","-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-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-", "-humanexpression-", "-humanvomit-", "-eyecolor-"] + 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, customoutfitslist, 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, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist, humanexpressionlist, humanvomitlist, eyecolorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] @@ -2636,6 +2650,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender coveringlist = csv_to_list("coverings", antilist) facepartlist = csv_to_list("faceparts", antilist) humanexpressionlist = csv_to_list(csvfilename="humanexpressions",antilist=antilist,delimiter="?") + humanvomitlist = csv_to_list("humanvomit", antilist) + eyecolorlist = csv_to_list("eyecolors", antilist) outfitdescriptorlist = csv_to_list("outfitdescriptors",antilist) hairdescriptorlist = csv_to_list("hairdescriptors",antilist) @@ -2802,6 +2818,9 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender if lowercase_combination in [x.lower() for x in colorschemelist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -colorscheme- ") + if lowercase_combination in [x.lower() for x in eyecolorlist] and chance_roll(insanitylevel, "uncommon"): + prompt = prompt.replace(combination," -eyecolor- ") + #if lowercase_combination in [x.lower() for x in conceptprefixlist] and chance_roll(insanitylevel, "uncommon"): # prompt = prompt.replace(combination," -conceptprefix- ") @@ -2837,6 +2856,8 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender if lowercase_combination in [x.lower() for x in humanexpressionlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -humanexpression- ") + if lowercase_combination in [x.lower() for x in humanvomitlist] and chance_roll(insanitylevel, "uncommon"): + prompt = prompt.replace(combination," -humanvomit- ") if lowercase_combination in [x.lower() for x in eventlist] and chance_roll(insanitylevel, "uncommon"): prompt = prompt.replace(combination," -event- ") @@ -3053,9 +3074,11 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender "-locationdescriptor-" in completeprompt or "-basicbitchdescriptor-" in completeprompt or "-animaldescriptor-" in completeprompt or - "-humanexpression-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-", "-humanexpression-"] - 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist, humanexpressionlist] + "-humanexpression-" in completeprompt or + "-humanvomit-" in completeprompt or + "-eyecolor-" 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-", "-subjectfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-artistfantasy-", "-artistpopular-", "-artistromanticism-", "-artistphotography-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-", "-humanexpression-", "-humanvomit-", "-eyecolor-"] + 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, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist, humanexpressionlist, humanvomitlist, eyecolorlist] allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-"] allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist] diff --git a/csvfiles/accessories.csv b/csvfiles/accessories.csv index 9c71d93..4a7ce51 100644 --- a/csvfiles/accessories.csv +++ b/csvfiles/accessories.csv @@ -10,8 +10,9 @@ No makeup?female Fantasy Makeup?female Lipstick?female Lip gloss?female -Large -color- Eyes?both -Glowing -color- Eyes?both +-eyecolor- Eyes?both +Large -eyecolor- Eyes?both +Glowing -eyecolor- Eyes?both Three-Eyed?both One-Eyed?both Crazy Eyes?both diff --git a/csvfiles/config/default_config.csv b/csvfiles/config/default_config.csv index 8044bbf..0ea51e5 100644 --- a/csvfiles/config/default_config.csv +++ b/csvfiles/config/default_config.csv @@ -66,6 +66,7 @@ overalladditionchance;extraordinary emojichance;legendary buildfacechance;legendary humanexpressionchance;rare +humanvomitchance;rare joboractivitychance;normal # things in the middle of the prompt; custominputmidrepeats;2 diff --git a/csvfiles/eyecolors.csv b/csvfiles/eyecolors.csv new file mode 100644 index 0000000..2d8d28c --- /dev/null +++ b/csvfiles/eyecolors.csv @@ -0,0 +1,23 @@ +Brown +Blue +Green +Hazel +Amber +Gray +Violet +Turquoise +Silver +Gold +Copper +Topaz +Emerald Green +Sapphire +Ruby +Aquamarine +Honey +Chestnut +Ice Blue +Moss Green +Lavender colored +-color- +-colorscheme- \ No newline at end of file diff --git a/csvfiles/human_activities.csv b/csvfiles/human_activities.csv index 2b4b34b..97464c9 100644 --- a/csvfiles/human_activities.csv +++ b/csvfiles/human_activities.csv @@ -160,4 +160,5 @@ Triathlon -animal-back riding having a tea party Lounging -Bathing in a -waterlocation- \ No newline at end of file +Bathing in a -waterlocation- +drinking coffee in a cafe \ No newline at end of file diff --git a/csvfiles/humanvomit.csv b/csvfiles/humanvomit.csv new file mode 100644 index 0000000..898b496 --- /dev/null +++ b/csvfiles/humanvomit.csv @@ -0,0 +1,19 @@ +detailed face +intricate detailed face +highly detailed face +detailed skin +-basicbitchdescriptor- -eyecolor- eyes +-eyecolor- detailed eyes +realistic -basicbitchdescriptor- face +most -basicbitchdescriptor- in the world +realistic and detailed +sharp +sharp and in focus +natural skin texture +natural skin tones +pale skin +matte skin +perfect skin +skin pores +freckles +photo-realistic face \ No newline at end of file diff --git a/csvfiles/special_lists/buildfaceparts.csv b/csvfiles/special_lists/buildfaceparts.csv index c7367ee..9698cfc 100644 --- a/csvfiles/special_lists/buildfaceparts.csv +++ b/csvfiles/special_lists/buildfaceparts.csv @@ -1,6 +1,6 @@ OR(full;thick;thin;plump;cute;beautiful;Pouty;Sensual;Voluptuous;Delicate;Soft;Supple;Natural;Glossy;Defined;Tender;Rosy) lips OR(full;thick;thin;open;wide;narrow;expressive;Mysterious;cute;beautiful) mouth -OR(detailed;clear;cute;beautiful;weary;tired;glowing;narrow;almond-shaped;round;large;small;Sparkling;Luminous;Dreamy;Mysterious) eyes +OR(detailed;clear;cute;beautiful;weary;tired;glowing;narrow;almond-shaped;round;large;small;Sparkling;Luminous;Dreamy;Mysterious) OR(;-eyecolor-;normal) eyes OR(thick;arched;bushy;small;large;Well-groomed;Sculpted;Tapered;Curved;Natural;Full;Elegant;Prominent) eyebrows OR(large;small;short;long;cute;Button;Upturned;Snub;Sharp;Flat;High-bridged;Bulbous) nose OR(strong;pronounced;weak;small;large;Chiseled;Square;Defined;Dimpled;Round;Double;Slender;Soft) chin diff --git a/csvfiles/vomit.csv b/csvfiles/vomit.csv index 93e2a8a..3374e57 100644 --- a/csvfiles/vomit.csv +++ b/csvfiles/vomit.csv @@ -116,4 +116,5 @@ vibrant vignette vintage Zentangle -Liminal dream \ No newline at end of file +Liminal dream +-basicbitchdescriptor- \ No newline at end of file diff --git a/prompttester.py b/prompttester.py index 31f7ecc..d047426 100644 --- a/prompttester.py +++ b/prompttester.py @@ -52,14 +52,16 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("All done!") generateprompts(10,5 - ,"humanoid" # subject - ,"character" # artists - ,"all",False,"","","PREFIXPROMPT" - ,"SUFFIXPROMPT -humanexpression-" + ,"all" # subject + ,"all" # artists + ,"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,"","","PREFIXPROMPT" + ,"SUFFIXPROMPT" ,"",1,"" ,"" # subject override ,True, - "",100, "all" + "",20 + , "all" # gender , "all" # object types , "all" # humanoid types , "all" # concept types From 31465d6538ee9137e6ba5e3dae4b09f812f4686d Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 19:02:29 +0200 Subject: [PATCH 41/42] Added more descriptions in the explanation text --- scripts/onebuttonprompt.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/onebuttonprompt.py b/scripts/onebuttonprompt.py index 5ac40cd..3e5bef1 100644 --- a/scripts/onebuttonprompt.py +++ b/scripts/onebuttonprompt.py @@ -412,12 +412,20 @@ class Script(scripts.Script): 5. lines from songs - Picks a line from a song + 6. names from card based games - Picks a card name from various card games, such as magic the gathering, yugioh and many others. + ### Artists - Artists have a major impact on the result. Automatically, it will select between 0-3 artists out of 3483 artists for your prompt. + Artists have a major impact on the result. + + 1. all - it will cohesivly add about between 0-3 artists and style description. + + 2. all (wild) - it will randomly select between 0-3 artists out of 3483 artists for your prompt. + + Others will select within that artist category You can turn it off and maybe add your own in the prefix or suffix prompt fields @@ -489,6 +497,14 @@ class Script(scripts.Script): It will then recognize the body type and not generate it. It also recognizes the keyword wearing, and will not generate an outfit. + ### Overwrite outfit + + When you fill in the override outfit field, it will generate an outfit in the prompt based on the given value. It can be used in combination with override subject, but does not have to be. It works best with smaller descriptions of the outfit. + + An example would be: space suit, red dress, cloak. + + Works best when you set the subjects to to humanoid. + ### Other prompt fields The existing prompt and negative prompt fields are ignored. From 7d2c370896d4a4b8d976ea1a826c7aa1f33e6277 Mon Sep 17 00:00:00 2001 From: AIrjen <130234949+AIrjen@users.noreply.github.com> Date: Sat, 7 Oct 2023 19:11:39 +0200 Subject: [PATCH 42/42] small addition --- build_dynamic_prompt.py | 8 +++++++- prompttester.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 30960bd..ab9424a 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -1727,7 +1727,11 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # shots from inside can create cool effects in landscapes if(chance_roll(insanitylevel, subjectlandscapeaddonlocationchance) and insideshot == 0): insideshot = 1 - completeprompt += " from inside of a -addontolocationinside- " + # lets cheat a bit here, we can do something cool I saw on reddit + if(mainchooser=="humanoid" and legendary_dist(insanitylevel)): + completeprompt += " looking at a -addontolocationinside- " + else: + completeprompt += " from inside of a -addontolocationinside- " if(chance_roll(insanitylevel, subjectlandscapeaddonlocationchance) and insideshot == 0): completeprompt += " and " @@ -3312,6 +3316,8 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5): completeprompt = re.sub('-artiststyle- art,', '', completeprompt) completeprompt = re.sub('-artiststyle- art', '', completeprompt) completeprompt = re.sub('-artiststyle-', '', completeprompt) + completeprompt = re.sub('- art ', '', completeprompt) + completeprompt = re.sub('a his', 'his', completeprompt) completeprompt = re.sub('a her', 'her', completeprompt) diff --git a/prompttester.py b/prompttester.py index d047426..b18ff85 100644 --- a/prompttester.py +++ b/prompttester.py @@ -53,7 +53,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im generateprompts(10,5 ,"all" # subject - ,"all" # artists + ,"all (wild)" # artists ,"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,"","","PREFIXPROMPT" ,"SUFFIXPROMPT"