improvements
Added photo type and cameras changed some logic around for landscapes and buildings
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
|
||||
*.pyc
|
||||
+36
-7
@@ -14,6 +14,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artistmode = "
|
||||
|
||||
completeprompt = " "
|
||||
|
||||
isphoto = 0
|
||||
othertype = 0
|
||||
humanspecial = 0
|
||||
wereanimaladded = 0
|
||||
@@ -134,16 +135,18 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artistmode = "
|
||||
if(mainchooser in ["object", "animal", "humanoid", "concept"] and othertype == 0 and "portait" not in completeprompt):
|
||||
completeprompt = add_from_csv(completeprompt, "shotsizes", 0, ""," of a ")
|
||||
elif("portait" in completeprompt):
|
||||
completeprompt += " of a "
|
||||
completeprompt += " ,close up of a "
|
||||
# Multiple subjects doesnt really work, need to think of other way to do multiple subjects. Maybe AND in the prompt?
|
||||
# if(subjectchooser in ["object", "animal", "humanoid"] and rare_dist(insanitylevel)):
|
||||
# completeprompt = completeprompt[:-2] # remove a from
|
||||
# completeprompt = add_from_csv(completeprompt, "amounts", 0, "","")
|
||||
|
||||
|
||||
# Common to have 1 description, uncommon to have 2
|
||||
if(common_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "descriptors", 0, "","")
|
||||
|
||||
if(normal_dist(insanitylevel)):
|
||||
if(uncommon_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "descriptors", 0, "","")
|
||||
|
||||
if(subjectchooser in ["animal as human,","human", "job", "fictional", "non fictional", "humanoid"] and normal_dist(insanitylevel)):
|
||||
@@ -271,7 +274,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artistmode = "
|
||||
# riding an animal, holding an object or driving a vehicle, rare
|
||||
if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid"] and rare_dist(insanitylevel)):
|
||||
humanspecial = 1
|
||||
speciallist = ["riding a -animal- ", "holding a -object- ", "driving a -vehicle-", "visiting a -building-"]
|
||||
speciallist = [" riding a -animal- ", "holding a -object- ", " driving a -vehicle-", " visiting a -building-"]
|
||||
completeprompt += random.choice(speciallist)
|
||||
|
||||
# SD understands emoji's. Can be used to manipulate facial expressions.
|
||||
@@ -324,16 +327,33 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artistmode = "
|
||||
|
||||
if(subjectchooser in ["animal as human,","human","fictional", "non fictional", "humanoid"] and normal_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "accessories", 1, "","")
|
||||
# Sometimes get 2
|
||||
if(uncommon_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "accessories", 1, "","")
|
||||
|
||||
|
||||
if(subjectchooser not in ["landscape", "concept"] and normal_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "locations", 1, " background is ","")
|
||||
if(subjectchooser not in ["landscape", "concept"] and humanspecial != 1 and normal_dist(insanitylevel)):
|
||||
backgroundtype = ["landscape", "buildingbackground", "insidebuilding"]
|
||||
match random.choice(backgroundtype):
|
||||
case "landscape":
|
||||
completeprompt = add_from_csv(completeprompt, "locations", 1, " background is ","")
|
||||
case "buildingbackground":
|
||||
completeprompt = ",background is "
|
||||
if(uncommon_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "descriptors", 0, "","")
|
||||
completeprompt = add_from_csv(completeprompt, "buildings", 0, "","")
|
||||
case "insidebuilding":
|
||||
completeprompt = ",inside a "
|
||||
if(uncommon_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "descriptors", 0, "","")
|
||||
completeprompt = add_from_csv(completeprompt, "buildings", 0, "","")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(normal_dist(insanitylevel)):
|
||||
# landscapes it is nice to always have a time period
|
||||
if(normal_dist(insanitylevel) or subjectchooser=="landscape"):
|
||||
completeprompt = add_from_csv(completeprompt, "timeperiods", 1, "","")
|
||||
|
||||
if(mainchooser not in ["landscape"] and normal_dist(insanitylevel)):
|
||||
@@ -352,7 +372,16 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artistmode = "
|
||||
if(normal_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "lighting", 1, "","")
|
||||
|
||||
if(normal_dist(insanitylevel)):
|
||||
# determine wether we have a photo or not
|
||||
if("hoto" in completeprompt):
|
||||
isphoto = 1
|
||||
if(common_dist(insanitylevel)):
|
||||
completeprompt += ", film grain"
|
||||
|
||||
if(isphoto == 1):
|
||||
completeprompt = add_from_csv(completeprompt, "cameras", 1, "","")
|
||||
|
||||
if(normal_dist(insanitylevel) or isphoto == 1):
|
||||
completeprompt = add_from_csv(completeprompt, "lenses", 1, "","")
|
||||
|
||||
if(normal_dist(insanitylevel)):
|
||||
|
||||
@@ -88,4 +88,9 @@ Freckles
|
||||
Medallion
|
||||
Crown
|
||||
Tiara
|
||||
Mask made out of -material-
|
||||
Mask made out of -material-
|
||||
angelic halo
|
||||
wrinkles
|
||||
pores
|
||||
Makeup
|
||||
No makeup
|
||||
|
@@ -30,7 +30,7 @@ Skyscraper
|
||||
Tower
|
||||
Shopping mall
|
||||
Department store
|
||||
Supermarket
|
||||
Market
|
||||
Grocery store
|
||||
Convenience store
|
||||
Restaurant
|
||||
|
||||
|
@@ -0,0 +1,22 @@
|
||||
Fujifilm XT3
|
||||
Canon 5d mark 4
|
||||
Nikon d3300
|
||||
Canon eos 5d mark 4
|
||||
Sony A7
|
||||
Nikon d850
|
||||
Phase One XF IQ4 150MP
|
||||
Nikon Z9
|
||||
Iphone X
|
||||
Samsung Galaxy
|
||||
compact camera
|
||||
film camera
|
||||
Polaroid
|
||||
Kodak portra 400
|
||||
Kodak portra 800
|
||||
Canon RF
|
||||
Canon EF
|
||||
Canon R5
|
||||
Hasselblad
|
||||
Kodak gold 200
|
||||
Nikon d850
|
||||
Sony A9 II
|
||||
|
@@ -32,6 +32,7 @@ Colorful
|
||||
Colorless
|
||||
Vivid
|
||||
Vibrant
|
||||
Neutral
|
||||
Iridescent
|
||||
Neon
|
||||
Lime green
|
||||
|
@@ -55,4 +55,5 @@ Vivid colors
|
||||
-color- neon hue
|
||||
-color- and -color- hue
|
||||
-color- and -color- neon hue
|
||||
-color- color grading
|
||||
-color- color grading
|
||||
psychedelic colors
|
||||
|
@@ -323,4 +323,9 @@ Cartoony
|
||||
1800's
|
||||
1700's
|
||||
1600's
|
||||
Luminescent
|
||||
Luminescent
|
||||
Floating
|
||||
Shiny
|
||||
Chibi
|
||||
Anime
|
||||
Verdant
|
||||
|
@@ -8,4 +8,5 @@ Caramel
|
||||
Honey
|
||||
Platinum
|
||||
Gray
|
||||
Bald
|
||||
-color-
|
||||
|
@@ -1,7 +1,5 @@
|
||||
RAW photo
|
||||
Photograph
|
||||
Polaroid
|
||||
Fujifilm
|
||||
Color splash
|
||||
Digital artwork
|
||||
Digital art
|
||||
@@ -33,4 +31,5 @@ Unreal Engine
|
||||
VRay
|
||||
Abstract
|
||||
Fractal
|
||||
Portait
|
||||
Portait
|
||||
Raw digital photo
|
||||
|
+3
-1
@@ -353,4 +353,6 @@ Count
|
||||
Countess
|
||||
Baron
|
||||
Baroness
|
||||
Nobleman
|
||||
Nobleman
|
||||
Vizier
|
||||
Sultan
|
||||
|
+5
-2
@@ -1,7 +1,9 @@
|
||||
overhead angle
|
||||
Zoom lens
|
||||
Depth of field 100mm
|
||||
Depth of field 270mm
|
||||
80mm
|
||||
50mm
|
||||
35mm
|
||||
F/1.8
|
||||
F/2.8
|
||||
F/5
|
||||
@@ -13,4 +15,5 @@ Selective focus
|
||||
Fish-eye Lens
|
||||
telephoto lens
|
||||
800mm lens
|
||||
macro lens
|
||||
macro lens
|
||||
L USM
|
||||
|
@@ -653,4 +653,6 @@ Riften
|
||||
Stormwind
|
||||
Orgrimmar
|
||||
Ironforge
|
||||
Tristram
|
||||
Tristram
|
||||
cityscape
|
||||
paradise
|
||||
|
@@ -103,4 +103,7 @@ Titanium
|
||||
Brass
|
||||
Gems
|
||||
Crystal
|
||||
Emerald
|
||||
Emerald
|
||||
Wires
|
||||
Plating
|
||||
Fabric
|
||||
|
@@ -115,6 +115,7 @@ Anne Hathaway
|
||||
Natalie Portman
|
||||
Mila Kunis
|
||||
Emma Stone
|
||||
Anya Taylor-Joy
|
||||
Keira Knightley
|
||||
Julianne Moore
|
||||
Viola Davis
|
||||
|
||||
|
@@ -377,4 +377,5 @@ Marigolds
|
||||
-object- in a bottle
|
||||
Cup of Coffee
|
||||
Cup of Tea
|
||||
Faberge egg
|
||||
Faberge egg
|
||||
Quilt
|
||||
|
@@ -68,4 +68,9 @@ Playing card
|
||||
Fantasy concept art
|
||||
Cartoon
|
||||
Mixed media
|
||||
Cover Art
|
||||
Cover Art
|
||||
Historical Photo
|
||||
Associated press photo
|
||||
editorial illustration
|
||||
digital sculpture made of -material-
|
||||
Fashion shoot
|
||||
|
@@ -90,14 +90,14 @@ Athletic shorts
|
||||
Bermudas
|
||||
High-waisted shorts
|
||||
Low-waisted shorts
|
||||
Playsuits
|
||||
Overalls
|
||||
Blazers
|
||||
Cardigans
|
||||
Hoodies
|
||||
Sweatshirts
|
||||
T-shirts
|
||||
Tank tops
|
||||
Playsuit
|
||||
Overall
|
||||
Blazer
|
||||
Cardigan
|
||||
Hoodie
|
||||
Sweatshirt
|
||||
T-shirt
|
||||
Tank top
|
||||
High-waisted pants and crop top
|
||||
Maxi skirt and tank top
|
||||
Blazer and jeans
|
||||
@@ -194,6 +194,7 @@ Nightshirt and leggings
|
||||
Satin or silk chemise
|
||||
Babydoll
|
||||
Kimono
|
||||
Wedding dress
|
||||
Sari
|
||||
Hanbok
|
||||
Dirndl
|
||||
|
||||
|
@@ -24,4 +24,6 @@ octane engine
|
||||
ultra high res
|
||||
masterpiece
|
||||
lots of details
|
||||
dslr
|
||||
dslr
|
||||
photolab
|
||||
adobe lightroom
|
||||
|
@@ -32,4 +32,6 @@ over the shoulder shot
|
||||
selfie shot angle
|
||||
High exposure
|
||||
Aerial View
|
||||
cinematic shot
|
||||
cinematic shot
|
||||
overhead angle
|
||||
Sharp focus
|
||||
|
@@ -21,4 +21,6 @@ Snowing
|
||||
Raining
|
||||
Clear skies
|
||||
Sunny
|
||||
Bathed in shadows
|
||||
Bathed in shadows
|
||||
Thunderstorm
|
||||
Foggy
|
||||
|
+11
-2
@@ -1,5 +1,6 @@
|
||||
Golden ratio
|
||||
Rule of Thirds
|
||||
dynamic composition
|
||||
-color- outlines
|
||||
Paint splotches
|
||||
Light streaks
|
||||
@@ -11,7 +12,7 @@ made of -material-
|
||||
-color- and -color- dust particles
|
||||
inticrate details
|
||||
behance
|
||||
geometric pattern
|
||||
geometric patterns
|
||||
raytraced reflections
|
||||
delicate
|
||||
opulent
|
||||
@@ -25,4 +26,12 @@ Swirling
|
||||
Ribbons
|
||||
Spirals
|
||||
-color- explosions
|
||||
Folded -material-
|
||||
Folded -material-
|
||||
-color- lightning bolts
|
||||
under water
|
||||
halation
|
||||
bloom
|
||||
caustics
|
||||
Swirling -material-
|
||||
vignette
|
||||
Instagram
|
||||
|
@@ -19,7 +19,7 @@ steps = 0
|
||||
|
||||
while steps < loops:
|
||||
# build prompt
|
||||
randomprompt = build_dynamic_prompt(5,"all","all","all")
|
||||
randomprompt = build_dynamic_prompt(7,"all","all","all")
|
||||
|
||||
# prompt + size
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class Script(scripts.Script):
|
||||
def ui(self, is_img2img):
|
||||
with gr.Tab("Main"):
|
||||
with gr.Row():
|
||||
insanitylevel = gr.Slider(1, 10, value=5, step=1, label="Higher levels increases complexity and randomness of generated prompt")
|
||||
insanitylevel = gr.Slider(1, 10, value=7, step=1, label="Higher levels increases complexity and randomness of generated prompt")
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
subject = gr.Dropdown(
|
||||
|
||||
Reference in New Issue
Block a user