in between commit
This commit is contained in:
+61
-7
@@ -16,6 +16,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
remove_weights = False
|
||||
less_verbose = False
|
||||
add_vomit = True
|
||||
add_quality = True
|
||||
|
||||
|
||||
# set seed
|
||||
@@ -84,6 +86,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
# "Stable Cascade" -- Remove weights
|
||||
if(base_model == "Stable Cascade"):
|
||||
remove_weights = True
|
||||
add_vomit = False
|
||||
add_quality = False
|
||||
if(base_model == "SD1.5"):
|
||||
less_verbose = True
|
||||
|
||||
@@ -134,7 +138,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
hairvomitlist = csv_to_list("hairvomit",antilist,"./csvfiles/",0,"?",False,False)
|
||||
|
||||
humanoidlist = csv_to_list("humanoids",antilist)
|
||||
imagetypelist = csv_to_list(csvfilename="imagetypes",antilist=antilist, insanitylevel=insanitylevel)
|
||||
imagetypelist = csv_to_list(csvfilename="imagetypes",antilist=antilist, insanitylevel=insanitylevel, delimiter="?")
|
||||
joblist = csv_to_list(csvfilename="jobs",antilist=antilist,skipheader=True,gender=gender)
|
||||
lenslist = csv_to_list(csvfilename="lenses",antilist=antilist, insanitylevel=insanitylevel)
|
||||
lightinglist = csv_to_list(csvfilename="lighting",antilist=antilist, insanitylevel=insanitylevel)
|
||||
@@ -351,6 +355,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
tokinatorlist = csv_to_list("tokinator", antilist,"./csvfiles/templates/",0,"?")
|
||||
styleslist = csv_to_list("styles", antilist,"./csvfiles/templates/",0,"?")
|
||||
dynamictemplatesprefixlist = csv_to_list("dynamic_templates_prefix", antilist,"./csvfiles/templates/",0,"?")
|
||||
dynamictemplatessuffixlist = csv_to_list("dynamic_templates_suffix", antilist,"./csvfiles/templates/",0,"?")
|
||||
|
||||
|
||||
# subjects
|
||||
@@ -806,6 +812,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
onlysubjectmode = False
|
||||
stylesmode = False
|
||||
thetokinatormode = False
|
||||
dynamictemplatesmode = False
|
||||
|
||||
# determine wether we should go for a template or not. Not hooked up to insanitylevel
|
||||
if(imagetype == "only templates mode"):
|
||||
@@ -862,6 +869,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
print("Running with a completely random set of words")
|
||||
print("All safety and logic is turned off")
|
||||
|
||||
if(imagetype == "dynamic templates mode"):
|
||||
specialmode = True
|
||||
dynamictemplatesmode = True
|
||||
print("Running with dynamic templates mode")
|
||||
|
||||
# main stuff
|
||||
generatetype = not specialmode
|
||||
@@ -887,8 +898,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
generatelighting = bool(lightinglist) and not specialmode
|
||||
generatemood = bool(moodlist) and not specialmode
|
||||
generatepose = bool(poselist) and not templatemode
|
||||
generatevomit = bool(vomitlist) and not specialmode
|
||||
generatequality = bool(qualitylist) and not specialmode
|
||||
generatevomit = bool(vomitlist) and not specialmode and add_vomit
|
||||
generatequality = bool(qualitylist) and not specialmode and add_quality
|
||||
generateshot = bool(shotsizelist) and not specialmode
|
||||
generatetimeperiod = bool(timeperiodlist) and not specialmode
|
||||
generateemoji = bool(emojilist) and not templatemode
|
||||
@@ -913,8 +924,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
generateepisodetitle = bool(episodetitlelist) and not specialmode
|
||||
|
||||
generateminilocationaddition = bool(minilocationadditionslist) and not specialmode
|
||||
generateminivomit = bool(minivomitlist) and not specialmode
|
||||
generateimagetypequality = bool(imagetypequalitylist) and not specialmode and generateimagetypequality
|
||||
generateminivomit = bool(minivomitlist) and not specialmode and add_vomit
|
||||
generateimagetypequality = bool(imagetypequalitylist) and not specialmode and generateimagetypequality
|
||||
generateoveralladdition = bool(overalladditionlist) and not specialmode
|
||||
generateimagetype = bool(imagetypelist) and not specialmode and generateimagetype
|
||||
|
||||
@@ -1430,13 +1441,20 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
|
||||
|
||||
# start styles mode here
|
||||
# start styles mode here
|
||||
if(stylesmode == True):
|
||||
chosenstyle = random.choice(styleslist)
|
||||
chosenstyleprefix = chosenstyle.split("-subject-")[0]
|
||||
chosenstylesuffix= chosenstyle.split("-subject-")[1]
|
||||
completeprompt += chosenstyleprefix
|
||||
|
||||
if(dynamictemplatesmode == True):
|
||||
chosenstyleprefix = random.choice(dynamictemplatesprefixlist)
|
||||
completeprompt += chosenstyleprefix
|
||||
if(chosenstyleprefix[-1] == "."):
|
||||
completeprompt += " OR(Capturing a; Describing a;Portraying a;Featuring a)"
|
||||
else:
|
||||
completeprompt += " OR(with a;capturing a; describing a;portraying a;of a;featuring a)"
|
||||
|
||||
|
||||
# start artist part
|
||||
@@ -2609,6 +2627,28 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
# start styles mode here
|
||||
if(stylesmode == True):
|
||||
completeprompt += chosenstylesuffix
|
||||
|
||||
if(dynamictemplatesmode == True):
|
||||
if("-artist-" in completeprompt):
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-artist-" not in sentence.lower()]
|
||||
if("-lighting-" in completeprompt):
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-lighting-" not in sentence.lower()]
|
||||
if("-shotsize-" in completeprompt):
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-shotsize-" not in sentence.lower()]
|
||||
if("-artmovement-" in completeprompt):
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-artmovement-" not in sentence.lower()]
|
||||
if("-imagetype-" in completeprompt or "-othertype-" in completeprompt ):
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-imagetype-" not in sentence.lower()]
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-othertype-" not in sentence.lower()]
|
||||
if("-colorcombination-" in completeprompt or "-colorscheme" in completeprompt ):
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-colorcombination-" not in sentence.lower()]
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-colorscheme-" not in sentence.lower()]
|
||||
if("-mood-" in completeprompt or "-humanexpression" in completeprompt ):
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-mood-" not in sentence.lower()]
|
||||
dynamictemplatessuffixlist = [sentence for sentence in dynamictemplatessuffixlist if "-humanexpression-" not in sentence.lower()]
|
||||
|
||||
chosenstylesuffix = random.choice(dynamictemplatessuffixlist)
|
||||
completeprompt += ". " + chosenstylesuffix
|
||||
|
||||
|
||||
# custom style list
|
||||
@@ -2773,7 +2813,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
|
||||
# In front and the back?
|
||||
completeprompt = parse_custom_functions(completeprompt, insanitylevel)
|
||||
if(dynamictemplatesmode == False):
|
||||
completeprompt = parse_custom_functions(completeprompt, insanitylevel)
|
||||
|
||||
# Sometimes change he/she to the actual subject
|
||||
# Doesnt work if someone puts in a manual subject
|
||||
@@ -4173,6 +4214,8 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5):
|
||||
completeprompt = re.sub(' ,', ',', completeprompt)
|
||||
completeprompt = re.sub(',\(', ', (', completeprompt)
|
||||
|
||||
|
||||
|
||||
while " " in completeprompt:
|
||||
completeprompt = re.sub(' ', ' ', completeprompt)
|
||||
completeprompt = re.sub('a The', 'The', completeprompt)
|
||||
@@ -4194,10 +4237,15 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5):
|
||||
|
||||
|
||||
completeprompt = re.sub('art art', 'art', completeprompt)
|
||||
completeprompt = re.sub('Art art', 'art', completeprompt)
|
||||
completeprompt = re.sub('lighting lighting', 'lighting', completeprompt)
|
||||
completeprompt = re.sub('light lighting', 'light', completeprompt)
|
||||
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('shot shot', 'shot', completeprompt)
|
||||
|
||||
|
||||
completeprompt = re.sub('a his', 'his', completeprompt)
|
||||
@@ -4243,6 +4291,12 @@ def cleanup(completeprompt, advancedprompting, insanitylevel = 5):
|
||||
# Move the extracted LoRA's to the end of completeprompt
|
||||
#completeprompt += " " + " ".join(allLoRA)
|
||||
|
||||
completeprompt = completeprompt.replace(' . ', '. ')
|
||||
completeprompt = completeprompt.replace(', . ', '. ')
|
||||
completeprompt = completeprompt.replace(',. ', '. ')
|
||||
completeprompt = completeprompt.replace('., ', '. ')
|
||||
completeprompt = completeprompt.replace('. . ', '. ')
|
||||
|
||||
completeprompt = completeprompt.strip(", ")
|
||||
|
||||
return completeprompt
|
||||
|
||||
@@ -213,6 +213,7 @@ Extreme
|
||||
Fairy-Tale
|
||||
Fallacious
|
||||
Familiar
|
||||
Fae
|
||||
Fantastical
|
||||
Fascinating
|
||||
Fashionable
|
||||
|
||||
|
@@ -82,6 +82,7 @@ Exotic
|
||||
Expressive
|
||||
Extraordinary
|
||||
Fairy-Tale
|
||||
Fae
|
||||
Fantastical
|
||||
Fantasy
|
||||
Fashionable
|
||||
@@ -174,6 +175,7 @@ Shabby
|
||||
Smart
|
||||
Smiling
|
||||
Spellbinding
|
||||
Spiritual
|
||||
Stressed
|
||||
Striking
|
||||
Stunning
|
||||
|
||||
|
@@ -14,4 +14,8 @@ colorful
|
||||
vibrant
|
||||
dramatic
|
||||
artistic
|
||||
-basicbitchdescriptor-
|
||||
-basicbitchdescriptor-
|
||||
candid
|
||||
amateurish
|
||||
top-notch
|
||||
superb
|
||||
|
@@ -35,4 +35,5 @@ Airbrush painting
|
||||
On pale black paper
|
||||
On pale -color- paper
|
||||
Anime
|
||||
Cinematic still
|
||||
Cinematic still
|
||||
OR(;2D;3D;uncommon) Game art
|
||||
|
@@ -1,7 +1,7 @@
|
||||
RAW photo
|
||||
Photograph
|
||||
Digital art
|
||||
3D Rendering
|
||||
OR(;2D;3D;uncommon) Game art
|
||||
Concept art
|
||||
Portrait
|
||||
Anime
|
||||
|
||||
|
@@ -14,4 +14,5 @@ Portrait
|
||||
Raw digital photo
|
||||
On pale black paper
|
||||
Anime
|
||||
Cinematic still
|
||||
Cinematic still
|
||||
OR(;2D;3D;uncommon) Game art
|
||||
|
@@ -11,6 +11,7 @@ Disgusting
|
||||
Embarrassing
|
||||
Energetic
|
||||
Evil
|
||||
Fae
|
||||
Fantasy
|
||||
Fairy-Tale
|
||||
Fearful
|
||||
@@ -39,6 +40,7 @@ Satisfying
|
||||
Sci-Fi
|
||||
Shameful
|
||||
Shameless
|
||||
Spiritual
|
||||
Suffering
|
||||
Surprising
|
||||
Tranquil
|
||||
|
||||
|
@@ -7,6 +7,7 @@ Dark
|
||||
Depressing
|
||||
Energetic
|
||||
Evil
|
||||
Fae
|
||||
Fantasy
|
||||
Fairy-Tale
|
||||
Fearful
|
||||
@@ -29,6 +30,7 @@ Romantic
|
||||
Sad
|
||||
Satisfying
|
||||
Sci-Fi
|
||||
Spiritual
|
||||
Suffering
|
||||
Surprising
|
||||
Tranquil
|
||||
|
||||
|
+3
-1
@@ -75,4 +75,6 @@ frolicking in a -minilocation-
|
||||
pointe pose
|
||||
Dancing and looking at camera
|
||||
Walking towards camera
|
||||
Walking away from camera
|
||||
Walking away from camera
|
||||
peace sign pose
|
||||
-humanexpression- pose
|
||||
|
@@ -5,6 +5,7 @@ Lord of the Rings
|
||||
Blade runner
|
||||
D&D
|
||||
Cyberpunk
|
||||
Fae
|
||||
Fantasy
|
||||
Dark Fantasy
|
||||
Corporate
|
||||
@@ -31,5 +32,6 @@ Matrix
|
||||
Mad Max
|
||||
Harry Potter
|
||||
Shadowrun
|
||||
Spirit world
|
||||
Neo-Tokyo
|
||||
Steampunk
|
||||
|
@@ -0,0 +1,11 @@
|
||||
a OR(-imagetype-;-artiststyle-;OR(-imagetype-;-artiststyle-;-othertype-;-artmovement-;OR(-colorscheme-;-colorcombination-))) OR(artwork;art) OR(by;designed by;stylized by;uncommon) -artist-, a OR(-artiststyle-;-imagetypequality-) OR(art;work;artwork) OR(with a OR(touch;splash;hint) of OR(-colorcombination- colors;-color-;-colorscheme-);reminiscent of -artmovement-;inspired by -artmovement-;taking influence from -artmovement-).
|
||||
a OR(-imagetype-;-artiststyle-;OR(-imagetype-;-artiststyle-;-othertype-;-artmovement-;OR(-colorscheme-;-colorcombination-))) OR(artwork;art) OR(by;designed by;stylized by;uncommon) -artist-, a OR(-artiststyle-;-imagetypequality-) OR(art;work;artwork)
|
||||
a OR(;-imagetypequality-;uncommon) a OR(;-imagetype-;uncommon) artwork in OR(;-imagetypequality-;uncommon) -artmovement- style
|
||||
a OR(;-shotsize- shot;uncommon) -descriptor- -imagetype- artwork inspired by OR(-setting- setting;-culture- setting).
|
||||
a OR(-colorscheme-;-colorcombination-) OR(;-basicbitchdescriptor-;-imagetypequality-;uncommon) OR(OR(;gradient;uncommon)background;art;artwork;image)
|
||||
a OR(-imagetype-;-othertype-) OR(artwork;art)
|
||||
a OR(;-shotsize- shot;uncommon) OR(;-photoaddition-;uncommon) photograph OR(;shot with a -camera-;shot with a -lens- lens;uncommon)
|
||||
Combining the styles of -artist- OR(;, -artist-;rare) and -artist-, this OR(;-artiststyle-;uncommon) OR(;-imagetypequality-;uncommon) image
|
||||
OR(Unique;one of a kind;-basicbitchdescriptor-) art in the form of a -othertype-.
|
||||
Capturing the OR(;feeling of;uncommon) -mood- OR(atmosphere;mood;ambience;energy;vibes), this -direction- OR(work;scene;image;art;artwork)
|
||||
The very -descriptor- OR(artwork;art;image;scene) is inspired by OR(-imagetype-;-othertype-;-artmovement-;OR(-colorscheme-;-colorcombination-))
|
||||
|
@@ -0,0 +1,10 @@
|
||||
OR(Describing;Evoking) a sense of OR(-mood-;-descriptor-) OR(under;in;that is) -lighting- lighting. OR(;It is -quality-.;uncommon)
|
||||
It has OR(-colorcombination- colors;-color-;-colorscheme-) details.
|
||||
It is OR(evoking;capturing) the feeling of being -mood-.
|
||||
The quality is OR(;very;uncommon) -imagetypequality-. OR(; OR(The art has a;The artist used a;The image uses a;It has a;Including a) -vomit- type effect.;uncommon)
|
||||
The OR(artwork;art;image) is OR(by;designed by;stylized by) -artist- OR(;in a -artiststyle- style;uncommon).
|
||||
The -lighting- OR(art is -basicbitchdescriptor-;art is of -imagetypequality- quality;enhances the image).
|
||||
The overall style of the image is OR(-artmovement-;inspired by -artmovement-;inspired by -setting-).
|
||||
The -direction- OR(work;scene;image;art;artwork) OR(exudes;has) OR(-imagetypequality-;-mood-) vibes.
|
||||
The OR(work;scene;image;art;artwork) is -quality-. OR(;It is OR(captured in;lit by) -lighting- lighting.;uncommon)
|
||||
It is set on a OR(-color-;-colorscheme-;-colorcombination-) background.
|
||||
|
+3
-1
@@ -20,7 +20,7 @@
|
||||
-color- splash
|
||||
-colorcombination-
|
||||
-space-
|
||||
(-color- and -color-:0.7)
|
||||
-color- and -color-
|
||||
arcane
|
||||
Batik
|
||||
behance
|
||||
@@ -62,6 +62,7 @@ Encaustic Paint
|
||||
epic fantasy
|
||||
ethereal magical atmosphere
|
||||
expressive brush strokes
|
||||
fae folkore
|
||||
fairy tale
|
||||
Film grain
|
||||
Floral motifs
|
||||
@@ -126,6 +127,7 @@ Simplified style
|
||||
sloppy strokes
|
||||
Soutache
|
||||
Spirals
|
||||
Spirit world
|
||||
stylized
|
||||
sunbeam
|
||||
surreal design
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import random
|
||||
|
||||
|
||||
class OneButtonPresets:
|
||||
|
||||
+2
-2
@@ -97,7 +97,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||
generateprompts(10,5
|
||||
,"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"
|
||||
,"dynamic templates mode" # 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 # only artists
|
||||
,"","","PREFIXPROMPT"
|
||||
,"SUFFIXPROMPT"
|
||||
@@ -115,5 +115,5 @@ generateprompts(10,5
|
||||
, "" #outfit override
|
||||
, False #prompt_g_and_l
|
||||
, "Stable Cascade" #base model
|
||||
, "All (random)..." #preset "All (random)..."
|
||||
, "" #preset "All (random)..."
|
||||
)
|
||||
Reference in New Issue
Block a user