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] 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,""