From dd3fc731be05e1c3b8b80ad68d26c7fbd15c1c94 Mon Sep 17 00:00:00 2001 From: AIrjen Date: Sun, 16 Apr 2023 09:44:51 +0200 Subject: [PATCH] added multiple image types and other types --- build_dynamic_prompt.py | 14 ++++++++++++-- csvfiles/othertypes.csv | 5 ++++- scripts/onebuttonprompt.py | 21 +++++++++++++++------ 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 5b78977..8ff4ef8 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -19,6 +19,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all humanspecial = 0 wereanimaladded = 0 isweighted = 0 + amountofimagetypes = 0 hybridorswap = "" artistmode = "normal" @@ -129,9 +130,18 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all if artistmode in ["enhancing"]: completeprompt += " [" - if(imagetype != "all"): + if(imagetype != "all" and imagetype != "all - force multiple" and imagetype != "only other types"): completeprompt += " " + imagetype + " " - elif(normal_dist(insanitylevel)): + elif(imagetype == "all - force multiple"): + amountofimagetypes = random.randint(2,3) + elif(imagetype == "only other types"): + othertype = 1 + completeprompt = add_from_csv(completeprompt, "othertypes", 1, ""," of a ") + + if(imagetype == "all" and normal_dist(insanitylevel)): + amountofimagetypes = 1 + + for i in range(amountofimagetypes): # one in 6 images is a complex/other type if(random.randint(0,5) < 5): completeprompt = add_from_csv(completeprompt, "imagetypes", 1, "",",") diff --git a/csvfiles/othertypes.csv b/csvfiles/othertypes.csv index 3524f5b..68140ec 100644 --- a/csvfiles/othertypes.csv +++ b/csvfiles/othertypes.csv @@ -79,4 +79,7 @@ mandala zentangle Natural parks travel poster Stained glass window -Miniature diorama \ No newline at end of file +Miniature diorama +Anime key visual +Multiple layers of silhouette +Retro comic style artwork \ No newline at end of file diff --git a/scripts/onebuttonprompt.py b/scripts/onebuttonprompt.py index e2e6a9d..32a1ddf 100644 --- a/scripts/onebuttonprompt.py +++ b/scripts/onebuttonprompt.py @@ -11,7 +11,7 @@ from build_dynamic_prompt import * subjects = ["all","object","animal","humanoid", "landscape", "concept"] artists = ["all", "none"] -imagetypes = ["all", "photograph", "octane render","digital art","concept art", "painting", "portait"] +imagetypes = ["all", "all - force multiple", "photograph", "octane render","digital art","concept art", "painting", "portait", "anime key visual", "only other types"] promptmode = ["at the back", "in the front"] promptcompounder = [1,2,3,4,5] @@ -87,19 +87,28 @@ class Script(scripts.Script): There are an immense number of image types, not only paintings and photo's, but also isometric renders and funko pops. You can however, overwrite it with the most popular ones. + + + 1. all --> normally picks a image type as random. Can choose a 'other' more unique type. + + 2. all - force multiple --> idea by redditor WestWordHoeDown, it forces to choose between 2 and 3 image types - 1. photograph + 3. photograph - 2. octane render + 4. octane render - 3. digital art + 5. digital art - 4. concept art + 6. concept art - 5. painting + 7. painting 6. portait + 7. anime key visual + + 8. only other types --> Will pick only from the more unique types, such as stained glass window or a funko pop + ### Location of existing prompt