in between commit

This commit is contained in:
AIrjen
2024-03-09 17:13:43 +01:00
parent 4dc3ceba09
commit 213760e3b9
16 changed files with 109 additions and 16 deletions
+61 -7
View File
@@ -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
+1
View File
@@ -213,6 +213,7 @@ Extreme
Fairy-Tale
Fallacious
Familiar
Fae
Fantastical
Fascinating
Fashionable
1 -space-
213 Fairy-Tale
214 Fallacious
215 Familiar
216 Fae
217 Fantastical
218 Fascinating
219 Fashionable
+2
View File
@@ -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
1 lowborn
82 Expressive
83 Extraordinary
84 Fairy-Tale
85 Fae
86 Fantastical
87 Fantasy
88 Fashionable
175 Smart
176 Smiling
177 Spellbinding
178 Spiritual
179 Stressed
180 Striking
181 Stunning
+5 -1
View File
@@ -14,4 +14,8 @@ colorful
vibrant
dramatic
artistic
-basicbitchdescriptor-
-basicbitchdescriptor-
candid
amateurish
top-notch
superb
1 professional
14 vibrant
15 dramatic
16 artistic
17 -basicbitchdescriptor-
18 candid
19 amateurish
20 top-notch
21 superb
+2 -1
View File
@@ -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 RAW photo
35 On pale black paper
36 On pale -color- paper
37 Anime
38 Cinematic still
39 OR(;2D;3D;uncommon) Game art
+1 -1
View File
@@ -1,7 +1,7 @@
RAW photo
Photograph
Digital art
3D Rendering
OR(;2D;3D;uncommon) Game art
Concept art
Portrait
Anime
1 RAW photo
2 Photograph
3 Digital art
4 3D Rendering OR(;2D;3D;uncommon) Game art
5 Concept art
6 Portrait
7 Anime
+2 -1
View File
@@ -14,4 +14,5 @@ Portrait
Raw digital photo
On pale black paper
Anime
Cinematic still
Cinematic still
OR(;2D;3D;uncommon) Game art
1 RAW photo
14 Raw digital photo
15 On pale black paper
16 Anime
17 Cinematic still
18 OR(;2D;3D;uncommon) Game art
+2
View File
@@ -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
1 Amusing
11 Embarrassing
12 Energetic
13 Evil
14 Fae
15 Fantasy
16 Fairy-Tale
17 Fearful
40 Sci-Fi
41 Shameful
42 Shameless
43 Spiritual
44 Suffering
45 Surprising
46 Tranquil
+2
View File
@@ -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
1 Amusing
7 Depressing
8 Energetic
9 Evil
10 Fae
11 Fantasy
12 Fairy-Tale
13 Fearful
30 Sad
31 Satisfying
32 Sci-Fi
33 Spiritual
34 Suffering
35 Surprising
36 Tranquil
+3 -1
View File
@@ -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
1 looking up
75 pointe pose
76 Dancing and looking at camera
77 Walking towards camera
78 Walking away from camera
79 peace sign pose
80 -humanexpression- pose
+2
View File
@@ -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
1 Star Wars
5 Blade runner
6 D&D
7 Cyberpunk
8 Fae
9 Fantasy
10 Dark Fantasy
11 Corporate
32 Mad Max
33 Harry Potter
34 Shadowrun
35 Spirit world
36 Neo-Tokyo
37 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-))
1 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-).
2 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)
3 a OR(;-imagetypequality-;uncommon) a OR(;-imagetype-;uncommon) artwork in OR(;-imagetypequality-;uncommon) -artmovement- style
4 a OR(;-shotsize- shot;uncommon) -descriptor- -imagetype- artwork inspired by OR(-setting- setting;-culture- setting).
5 a OR(-colorscheme-;-colorcombination-) OR(;-basicbitchdescriptor-;-imagetypequality-;uncommon) OR(OR(;gradient;uncommon)background;art;artwork;image)
6 a OR(-imagetype-;-othertype-) OR(artwork;art)
7 a OR(;-shotsize- shot;uncommon) OR(;-photoaddition-;uncommon) photograph OR(;shot with a -camera-;shot with a -lens- lens;uncommon)
8 Combining the styles of -artist- OR(;, -artist-;rare) and -artist-, this OR(;-artiststyle-;uncommon) OR(;-imagetypequality-;uncommon) image
9 OR(Unique;one of a kind;-basicbitchdescriptor-) art in the form of a -othertype-.
10 Capturing the OR(;feeling of;uncommon) -mood- OR(atmosphere;mood;ambience;energy;vibes), this -direction- OR(work;scene;image;art;artwork)
11 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.
1 OR(Describing;Evoking) a sense of OR(-mood-;-descriptor-) OR(under;in;that is) -lighting- lighting. OR(;It is -quality-.;uncommon)
2 It has OR(-colorcombination- colors;-color-;-colorscheme-) details.
3 It is OR(evoking;capturing) the feeling of being -mood-.
4 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)
5 The OR(artwork;art;image) is OR(by;designed by;stylized by) -artist- OR(;in a -artiststyle- style;uncommon).
6 The -lighting- OR(art is -basicbitchdescriptor-;art is of -imagetypequality- quality;enhances the image).
7 The overall style of the image is OR(-artmovement-;inspired by -artmovement-;inspired by -setting-).
8 The -direction- OR(work;scene;image;art;artwork) OR(exudes;has) OR(-imagetypequality-;-mood-) vibes.
9 The OR(work;scene;image;art;artwork) is -quality-. OR(;It is OR(captured in;lit by) -lighting- lighting.;uncommon)
10 It is set on a OR(-color-;-colorscheme-;-colorcombination-) background.
+3 -1
View File
@@ -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 -basicbitchdescriptor-
20 -color- splash
21 -colorcombination-
22 -space-
23 (-color- and -color-:0.7) -color- and -color-
24 arcane
25 Batik
26 behance
62 epic fantasy
63 ethereal magical atmosphere
64 expressive brush strokes
65 fae folkore
66 fairy tale
67 Film grain
68 Floral motifs
127 sloppy strokes
128 Soutache
129 Spirals
130 Spirit world
131 stylized
132 sunbeam
133 surreal design
-1
View File
@@ -1,7 +1,6 @@
import json
import os
import shutil
import random
class OneButtonPresets:
+2 -2
View File
@@ -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)..."
)