finished artify, added flufferizer

This commit is contained in:
AIrjen
2024-03-20 20:47:15 +01:00
parent 9d9d380697
commit 37aa4a963e
5 changed files with 347 additions and 11 deletions
+2 -1
View File
@@ -21,6 +21,7 @@ def generateprompts(amount = 1,prompt = "",artists="all",amountofartists = "1",
result = build_dynamic_prompt(insanitylevel=3)
else:
result = artify_prompt(prompt=prompt, artists=artists, amountofartists=amountofartists, mode=mode)
result = flufferizer(prompt=result, reverse_polarity=True)
print("ARTIFY COMPLETE: " + result)
print("")
print("loop " + str(steps))
@@ -33,4 +34,4 @@ def generateprompts(amount = 1,prompt = "",artists="all",amountofartists = "1",
print("")
print("All done!")
generateprompts(10,"a norwegian forest cat", "popular","3", "standard")
generateprompts(10,"a norwegian forest cat", "all","random", "standard")
+114 -8
View File
@@ -826,6 +826,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
stylesmode = False
thetokinatormode = False
dynamictemplatesmode = False
artifymode = False
# determine wether we should go for a template or not. Not hooked up to insanitylevel
if(imagetype == "only templates mode"):
@@ -887,6 +888,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
dynamictemplatesmode = True
print("Running with dynamic templates mode")
if(imagetype == "artify mode"):
specialmode = True
onlysubjectmode = True
artifymode = True
print("Running with artify mode")
# main stuff
generatetype = not specialmode
generatesubject = not templatemode
@@ -1104,7 +1111,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
subjectchooser = ""
mainchooser = ""
completeprompt += prefixprompt
#completeprompt += prefixprompt
completeprompt += ", "
@@ -2853,10 +2860,20 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
completeprompt += ", " + chosenstylesuffixcomplete
if(artifymode == True):
amountofartists = "random"
if(unique_dist(insanitylevel)):
mode = "super remix turbo"
elif(legendary_dist(insanitylevel)):
mode = "remix"
else:
mode = "standard"
completeprompt = artify_prompt(insanitylevel=insanitylevel,prompt=completeprompt, artists=artists, amountofartists=amountofartists, mode=mode, seed=seed)
completeprompt += " -tempnewwords- "
completeprompt += ", "
completeprompt = prefixprompt + ", " + completeprompt
completeprompt += suffixprompt
# and then up the compounding stuff
@@ -4003,7 +4020,8 @@ def replacewildcard(completeprompt, insanitylevel, wildcard,listname, activatehy
artiststyle.remove(chosenartiststyle)
if("-artistmedium-" in completeprompt):
completeprompt = completeprompt.replace("-artistmedium-",artistmediums[0] ,1)
if(artistmediums[0].lower() not in completeprompt.lower()):
completeprompt = completeprompt.replace("-artistmedium-",artistmediums[0] ,1)
if("-artistdescription-" in completeprompt):
completeprompt = completeprompt.replace("-artistdescription-",artistdescriptions[0] ,1)
@@ -4244,8 +4262,21 @@ def enhance_positive(positive_prompt = "", amountofwords = 3):
return addwords
def artify_prompt(prompt = "", artists = "all", amountofartists = "1", mode="standard"):
intamountofartists = int(amountofartists)
def artify_prompt(insanitylevel = 5, prompt = "", artists = "all", amountofartists = "1", mode="standard", seed = -1):
if(amountofartists=="random"):
intamountofartists = random.randint(1,int((insanitylevel/3) + 1.20))
else:
intamountofartists = int(amountofartists)
# set seed
# For use in ComfyUI (might bring to Automatic1111 as well)
# lets do it when its larger than 0
# Otherwise, just do nothing and it will keep on working based on an earlier set seed
if(seed > 0):
random.seed(seed)
# first build up a complete anti list. Those values are removing during list building
# this uses the antivalues string AND the antilist.csv
emptylist = []
@@ -4276,7 +4307,23 @@ def artify_prompt(prompt = "", artists = "all", amountofartists = "1", mode="sta
artistlist = csv_to_list("artists",antilist)
completeprompt = "art by "
# load up the styles list for the other modes
styleslist = csv_to_list("styles", antilist,"./csvfiles/templates/",0,"?")
stylessuffix = [item.split('-subject-')[1] for item in styleslist]
breakstylessuffix = [item.split(',') for item in stylessuffix]
allstylessuffixlist = [value for sublist in breakstylessuffix for value in sublist]
allstylessuffixlist = list(set(allstylessuffixlist))
artistsuffix = artist_descriptions_csv_to_list("artists_and_category")
breakartiststylessuffix = [item.split(',') for item in artistsuffix]
artiststylessuffixlist = [value for sublist in breakartiststylessuffix for value in sublist]
artiststylessuffixlist = list(set(artiststylessuffixlist))
allstylessuffixlist += artiststylessuffixlist
completeprompt = ""
if(common_dist(insanitylevel)):
completeprompt += "-artiststyle- "
completeprompt += "art by "
#Lets go effing artify this MF'er
for i in range(0,intamountofartists):
@@ -4285,11 +4332,27 @@ def artify_prompt(prompt = "", artists = "all", amountofartists = "1", mode="sta
else:
completeprompt += "-artist-, "
if(uncommon_dist(insanitylevel)):
completeprompt += "-artistmedium-, "
# now add the prompt in
completeprompt += prompt
for i in range(0,intamountofartists):
completeprompt += ", -artistdescription-"
if(mode.lower() == "remix"):
for i in range(0,intamountofartists):
completeprompt += ", " + artistsuffix.pop(artistsuffix.index(random.choice(artistsuffix)))
elif(mode.lower() == "super remix turbo"):
for i in range(0,intamountofartists*4):
completeprompt += ", " + allstylessuffixlist.pop(allstylessuffixlist.index(random.choice(allstylessuffixlist)))
else:
# else just go standard
for i in range(0,intamountofartists):
completeprompt += ", -artistdescription-"
while ("-artist-" in completeprompt):
@@ -4299,6 +4362,49 @@ def artify_prompt(prompt = "", artists = "all", amountofartists = "1", mode="sta
return completeprompt
def flufferizer(prompt = "", amountoffluff = "dynamic", seed = -1, reverse_polarity = False):
# set seed
# For use in ComfyUI (might bring to Automatic1111 as well)
# lets do it when its larger than 0
# Otherwise, just do nothing and it will keep on working based on an earlier set seed
if(seed > 0):
random.seed(seed)
if(reverse_polarity):
flufferlist = csv_to_list("antifluff") # all negative words
else:
flufferlist = csv_to_list("fluff")
# dynamic = based on prompt length + insanitylevel
minfluff = 4
maxfluff = 6
# short = 4-6
# medium = 5-8
# long = 8-12
if(amountoffluff == "dynamic"):
if(len(prompt) < 150):
amountoffluff = "long"
elif(len(prompt) < 250):
amountoffluff = "medium"
else:
amountoffluff = "short"
if(amountoffluff == "long"):
minfluff = 8
maxfluff = 12
if(amountoffluff == "medium"):
minfluff = 5
maxfluff = 8
for i in range(0,random.randint(minfluff, maxfluff)):
prompt += ", " + flufferlist.pop(flufferlist.index(random.choice(flufferlist)))
return prompt
def replace_match(match):
# Extract the first word from the match
words = match.group(0)[1:-1].split('|')
+99
View File
@@ -0,0 +1,99 @@
Amateurish
Amateurish composition
Amateurish creative
Arid
Background uninspired
bad atmosphere
bad quality
Barren
Basic
Basic detail
Basic dull focus
Basic ordinary dim light
Basic straightforward color
Basic straightforward color composition
Blurry focus
Clashing colors
Cloudy
Clumsy
Coarse artistic composition
Coarse detail
Common
Contaminated
Copied
Dim
Dim illumination
Dim light
Diminished quality
Disenchanted
Disgrace
Dull
Dull colors
Dull light
Faded colors
Illogical background
Imperfect background
Imperfect composition
Imperfect symmetry
Incoherent
Insecure
Insignificant
Lacking detail
Losing
Low color focused
Low contrasted
Low enhanced
Low intricate
low quality
Matte
Mediocre aesthetic
Mediocre color
Mediocre composition
Mild
Monochrome
ms paint
Mundane
Mundane atmosphere
Mundane composition
Negative emotional
Not very
Ordinary
Ordinary basic rough coarse detail
Ordinary detail
Ordinary simple low quality color basic
Pale colors
Plain
Plain clumsy
Profane
Realistic
Rough
Rough polished
Rugged
Simple
Sketchy
Stagnant
Static
Static background
Static boring incomplete lackluster
Static color
Static composition
Static dull atmosphere
Static imperfect background
Static plain composition
Surface
Ugly
Unappealing composition
Unattractive
Unchanged
Unimaginative
Unimpressive
Uninspirational
Uninspired
Unknown
Unknown quality
Unoriginal
Unromantic
Unstylish
Untheatrical
Void
Worst
1 Amateurish
2 Amateurish composition
3 Amateurish creative
4 Arid
5 Background uninspired
6 bad atmosphere
7 bad quality
8 Barren
9 Basic
10 Basic detail
11 Basic dull focus
12 Basic ordinary dim light
13 Basic straightforward color
14 Basic straightforward color composition
15 Blurry focus
16 Clashing colors
17 Cloudy
18 Clumsy
19 Coarse artistic composition
20 Coarse detail
21 Common
22 Contaminated
23 Copied
24 Dim
25 Dim illumination
26 Dim light
27 Diminished quality
28 Disenchanted
29 Disgrace
30 Dull
31 Dull colors
32 Dull light
33 Faded colors
34 Illogical background
35 Imperfect background
36 Imperfect composition
37 Imperfect symmetry
38 Incoherent
39 Insecure
40 Insignificant
41 Lacking detail
42 Losing
43 Low color focused
44 Low contrasted
45 Low enhanced
46 Low intricate
47 low quality
48 Matte
49 Mediocre aesthetic
50 Mediocre color
51 Mediocre composition
52 Mild
53 Monochrome
54 ms paint
55 Mundane
56 Mundane atmosphere
57 Mundane composition
58 Negative emotional
59 Not very
60 Ordinary
61 Ordinary basic rough coarse detail
62 Ordinary detail
63 Ordinary simple low quality color basic
64 Pale colors
65 Plain
66 Plain clumsy
67 Profane
68 Realistic
69 Rough
70 Rough polished
71 Rugged
72 Simple
73 Sketchy
74 Stagnant
75 Static
76 Static background
77 Static boring incomplete lackluster
78 Static color
79 Static composition
80 Static dull atmosphere
81 Static imperfect background
82 Static plain composition
83 Surface
84 Ugly
85 Unappealing composition
86 Unattractive
87 Unchanged
88 Unimaginative
89 Unimpressive
90 Uninspirational
91 Uninspired
92 Unknown
93 Unknown quality
94 Unoriginal
95 Unromantic
96 Unstylish
97 Untheatrical
98 Void
99 Worst
+130
View File
@@ -0,0 +1,130 @@
advanced cinematic perfect light
aesthetic
ambient
ambient atmosphere
ambient background
ambient illumination
ambient light
artistic
atmosphere
background inspired
badge
beautiful
beautiful composition
beautiful detailed
beautiful detailed supreme quality color intricate
beautiful elegant
best
cinematic
cinematic atmosphere
cinematic light
cinematic perfect intricate stunning fine detail
colorful
complex
complex artistic color composition
complimentary colors
confident
contemporary
contemporary fine detail
cool colors
creative
cute
deep aesthetic
deep rich colors
delicate
detailed
dramatic
dynamic
dynamic background
dynamic cinematic color
dynamic cinematic perfect background
dynamic composition
dynamic dramatic atmosphere
dynamic dramatic beautiful full taking
dynamic dramatic composition
elaborate
elegant
enchanted
enhanced quality
epic
epic atmosphere
epic composition
excellent composition
exquisite color
extremely rich detail
extremely stylish
fabulous colors
fantastic aesthetic
fertile
fine artistic composition
fine detail
fine polished
flowing
full color
glossy
glowing
gorgeous
grand illumination
great composition
great light
handsome
highly color focused
highly complex
highly contrasted
highly decorated
highly detail
highly detailed
highly enhanced
highly intricate
holy
illustrious
illustrious quality
imposing
inspired
intense
intricate
intricate artistic color
intricate detail
located artistic
lush
luxurious
luxurious sharp focus
luxury
magic atmosphere
magical
magical atmosphere
magical composition
magnificent
modified
original
perfect background
perfect composition
perfect symmetry
polished
positive emotional
professional creative
professional fine composition
pure
quality
radiant
rich deep colors
rich vivid colors
romantic
set logical ambient background
sharp focus
shiny
striking
stunning
stunning detail
sublime
sunny
surreal
theatrical
unique
very
very coherent
very inspirational
vibrant
vivid colors
warm light
winning
1 advanced cinematic perfect light
2 aesthetic
3 ambient
4 ambient atmosphere
5 ambient background
6 ambient illumination
7 ambient light
8 artistic
9 atmosphere
10 background inspired
11 badge
12 beautiful
13 beautiful composition
14 beautiful detailed
15 beautiful detailed supreme quality color intricate
16 beautiful elegant
17 best
18 cinematic
19 cinematic atmosphere
20 cinematic light
21 cinematic perfect intricate stunning fine detail
22 colorful
23 complex
24 complex artistic color composition
25 complimentary colors
26 confident
27 contemporary
28 contemporary fine detail
29 cool colors
30 creative
31 cute
32 deep aesthetic
33 deep rich colors
34 delicate
35 detailed
36 dramatic
37 dynamic
38 dynamic background
39 dynamic cinematic color
40 dynamic cinematic perfect background
41 dynamic composition
42 dynamic dramatic atmosphere
43 dynamic dramatic beautiful full taking
44 dynamic dramatic composition
45 elaborate
46 elegant
47 enchanted
48 enhanced quality
49 epic
50 epic atmosphere
51 epic composition
52 excellent composition
53 exquisite color
54 extremely rich detail
55 extremely stylish
56 fabulous colors
57 fantastic aesthetic
58 fertile
59 fine artistic composition
60 fine detail
61 fine polished
62 flowing
63 full color
64 glossy
65 glowing
66 gorgeous
67 grand illumination
68 great composition
69 great light
70 handsome
71 highly color focused
72 highly complex
73 highly contrasted
74 highly decorated
75 highly detail
76 highly detailed
77 highly enhanced
78 highly intricate
79 holy
80 illustrious
81 illustrious quality
82 imposing
83 inspired
84 intense
85 intricate
86 intricate artistic color
87 intricate detail
88 located artistic
89 lush
90 luxurious
91 luxurious sharp focus
92 luxury
93 magic atmosphere
94 magical
95 magical atmosphere
96 magical composition
97 magnificent
98 modified
99 original
100 perfect background
101 perfect composition
102 perfect symmetry
103 polished
104 positive emotional
105 professional creative
106 professional fine composition
107 pure
108 quality
109 radiant
110 rich deep colors
111 rich vivid colors
112 romantic
113 set logical ambient background
114 sharp focus
115 shiny
116 striking
117 stunning
118 stunning detail
119 sublime
120 sunny
121 surreal
122 theatrical
123 unique
124 very
125 very coherent
126 very inspirational
127 vibrant
128 vivid colors
129 warm light
130 winning
+2 -2
View File
@@ -94,10 +94,10 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
print("")
print("All done!")
generateprompts(10,4
generateprompts(10,5
,"all" # subject
,"all" # artists
,"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"
,"artify 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", "dynamic templates mode", "artify mode"
, False # only artists
,"","","PREFIXPROMPT"
,"SUFFIXPROMPT"