Merge pull request #12 from AIrjen/big-reddit-requests-update
Big reddit requests update
This commit is contained in:
+52
-11
@@ -10,7 +10,7 @@ from random_functions import *
|
||||
# insanity level controls randomness of propmt 0-10
|
||||
# forcesubject van be used to force a certain type of subject
|
||||
# Set artistmode to none, to exclude artists
|
||||
def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all", imagetype = "all"):
|
||||
def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all", imagetype = "all", onlyartists = False):
|
||||
|
||||
completeprompt = ", "
|
||||
|
||||
@@ -19,8 +19,10 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
humanspecial = 0
|
||||
wereanimaladded = 0
|
||||
isweighted = 0
|
||||
amountofimagetypes = 0
|
||||
hybridorswap = ""
|
||||
artistmode = "normal"
|
||||
insideshot = 0
|
||||
|
||||
if(insanitylevel==0):
|
||||
insanitylevel = random.randint(1, 10) # 10 = add everything, 1 is add almost nothing
|
||||
@@ -58,7 +60,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
# possible?: think about curated artist list?
|
||||
artistsplacement = "front"
|
||||
if(uncommon_dist(insanitylevel)):
|
||||
if(uncommon_dist(insanitylevel) and onlyartists == False):
|
||||
artistsplacement = "back"
|
||||
|
||||
if(artists == "all" and artistsplacement == "front"):
|
||||
@@ -84,9 +86,14 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
if modeselector < 5 and end - step >= 2:
|
||||
artistmodeslist = ["hybrid", "stopping", "adding", "switching", "enhancing"]
|
||||
artistmode = artistmodeslist[modeselector]
|
||||
if artistmode in ["hybrid","switching"] and end - step == 1:
|
||||
if (artistmode in ["hybrid","switching"] and end - step == 1):
|
||||
artistmode = "normal"
|
||||
|
||||
if(onlyartists == True and artistmode == "enhancing"):
|
||||
artistmode = "normal"
|
||||
if(onlyartists == True and step == end):
|
||||
step = step - 1
|
||||
|
||||
if artistmode in ["hybrid", "stopping", "adding","switching"]:
|
||||
completeprompt += " ["
|
||||
|
||||
@@ -124,14 +131,31 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
completeprompt += "]"
|
||||
|
||||
|
||||
if(onlyartists == True):
|
||||
completeprompt = completeprompt.strip(", ")
|
||||
print("only generated these artists:" + completeprompt)
|
||||
return completeprompt
|
||||
|
||||
|
||||
completeprompt = completeprompt + ", "
|
||||
|
||||
|
||||
|
||||
if artistmode in ["enhancing"]:
|
||||
completeprompt += " ["
|
||||
|
||||
if(imagetype != "all"):
|
||||
completeprompt += " " + imagetype + " "
|
||||
elif(normal_dist(insanitylevel)):
|
||||
if(imagetype != "all" and imagetype != "all - force multiple" and imagetype != "only other types"):
|
||||
completeprompt += " " + imagetype + ", "
|
||||
elif(imagetype == "all - force multiple" or unique_dist(insanitylevel)):
|
||||
amountofimagetypes = random.randint(2,3)
|
||||
elif(imagetype == "only other types"):
|
||||
othertype = 1
|
||||
completeprompt = add_from_csv(completeprompt, "othertypes", 1, ""," of a ")
|
||||
|
||||
if(imagetype == "all" and normal_dist(insanitylevel) and amountofimagetypes <= 1):
|
||||
amountofimagetypes = 1
|
||||
|
||||
for i in range(amountofimagetypes):
|
||||
# one in 6 images is a complex/other type
|
||||
if(random.randint(0,5) < 5):
|
||||
completeprompt = add_from_csv(completeprompt, "imagetypes", 1, "",",")
|
||||
@@ -140,9 +164,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
completeprompt = add_from_csv(completeprompt, "othertypes", 1, ""," of a ")
|
||||
|
||||
|
||||
if(mainchooser in ["object", "animal", "humanoid", "concept"] and othertype == 0 and "portait" not in completeprompt):
|
||||
if(mainchooser in ["object", "animal", "humanoid", "concept"] and othertype == 0 and "portrait" not in completeprompt):
|
||||
completeprompt = add_from_csv(completeprompt, "shotsizes", 0, ""," of a ")
|
||||
elif("portait" in completeprompt):
|
||||
elif("portrait" in completeprompt):
|
||||
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)):
|
||||
@@ -277,7 +301,14 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
completeprompt += ":" + "-location-" + ":" + str(random.randint(1,5)) + "]"
|
||||
hybridorswap = ""
|
||||
|
||||
if(normal_dist(insanitylevel)):
|
||||
# shots from inside can create cool effects in landscapes
|
||||
if(legendary_dist(insanitylevel)):
|
||||
insideshot = 1
|
||||
completeprompt += " from inside of a "
|
||||
addontolocation = ["locations","buildings"]
|
||||
completeprompt = add_from_csv(completeprompt, random.choice(addontolocation), 0, "","")
|
||||
|
||||
if(normal_dist(insanitylevel) and insideshot == 0):
|
||||
completeprompt += " and "
|
||||
if(rare_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "descriptors", 0, "","")
|
||||
@@ -286,6 +317,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
addontolocation = ["locations","buildings", "vehicles"]
|
||||
completeprompt = add_from_csv(completeprompt, random.choice(addontolocation), 0, "","")
|
||||
|
||||
|
||||
|
||||
if(subjectchooser == "event"):
|
||||
completeprompt = add_from_csv(completeprompt, "events", 0, "\"","\"")
|
||||
@@ -315,6 +348,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
humanspecial = 1
|
||||
speciallist = [" riding a -animal- ", "holding a -object- ", " driving a -vehicle-", " visiting a -building-", "with a -animal-", "surrounded by -object-s"]
|
||||
completeprompt += random.choice(speciallist)
|
||||
|
||||
|
||||
# SD understands emoji's. Can be used to manipulate facial expressions.
|
||||
# emoji, legendary
|
||||
@@ -377,8 +411,13 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
if(uncommon_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "accessories", 1, "","")
|
||||
|
||||
if(legendary_dist(insanitylevel) and subjectchooser not in ["landscape", "concept"]):
|
||||
insideshot = 1
|
||||
completeprompt += ", from inside of a "
|
||||
addontolocation = ["locations","buildings"]
|
||||
completeprompt = add_from_csv(completeprompt, random.choice(addontolocation), 0, "","")
|
||||
|
||||
if(subjectchooser not in ["landscape", "concept"] and humanspecial != 1 and normal_dist(insanitylevel)):
|
||||
if(subjectchooser not in ["landscape", "concept"] and humanspecial != 1 and insideshot == 0 and normal_dist(insanitylevel)):
|
||||
backgroundtypelist = ["landscape", "buildingbackground", "insidebuilding"]
|
||||
backgroundtype = random.choice(backgroundtypelist)
|
||||
if(backgroundtype == "landscape"):
|
||||
@@ -439,6 +478,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
if(uncommon_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "vomit", 1, "","")
|
||||
|
||||
#adding a great work of art, like starry night has cool effects. But this should happen only very rarely.
|
||||
if(novel_dist(insanitylevel)):
|
||||
completeprompt = add_from_csv(completeprompt, "greatworks", 1, "in style of ","")
|
||||
|
||||
# everyone loves the adding quality. The better models don't need this, but lets add it anyway
|
||||
if(uncommon_dist(insanitylevel)):
|
||||
@@ -582,7 +624,6 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
completeprompt = re.sub(',\(', ', (', completeprompt)
|
||||
|
||||
completeprompt = re.sub('a The', 'The', completeprompt)
|
||||
completeprompt = re.sub('ss ', 's ', completeprompt)
|
||||
|
||||
completeprompt = re.sub(' +', ' ', completeprompt[2:]) # remove first character, that is always a comma. Remove any excess spaces
|
||||
|
||||
|
||||
@@ -102,6 +102,11 @@ Circlet
|
||||
-vehicle- Tattoo
|
||||
-building- Tattoo
|
||||
Three-eyed
|
||||
one-eyed
|
||||
Hair ribbons
|
||||
Fangs
|
||||
Belts
|
||||
Belts
|
||||
-material- helmet
|
||||
Cape
|
||||
Cloak
|
||||
-material- trimmings
|
||||
|
+11
-1
@@ -324,4 +324,14 @@ Brachiosaurus
|
||||
Allosaurus
|
||||
Ankylosaurus
|
||||
Diplodocus
|
||||
Pterodactyl
|
||||
Pterodactyl
|
||||
Pikachu
|
||||
Charizard
|
||||
Mewtwo
|
||||
Bulbasaur
|
||||
Squirtle
|
||||
Jigglypuff
|
||||
Snorlax
|
||||
Eevee
|
||||
Gyarados
|
||||
Dragonite
|
||||
|
@@ -134,4 +134,5 @@ Minecraft
|
||||
MinecraftCore
|
||||
Orientalism Art
|
||||
Dieselpunk
|
||||
Synthwave Art
|
||||
Synthwave Art
|
||||
Emopunk
|
||||
|
@@ -173,4 +173,8 @@ The Sydney Opera House
|
||||
The Eiffel Tower
|
||||
The Pyramids of Teotihuacan
|
||||
The Burj Khalifa
|
||||
The Golden Gate Bridge
|
||||
The Golden Gate Bridge
|
||||
Stargate
|
||||
Portal
|
||||
Monolith
|
||||
-color- Monoliths
|
||||
|
+2
-1
@@ -45,4 +45,5 @@ Neon
|
||||
Lime green
|
||||
Rainbow
|
||||
Psychedelic
|
||||
Gradient
|
||||
Gradient
|
||||
Pearlescent
|
||||
|
@@ -93,4 +93,6 @@ Gift
|
||||
Pillars
|
||||
Burden
|
||||
Dawn
|
||||
Need
|
||||
Need
|
||||
Shape
|
||||
Labyrinth
|
||||
|
@@ -75,4 +75,7 @@ Pain
|
||||
Beauty
|
||||
Blood
|
||||
Elegance
|
||||
Study
|
||||
Study
|
||||
Metal
|
||||
Paradise
|
||||
Sea
|
||||
|
@@ -173,4 +173,7 @@ Georgian
|
||||
Regency
|
||||
Atomic Age
|
||||
Digital Age
|
||||
Baroque
|
||||
Baroque
|
||||
Pirate
|
||||
Dark ages
|
||||
Burlesque
|
||||
|
@@ -283,4 +283,9 @@ Folded
|
||||
Glam
|
||||
Chic
|
||||
Zen
|
||||
Rustic
|
||||
Rustic
|
||||
Rich
|
||||
Varied
|
||||
Injured
|
||||
Scrumptious
|
||||
Kintsugi
|
||||
|
@@ -30,7 +30,6 @@ Tinker Bell
|
||||
Peter Pan
|
||||
Captain Hook
|
||||
Winnie the Pooh
|
||||
Shrek
|
||||
Donkey from Shrek
|
||||
Fiona from Shrek
|
||||
Pinocchio
|
||||
@@ -58,11 +57,6 @@ Slinky Dog from Toy Story
|
||||
Jessie from Toy Story
|
||||
Rex from Toy Story
|
||||
Hamm from Toy Story
|
||||
Nemo from Finding Nemo
|
||||
Dory from Finding Nemo
|
||||
Marlin from Finding Nemo
|
||||
Crush from Finding Nemo
|
||||
Squirt from Finding Nemo
|
||||
Lightning McQueen from Cars
|
||||
Mater from Cars
|
||||
Doc Hudson from Cars
|
||||
@@ -71,9 +65,6 @@ Sulley
|
||||
Randall Boggs
|
||||
Remy from Ratatouille
|
||||
Linguini from Ratatouille
|
||||
Carl Fredricksen from Up
|
||||
Dug from Up
|
||||
Russell from Up
|
||||
Joy from Inside Out
|
||||
Sadness from Inside Out
|
||||
Anger from Inside Out
|
||||
@@ -225,12 +216,6 @@ Tauriel
|
||||
Thranduil
|
||||
Arwen
|
||||
Glorfindel
|
||||
Beren
|
||||
Luthien
|
||||
Melian
|
||||
Tuor
|
||||
Idril
|
||||
Earendil
|
||||
Harry Potter
|
||||
Hermione Granger
|
||||
Ron Weasley
|
||||
@@ -370,21 +355,18 @@ Ryu
|
||||
Ken Masters
|
||||
Chun-Li
|
||||
Sub-Zero
|
||||
Scorpion
|
||||
Scorpion from Mortal Kombat
|
||||
Solid Snake
|
||||
Big Boss
|
||||
Ezio Auditore
|
||||
Altair Ibn-La'Ahad
|
||||
Aloy
|
||||
Joel
|
||||
Ellie
|
||||
Geralt of Rivia
|
||||
Trevor Philips
|
||||
Michael De Santa
|
||||
Franklin Clinton
|
||||
Niko Bellic
|
||||
Tommy Vercetti
|
||||
CJ
|
||||
Marcus Fenix
|
||||
Dom Santiago
|
||||
Arthur Morgan
|
||||
@@ -392,23 +374,12 @@ John Marston
|
||||
Red Dead Redemption
|
||||
Arthur Curry
|
||||
Cole MacGrath
|
||||
Bugs Bunny
|
||||
SpongeBob SquarePants
|
||||
Homer Simpson
|
||||
Scooby-Doo
|
||||
Tom and Jerry
|
||||
Pikachu
|
||||
Woody Woodpecker
|
||||
Betty Boop
|
||||
Mickey Mouse
|
||||
Donald Duck
|
||||
Goofy
|
||||
Daffy Duck
|
||||
Garfield
|
||||
Bart Simpson
|
||||
Fred Flintstone
|
||||
Shrek
|
||||
Stewie Griffin
|
||||
Pink Panther
|
||||
Popeye
|
||||
Charlie Brown
|
||||
@@ -435,81 +406,69 @@ Kyle Broflovski
|
||||
Peter Griffin
|
||||
Brian Griffin
|
||||
Stewie Griffin
|
||||
Bender
|
||||
Bender from Futurama
|
||||
Fry from Futurama
|
||||
Leela from Futurama
|
||||
Roger from American Dad
|
||||
Steve Smith from American Dad
|
||||
Homer Simpson from The Simpsons
|
||||
Walter White from Breaking Bad
|
||||
Tony Soprano from The Sopranos
|
||||
Don Draper from Mad Men
|
||||
Ross Geller from Friends
|
||||
Jerry Seinfeld from Seinfeld
|
||||
Michael Scott from The Office
|
||||
Carrie Bradshaw from Sex and the City
|
||||
Buffy Summers from Buffy the Vampire Slayer
|
||||
Tyrion Lannister from Game of Thrones
|
||||
Olivia Pope from Scandal
|
||||
Dexter Morgan from Dexter
|
||||
Meredith Grey from Grey's Anatomy
|
||||
Rachel Green from Friends
|
||||
Sheldon Cooper from The Big Bang Theory
|
||||
Lorelai Gilmore from Gilmore Girls
|
||||
Cookie Lyon from Empire
|
||||
Barney Stinson from How I Met Your Mother
|
||||
Daenerys Targaryen from Game of Thrones
|
||||
Sherlock Holmes from Sherlock
|
||||
Leslie Knope from Parks and Recreation
|
||||
Alicia Florrick from The Good Wife
|
||||
Steve Smith
|
||||
Walter White
|
||||
Tony Soprano
|
||||
Don Draper
|
||||
Ross Geller
|
||||
Jerry Seinfeld
|
||||
Michael Scott
|
||||
Carrie Bradshaw
|
||||
Buffy Summers
|
||||
Tyrion Lannister
|
||||
Olivia Pope
|
||||
Dexter Morgan
|
||||
Meredith Grey
|
||||
Rachel Green
|
||||
Sheldon Cooper
|
||||
Lorelai Gilmore
|
||||
Cookie Lyon
|
||||
Barney Stinson
|
||||
Daenerys Targaryen
|
||||
Sherlock Holmes
|
||||
Leslie Knope
|
||||
Alicia Florrick
|
||||
Eleven from Stranger Things
|
||||
Carrie Mathison from Homeland
|
||||
Mindy Lahiri from The Mindy Project
|
||||
Carrie Mathison
|
||||
Mindy Lahiri
|
||||
Agent Dale Cooper from Twin Peaks
|
||||
Eric Cartman from South Park
|
||||
Will Byers from Stranger Things
|
||||
Dr. House from House
|
||||
Claire Underwood from House of Cards
|
||||
Rick Grimes from The Walking Dead
|
||||
Carrie Brownstein from Portlandia
|
||||
Abed Nadir from Community
|
||||
Agent Mulder from The X-Files
|
||||
Carmela Soprano from The Sopranos
|
||||
Fred Flintstone from The Flintstones
|
||||
Leslie Poole from Veep
|
||||
Jesse Pinkman from Breaking Bad
|
||||
Lorelei Lee from The Marvelous Mrs. Maisel
|
||||
Tracy Jordan from 30 Rock
|
||||
Omar Little from The Wire
|
||||
Dwight Schrute from The Office
|
||||
Tyrone Biggums from Chappelle's Show
|
||||
Omarosa Manigault Newman from The Apprentice
|
||||
Issa Dee from Insecure
|
||||
David Brent from The Office
|
||||
Betty Draper from Mad Men
|
||||
Kenny Powers from Eastbound & Down
|
||||
Selina Meyer from Veep
|
||||
Peggy Olson from Mad Men
|
||||
Eric Cartman
|
||||
Will Byers
|
||||
Dr. House
|
||||
Claire Underwood
|
||||
Rick Grimes
|
||||
Carrie Brownstein
|
||||
Abed Nadir
|
||||
Agent Mulder
|
||||
Carmela Soprano
|
||||
Leslie Poole
|
||||
Jesse Pinkman
|
||||
Lorelei Lee
|
||||
Tracy Jordan
|
||||
Omar Little
|
||||
Dwight Schrute
|
||||
Tyrone Biggums
|
||||
Omarosa Manigault Newman
|
||||
Issa Dee
|
||||
David Brent
|
||||
Betty Draper
|
||||
Kenny Powers
|
||||
Selina Meyer
|
||||
Peggy Olson
|
||||
Ash Ketchum
|
||||
Misty from pokemon
|
||||
Brock from pokemon
|
||||
Gary Oak from pokemon
|
||||
Professor Oak from pokemon
|
||||
Nurse Joy from pokemon
|
||||
Officer Jenny from pokemon
|
||||
Gary Oak
|
||||
Professor Oak
|
||||
Nurse Joy
|
||||
Officer Jenny
|
||||
Jessie from pokemon
|
||||
James from pokemon
|
||||
Team rocket
|
||||
Pikachu
|
||||
Charizard
|
||||
Mewtwo
|
||||
Bulbasaur
|
||||
Squirtle
|
||||
Jigglypuff
|
||||
Snorlax
|
||||
Eevee
|
||||
Gyarados
|
||||
Dragonite
|
||||
John Wick
|
||||
Captain -material-beard
|
||||
-animal-man
|
||||
@@ -541,4 +500,7 @@ Levi Ackerman
|
||||
Saitama
|
||||
Jotaro Kujo
|
||||
Guts
|
||||
Alucard
|
||||
Alucard
|
||||
-animal- like human
|
||||
Kermit the frog
|
||||
Miss piggy
|
||||
|
@@ -0,0 +1,13 @@
|
||||
Starry Night
|
||||
Mona Lisa
|
||||
Laocoön
|
||||
the david
|
||||
girl with the pearl earring
|
||||
the birth of venus
|
||||
the last supper
|
||||
the great wave
|
||||
Venus of Willendorf
|
||||
Bust of Nefertiti
|
||||
Christ Pantocrator
|
||||
The Creation of Adam
|
||||
The Scream
|
||||
|
@@ -101,4 +101,5 @@ Side-swept curls
|
||||
Pigtails
|
||||
Braided pigtails
|
||||
Space buns
|
||||
Mermaid waves
|
||||
Mermaid waves
|
||||
Balayage
|
||||
|
@@ -31,5 +31,6 @@ Unreal Engine
|
||||
VRay
|
||||
Abstract
|
||||
Fractal
|
||||
Portait
|
||||
Raw digital photo
|
||||
portrait
|
||||
Raw digital photo
|
||||
Airbrush painting
|
||||
|
+3
-1
@@ -359,4 +359,6 @@ Sultan
|
||||
Geisha
|
||||
Yogi
|
||||
Adventurer
|
||||
Royalty
|
||||
Royalty
|
||||
Cowboy
|
||||
Cowgirl
|
||||
|
@@ -33,4 +33,5 @@ Black lighting
|
||||
Gel lighting
|
||||
-color- lighting
|
||||
Moonlight
|
||||
Sunlight
|
||||
Sunlight
|
||||
Accent lighting
|
||||
|
@@ -669,4 +669,9 @@ The Great Barrier Reef
|
||||
The Terracotta Army
|
||||
The Moai of Easter Island
|
||||
-material- caverns
|
||||
city of -material-
|
||||
city of -material-
|
||||
-color- nebula
|
||||
Wormhole
|
||||
Portal
|
||||
Bamboo Forest
|
||||
Labyrinth
|
||||
|
@@ -109,4 +109,8 @@ Vines
|
||||
Cobblestone
|
||||
Moss
|
||||
Scales
|
||||
Alabaster
|
||||
Alabaster
|
||||
Jelly
|
||||
Pearl
|
||||
Opal
|
||||
Diamond
|
||||
|
+3
-1
@@ -28,4 +28,6 @@ Horror
|
||||
Dark
|
||||
Light
|
||||
Relaxed
|
||||
Tranquil
|
||||
Tranquil
|
||||
Regret
|
||||
Suffering
|
||||
|
@@ -401,4 +401,5 @@ Baklava
|
||||
Strudel
|
||||
Beignet
|
||||
Scone
|
||||
Bread
|
||||
Bread
|
||||
Skull
|
||||
|
@@ -79,4 +79,11 @@ mandala
|
||||
zentangle
|
||||
Natural parks travel poster
|
||||
Stained glass window
|
||||
Miniature diorama
|
||||
Miniature diorama
|
||||
Anime key visual
|
||||
Multiple layers of silhouette
|
||||
Retro comic style artwork
|
||||
Metal pin
|
||||
a felt muppet
|
||||
Glitch art
|
||||
a ceramic coffee mug
|
||||
|
@@ -191,7 +191,7 @@ Onesie or footed pajamas
|
||||
Sleep shorts and tank top
|
||||
Boxer shorts and t-shirt
|
||||
Nightshirt and leggings
|
||||
Satin or silk chemise
|
||||
Satin chemise
|
||||
Babydoll
|
||||
Kimono
|
||||
Wedding dress
|
||||
@@ -486,6 +486,7 @@ Field jacket
|
||||
Chore coat
|
||||
Raincoat
|
||||
Fur coat
|
||||
Fur trimmed coat
|
||||
Armor
|
||||
Short skirt and a long jacket
|
||||
-material- outfit
|
||||
|
||||
|
+3
-1
@@ -62,4 +62,6 @@ fashion modeling pose
|
||||
relaxing pose
|
||||
sleeping pose
|
||||
Contrapposto
|
||||
Tilted head
|
||||
Tilted head
|
||||
Action scene
|
||||
Fluid movement
|
||||
|
@@ -36,4 +36,5 @@ cinematic shot
|
||||
overhead angle
|
||||
Sharp focus
|
||||
Street level shot
|
||||
Fashion shot
|
||||
Fashion shot
|
||||
Full length frame
|
||||
|
+3
-1
@@ -49,4 +49,6 @@ Light sparkles
|
||||
Complex background
|
||||
Plain white background
|
||||
Zentangle
|
||||
Mandala
|
||||
Mandala
|
||||
Luminous trails
|
||||
Kintsugi
|
||||
|
@@ -24,4 +24,10 @@ def unique_dist(insanitylevel):
|
||||
roll = (random.randint(1, 75)<insanitylevel)
|
||||
if(roll):
|
||||
print("Critical hit! Something unique has been added to the prompt")
|
||||
return roll
|
||||
|
||||
def novel_dist(insanitylevel):
|
||||
roll = (random.randint(1, 500)<insanitylevel)
|
||||
if(roll):
|
||||
print("Uh, something novel has been added to the prompt. Interesting.")
|
||||
return roll
|
||||
+181
-15
@@ -11,8 +11,10 @@ from build_dynamic_prompt import *
|
||||
|
||||
subjects = ["all","object","animal","humanoid", "landscape", "concept"]
|
||||
artists = ["all", "none"]
|
||||
imagetypes = ["all", "photograph", "octane render","digital art","concept art", "painting", "portait"]
|
||||
imagetypes = ["all", "all - force multiple", "photograph", "octane render","digital art","concept art", "painting", "portrait", "anime key visual", "only other types"]
|
||||
promptmode = ["at the back", "in the front"]
|
||||
promptcompounder = [1,2,3,4,5]
|
||||
ANDtogglemode = ["comma", "AND", "current prompt + AND", "automatic AND"]
|
||||
|
||||
|
||||
class Script(scripts.Script):
|
||||
@@ -23,7 +25,17 @@ class Script(scripts.Script):
|
||||
def show(self, is_img2img):
|
||||
return True
|
||||
|
||||
|
||||
def ui(self, is_img2img):
|
||||
def gen_prompt(insanitylevel, subject, artist, imagetype):
|
||||
|
||||
promptlist = []
|
||||
|
||||
for i in range(5):
|
||||
promptlist.append(build_dynamic_prompt(insanitylevel,subject,artist, imagetype))
|
||||
|
||||
return promptlist
|
||||
|
||||
with gr.Tab("Main"):
|
||||
with gr.Row():
|
||||
insanitylevel = gr.Slider(1, 10, value=7, step=1, label="Higher levels increases complexity and randomness of generated prompt")
|
||||
@@ -86,30 +98,141 @@ class Script(scripts.Script):
|
||||
<font size="2">
|
||||
There are an immense number of image types, not only paintings and photo's, but also isometric renders and funko pops.
|
||||
You can however, overwrite it with the most popular ones.
|
||||
|
||||
|
||||
1. all --> normally picks a image type as random. Can choose a 'other' more unique type.
|
||||
|
||||
2. all - force multiple --> idea by redditor WestWordHoeDown, it forces to choose between 2 and 3 image types
|
||||
|
||||
1. photograph
|
||||
3. photograph
|
||||
|
||||
2. octane render
|
||||
4. octane render
|
||||
|
||||
3. digital art
|
||||
5. digital art
|
||||
|
||||
4. concept art
|
||||
6. concept art
|
||||
|
||||
5. painting
|
||||
7. painting
|
||||
|
||||
6. portait
|
||||
6. portrait
|
||||
|
||||
7. anime key visual
|
||||
|
||||
8. only other types --> Will pick only from the more unique types, such as stained glass window or a funko pop
|
||||
|
||||
|
||||
|
||||
### Location of existing prompt
|
||||
|
||||
<font size="2">
|
||||
If you put a prompt in the prompt field, it will be added onto the generated prompt. You can determine where to put it in the front or the back of the generated prompt.
|
||||
|
||||
1. at the back
|
||||
|
||||
2. in the front
|
||||
|
||||
</font>
|
||||
"""
|
||||
)
|
||||
return [insanitylevel,subject, artist, imagetype, promptlocation]
|
||||
with gr.Tab("Workflow assist"):
|
||||
with gr.Row():
|
||||
silentmode = gr.Checkbox(
|
||||
label="surpressing mode, turns off prompt generation")
|
||||
with gr.Row():
|
||||
gr.Markdown(
|
||||
"""
|
||||
<font size="2">
|
||||
Workflow assist, suggestions by redditor Woisek.
|
||||
|
||||
With surpressing mode, you turn off the automatic generation of new prompts on 'generate', and can just use normal prompting. So you can work and finetune any fun prompts without turning of the script.
|
||||
|
||||
Below here, you can generate a set of random prompts, and start working from there instead. It works on the settings in the Main tab.
|
||||
</font>
|
||||
""")
|
||||
with gr.Row():
|
||||
genprom = gr.Button("Generate me some prompts!")
|
||||
with gr.Row():
|
||||
prompt1 = gr.Textbox(label="prompt 1")
|
||||
with gr.Row():
|
||||
prompt2 = gr.Textbox(label="prompt 2")
|
||||
with gr.Row():
|
||||
prompt3 = gr.Textbox(label="prompt 3")
|
||||
with gr.Row():
|
||||
prompt4 = gr.Textbox(label="prompt 4")
|
||||
with gr.Row():
|
||||
prompt5 = gr.Textbox(label="prompt 5")
|
||||
with gr.Tab("Advanced"):
|
||||
with gr.Row():
|
||||
promptcompounderlevel = gr.Dropdown(
|
||||
promptcompounder, label="Prompt compunder", value=1)
|
||||
with gr.Row():
|
||||
ANDtoggle = gr.Dropdown(
|
||||
ANDtogglemode, label="Prompt seperator mode", value="comma")
|
||||
with gr.Row():
|
||||
gr.Markdown(
|
||||
"""
|
||||
### Prompt compounder
|
||||
|
||||
<font size="2">
|
||||
Normally, it creates a single random prompt. With prompt compounder, it will generate multiple prompts and compound them together.
|
||||
|
||||
Keep at 1 for normal behavior.
|
||||
Set to different values to compound that many prompts together. My suggestion is to try 2 first.
|
||||
|
||||
This was originally a bug in the first release when using multiple batches, now brought back as a feature.
|
||||
Raised by redditor drone2222, to bring this back as a toggle, since it did create interesting results. So here it is.
|
||||
|
||||
You can toggle the separator mode. Standardly this is a comma, but you can choose an AND and a newline.
|
||||
|
||||
You can also choose for "current prompt + AND". This is best used in conjuction with the Latent Couple extension when you want some control. Set the prompt compounder equal to the amount of areas defined in Laten Couple.
|
||||
|
||||
Example flow:
|
||||
|
||||
Set the Latent Couple extension to 2 area's (standard setting)
|
||||
|
||||
In the main tab, set the subject to humanoids
|
||||
|
||||
In the prompt field then add for example: Art by artistname, 2 people
|
||||
|
||||
Set the prompt compounder to: 2
|
||||
|
||||
"automatic AND" is entirely build around Latent Couple. It will pass artists and the amount of people/animals/objects to generate in the prompt automatically. Set the prompt compounder equal to the amount of areas defined in Laten Couple.
|
||||
|
||||
Example flow:
|
||||
|
||||
Set the Latent Couple extension to 2 area's (standard setting)
|
||||
|
||||
In the main tab, set the subject to humanoids
|
||||
|
||||
Leave the prompt field empty
|
||||
|
||||
Set the prompt compounder to: 2
|
||||
|
||||
|
||||
</font>
|
||||
|
||||
"""
|
||||
)
|
||||
genprom.click(gen_prompt, inputs=[insanitylevel,subject, artist, imagetype], outputs=[prompt1, prompt2, prompt3,prompt4,prompt5])
|
||||
|
||||
|
||||
|
||||
|
||||
return [insanitylevel,subject, artist, imagetype, promptlocation, promptcompounderlevel, ANDtoggle, silentmode]
|
||||
|
||||
def run(self, p, insanitylevel, subject, artist, imagetype, promptlocation):
|
||||
|
||||
|
||||
|
||||
def run(self, p, insanitylevel, subject, artist, imagetype, promptlocation, promptcompounderlevel, ANDtoggle, silentmode):
|
||||
|
||||
images = []
|
||||
infotexts = []
|
||||
|
||||
if p.prompt != "":
|
||||
if(silentmode and p.prompt != ""):
|
||||
print("Silent mode turned on, not generating a prompt. Using current prompt.")
|
||||
elif(silentmode):
|
||||
print("Warning, silent mode is turned on, but no current prompt has been given.")
|
||||
elif p.prompt != "":
|
||||
print("Prompt is not empty, adding current prompt " + promptlocation + " of the generated prompt")
|
||||
|
||||
batches = p.n_iter
|
||||
@@ -120,14 +243,56 @@ class Script(scripts.Script):
|
||||
originalprompt = p.prompt
|
||||
|
||||
|
||||
|
||||
for i in range(batches):
|
||||
|
||||
if(promptlocation == "in the front"):
|
||||
p.prompt = originalprompt + ", " + build_dynamic_prompt(insanitylevel,subject,artist, imagetype)
|
||||
else:
|
||||
p.prompt = build_dynamic_prompt(insanitylevel,subject,artist, imagetype) + ", " + originalprompt # add existing prompt to the back?
|
||||
if(silentmode == False):
|
||||
# prompt compounding
|
||||
print("Starting generating the prompt")
|
||||
preppedprompt = ""
|
||||
if(ANDtoggle == "automatic AND" and originalprompt == ""):
|
||||
if(artist != "none"):
|
||||
originalprompt += build_dynamic_prompt(insanitylevel,subject,artist, imagetype, True)
|
||||
if(subject == "humanoid"):
|
||||
originalprompt += ", " + str(promptcompounderlevel) + " people"
|
||||
if(subject == "landscape"):
|
||||
originalprompt += ", landscape"
|
||||
if(subject == "animal"):
|
||||
originalprompt += ", " + str(promptcompounderlevel) + " animals"
|
||||
if(subject == "object"):
|
||||
originalprompt += ", " + str(promptcompounderlevel) + " objects"
|
||||
|
||||
if(ANDtoggle != "AND" and ANDtoggle != "comma" and originalprompt != ""):
|
||||
preppedprompt += originalprompt + " \n AND "
|
||||
|
||||
for i in range(promptcompounderlevel):
|
||||
if(ANDtoggle == "automatic AND"):
|
||||
preppedprompt += originalprompt + ", " + build_dynamic_prompt(insanitylevel,subject,"none", imagetype)
|
||||
elif(ANDtoggle != "AND" and ANDtoggle != "comma" and originalprompt != ""):
|
||||
preppedprompt += originalprompt + ", " + build_dynamic_prompt(insanitylevel,subject,artist, imagetype)
|
||||
else:
|
||||
preppedprompt += build_dynamic_prompt(insanitylevel,subject,artist, imagetype)
|
||||
if(i + 1 != promptcompounderlevel):
|
||||
if(ANDtoggle == "comma"):
|
||||
preppedprompt += ", "
|
||||
else:
|
||||
preppedprompt += " \n AND "
|
||||
|
||||
|
||||
if(promptlocation == "in the front" and originalprompt != "" and (ANDtoggle == "AND" or ANDtoggle == "comma")):
|
||||
p.prompt = originalprompt + ", " + preppedprompt
|
||||
elif(promptlocation == "at the back" and originalprompt != "" and (ANDtoggle == "AND" or ANDtoggle == "comma")):
|
||||
p.prompt = preppedprompt + ", " + originalprompt # add existing prompt to the back?
|
||||
else:
|
||||
p.prompt = preppedprompt # dont add anything
|
||||
|
||||
|
||||
for j in range(batchsize):
|
||||
|
||||
print(" ")
|
||||
print("Full prompt to be processed:")
|
||||
print(" ")
|
||||
print(p.prompt)
|
||||
processed = process_images(p)
|
||||
images += processed.images
|
||||
infotexts += processed.infotexts
|
||||
@@ -135,7 +300,8 @@ class Script(scripts.Script):
|
||||
# Only move up a seed, when there are multiple batchsizes, and we had the first one done.
|
||||
if(initialbatchsize != 1):
|
||||
p.seed += 1
|
||||
|
||||
|
||||
p.seed +=1
|
||||
# just return all the things
|
||||
p.n_iter = 0
|
||||
p.batch_size = 0
|
||||
|
||||
Reference in New Issue
Block a user