diff --git a/scripts/webui.py b/scripts/webui.py index cbcf714bc..5d6e29ded 100644 --- a/scripts/webui.py +++ b/scripts/webui.py @@ -773,7 +773,14 @@ def classToArrays( items, seed, n_iter ): return all_seeds, n_iter, prompt_matrix_parts, all_prompts, needrows - +def replace_wildcard(chunk): + if " " not in chunk: + file_dir = os.path.dirname(os.path.realpath("__file__")) + replacement_file = os.path.join(file_dir, f"scripts/wildcards/{chunk}.txt") + if os.path.exists(replacement_file): + with open(replacement_file, encoding="utf8") as f: + return random.choice(f.read().splitlines()) + return chunk def process_images( outpath, func_init, func_sample, prompt, seed, sampler_name, skip_grid, skip_save, batch_size, @@ -841,6 +848,8 @@ def process_images( all_prompts = batch_size * n_iter * [prompt] all_seeds = [seed + x for x in range(len(all_prompts))] + + all_prompts = ["".join(replace_wildcard(chunk) for chunk in one_prompt.split("__")) for one_prompt in all_prompts] original_seeds = all_seeds.copy() precision_scope = autocast if opt.precision == "autocast" else nullcontext diff --git a/scripts/wildcards/adjective.txt b/scripts/wildcards/adjective.txt new file mode 100644 index 000000000..3a5460a58 --- /dev/null +++ b/scripts/wildcards/adjective.txt @@ -0,0 +1,181 @@ +abandoned +abhorrent +abrasive +adorable +ancient +angular +apocalyptic +aspiring +astonishing +atmospheric +average +beautiful +biomechanical +blue +boorish +boring +capricious +clockwork +cloudy +cluttered +cold +colorful +colossal +complex +conscious +cool +cozy +cromulent +cute +cyberpunk +dazzling +deafening +delicate +delicious +delightful +deteriorating +dieselpunk +dilapidated +dire +disgusting +draconian +dramatic +dreamlike +dusty +dystopian +efficacious +elastic +elegant +elite +elusive +epic +evil +expressive +extraordinary +fallacious +fascinating +feigned +festive +fiery +flowery +foggy +frantic +fruit-flavored +functional +funny +futuristic +gentle +ghastly +ghostly +giant +gigantic +glamorous +glib +glowing +good +groovy +grouchy +gruesome +grumpy +harsh +hesitant +holistic +honorable +hyperdetailed +icy +ignorant +illuminated +impressive +incredibly detailed +interesting +jealous +kindhearted +level +lush +lyrical +macho +maniacal +masterpiece +matte +meek +metallic +metallic +mind-bending +minimalist +modular +moody +nasty +natural +neat +nonchalant +noxious +nutty +old +oppressive +otherworldly +overwrought +painterly +parched +pastel +petrified +pretty +primordial +psychadelic +psychotic +puny +rainbow +repressive +resonant +retrofuturistic +rich +rickety +ridiculous +rounded +ruined +rusty +secret +serene +serious +shadowy +shaky +sharp +shiny +simple +skillful +slimy +smart +sophisticated +spiritual +sprawling +squealing +steampunk +stimulating +stone +striped +sturdy +superficial +supersized +surreal +sweltering +swirling +tangible +terrifying +thundering +tiny +tough +tremendous +twisted +unadvised +unappetizing +underwater +unnatural +untidy +unusual +uptight +vengeful +vibrant +warlike +weird +wispy +witty +zany diff --git a/scripts/wildcards/artist.txt b/scripts/wildcards/artist.txt new file mode 100644 index 000000000..ce779630e --- /dev/null +++ b/scripts/wildcards/artist.txt @@ -0,0 +1,413 @@ +Aaron Douglas +Agnes Lawrence Pelton +Akihiko Yoshida +Albert Bierstadt +Albert Bierstadt +Alberto Giacometti +Alberto Vargas +Albrecht Dürer +Aleksi Briclot +Alex Grey +Alex Horley-Orlandelli +Alex Katz +Alex Ross +Alex Toth +Alexander Jansson +Alfons Maria Mucha +Alfred Kubin +Alphonse Mucha +Anato Finnstark +Anders Zorn +André Masson +Andreas Rocha +Andrew Wyeth +Anish Kapoor +Anna Dittmann +Anna Mary Robertson Moses +Anni Albers +Ansel Adams +Anthony van Dyck +Anton Otto Fischer +Antonio Mancini +April Gornik +Arnold Böcklin +Art Spiegelman +Artemisia Gentileschi +Arthur Garfield Dove +Arthur Rackham +Asher Brown Durand +Aubrey Beardsley +Austin Briggs +Ayami Kojima +Bastien Lecouffe-Deharme +Bayard Wu +Beatrix Potter +Beeple +Beksinski +Bill Sienkiewicz +Bill Ward +Bill Watterson +Bob Eggleton +Boris Vallejo +Brian Bolland +Brian Froud +Bruce Pennington +Bunny Yeager +Camille Corot +Camille Pissarro +Canaletto +Caravaggio +Caspar David Friedrich +Cedric Peyravernay +Charles Addams +Charles Dana Gibson +Chesley Bonestell +Chris Foss +Chris Moore +Chris Rallis +Chriss Foss +Cindy Sherman +Clara Peeters +Claude Monet +Clyde Caldwell +Coles Phillips +Cornelis Bisschop +Coby Whitmore +Craig Mullins +Cynthia Sheppard +Dale Chihuly +Damien Hirst +Dan Mumford +Daniel Merriam +Darek Zabrocki +Dave Dorman +Dave Gibbons +Dave McKean +David Firth +Dean Cornwell +Dean Ellis +Diane Dillon +Disney +Don Maitz +Donato Giancola +Dorothea Tanning +Dreamworks +Dr. Seuss +Earl Norem +Earle Bergey +Earnst Haeckel +Ed Emshwiller +Edgar Degas +Edmund Dulac +Edmund Leighton +Édouard Manet +Edvard Munch +Edward Burne-Jones +Edward Gorey +Edward Hopper +Edward Lear +Edwin Austin Abbey +Edwin Deakin +Egon Schiele +El Greco +Elizabeth Shippen Green +Emmanuel Shiu +Emory Douglas +Esao Andrews +Eugène Delacroix +Evelyn De Morgan +E.H. Shepard +F. Scott Hess +Fairfield Porter +Federico Pelat +Filippino Lippi +Fitz Henry Lane +Francis Bacon +Francisco Goya +Frank Frazetta +Frank Xavier Leyendecker +Franklin Booth +Franz Sedlacek +Frederick Edwin Church +Frederick McCubbin +Gaston Bussière +Gediminas Pranckevicius +Geof Darrow +George B. Bridgman +George Cruikshank +George Inness +George Luks +Georgia O'Keeffe +Gerald Brom +Giacomo Balla +Gil Elvgren +Gillis Rombouts +Giorgio de Chirico +Giorgione +Giovanni Battista Piranesi +Greg Hildebrandt +Greg Rutkowski +Greg Staples +Gregory Manchess +Guido Borelli da Caluso +Gustaf Tenggren +Gustav Klimt +Gustave Doré +Gustave Moreau +Gwen John +Hannah Höch +Hans Baldung +Hans Bellmer +Harrison Fisher +Harvey Dunn +Harvey Kurtzman +Henri de Toulouse-Lautrec +Henri Matisse +Henri Rousseau +Henry Ossawa Tanner +Henry Raleigh +Hethe Srodawa +Hieronymus Bosch +Hiromu Arakawa +Hokusai +Howard Chandler Christy +Howard Pyle +Hubert Robert +Hugh Ferriss +Hyun Lee +H.R. Giger +Igor Kieryluk +Igor Morski +Igor Wolkski +Ilya Kuvshinov +Ilya Repin +Inyi Han +Isaac Levitan +Ivan Aivazovsky +Ivan Albright +Ivan Bilibin +Ivan Shishkin +Jacek Yerka +Jack Kirby +Jackson Pollock +Jakub Rozalski +James C. Christensen +James Gillray +James Gurney +James Jean +James Paick +Jamie Hewlett +Jan van Eyck +Janet Fish +Jasper Johns +J.C. Leyendecker +Jean Delville +Jean Giraud +Jean Metzinger +Jean-Honoré Fragonard +Jean-Michel Basquiat +Jeff Easley +Jeff Koons +Jeffrey Smith +Jerome Lacoste +Jerry Pinkney +Jesper Ejsing +Jessie Willcox Smith +Jim Burns +Jim Steranko +Joaquín Sorolla +Joe Jusko +Johannes Vermeer +Johfra Bosschart +John Atkinson Grimshaw +John Bauer +John Berkey +John Constable +John Frederick Kensett +John French Sloan +John Harris +John Howe +John James Audubon +John Martin +John Philip Falter +John Romita Jr +Jon Foster +Jon Whitcomb +Joseph Cornell +Juan Gris +Junji Ito +J.M.W. Turner +Kadir Nelson +Kandinsky +Karol Bak +Kate Greenaway +Kawanabe Kyōsai +Kay Nielsen +Keith Haring +Kelly Freas +Kelly Mckernan +Kim Jung Gi +Kinuko Craft +Konstantin Vasilyev +Konstantinas Ciurlionis +Lale Westvind +Larry Elmore +Laura Muntz Lyall +Laurel Burch +Laurie Lipton +Lawren Harris +Lee Madgwick +Leo and Diane Dillon +Leonora Carrington +Liam Wong +Lise Deharme +Louis Glackens +Louis Janmot +Louise Bourgeois +Lucian Freud +Luis Royo +Lynda Benglis +Lyubov Popova +Maciej Kuciara +Makoto Shinkai +Malevich +Marc Simonetti +Margaret Macdonald Mackintosh +Maria Sibylla Merian +Marianne North +Mario Sanchez Nevado +Mark Ryden +Martin Johnson Heade +Mary Cassatt +Mati Klarwein +Maxfield Parrish +Mead Schaeffer +Michael Hussar +Michael Parkes +Michael Whelan +Mikalojus Konstantinas Čiurlionis +Mike Mignola +Milton Caniff +Milton Glaser +Moebius +Mondrian +M.C. Escher +Noah Bradley +Noriyoshi Ohrai +Norman Rockwell +N.C. Wyeth +Odd Nerdrum +Odilon Redon +Ohara Koson +Paul Cézanne +Paul Delvaux +Paul Gauguin +Paul Klee +Paul Lehr +Peter Elson +Peter Gric +Peter Helck +Peter Max +Peter Mohrbacher +Peter Paul Rubens +Pierre Bonnard +Pierre-Auguste Renoir +Pieter Bruegel the Elder +Pieter Claesz +Pixar +P.A. Works +Rafal Olbinski +Ralph Horsley +Ralph McQuarrie +Randolph Caldecott +Raphael Lacoste +Ray Caesar +Raymond Swanland +Rebecca Guay +Rembrandt +Rembrandt van Rijn +Rene Magritte +RHADS +Richard Dadd +Richter +Rob Gonsalves +Robert Delaunay +Robert McCall +Robert McGinnis +Robert Rauschenberg +Roberto da Matta +Rockwell Kent +Rodney Matthews +Roger Ballen +Roger Dean +Ron Walotsky +Ross Tran +Roz Chast +Salvador Dalí +Sam Spratt +Sandro Botticelli +Saul Steinberg +Saul Tepper +Seb McKinnon +Simon Bisley +Simon Stalenhag +Sir John Tenniel +Slawomir Maniak +Sonia Delaunay +sparth +Stephan Martiniere +Stevan Dohanos +Steve Dillon +Steven DaLuz +Studio Ghibli +Syd Mead +Takashi Murakami +Takato Yamamoto +Takeshi Obata +Tamara Lempicka +Taro Okamoto +Ted DeGrazia +Ted Nasmith +Terry Oakes +Terry Redlin +Thomas Cole +Thomas Kinkade +Thomas Nast +Thornton Oakley +Brothers Hildebrandt +Tim White +Titian +Tom Lovell +Tom Thomson +Tomek Setowski +Tomer Hanuka +Tomi Ungerer +Tomokazu Matsuyama +Tony Sart +Tsutomu Nihei +Tyler Edlin +Utagawa Kuniyoshi +Victo Ngai +Vincent Di Fate +Vladimir Kush +Wally Wood +Walter Beach Humphrey +Walter Crane +Warwick Goble +Wassily Kandinsky +Wayne Barlowe +Wendy Froud +Wifredo Lam +Will Eisner +William Hogarth +William Michael Harnett +William Steig +William Stout +William-Adolphe Bouguereau +Winslow Homer +Winsor McCay +Yayoi Kusama +Yoshitaka Amano +Yue Minjun +Yves Tanguy +Zdzisław Beksiński diff --git a/scripts/wildcards/genre.txt b/scripts/wildcards/genre.txt new file mode 100644 index 000000000..2a108d3ee --- /dev/null +++ b/scripts/wildcards/genre.txt @@ -0,0 +1,20 @@ +ancient +anime +art deco +cyberpunk +dark fantasy +dieselpunk +fantasy +film noir +gothic +high fantasy +historic +medieval +mid-century +renaissance +sci-fi +steampunk +synthwave +victorian +vintage +weird west diff --git a/scripts/wildcards/site.txt b/scripts/wildcards/site.txt new file mode 100644 index 000000000..d71ec028b --- /dev/null +++ b/scripts/wildcards/site.txt @@ -0,0 +1,11 @@ +500px +ArtStation +Behance +cgsociety +ConceptArtWorld +DeviantArt +Flickr +Getty Images +Pixiv +unsplash +zbrushcentral diff --git a/scripts/wildcards/style.txt b/scripts/wildcards/style.txt new file mode 100644 index 000000000..89443db5d --- /dev/null +++ b/scripts/wildcards/style.txt @@ -0,0 +1,59 @@ +2d game art +3D VR painting +8k resolution +1950s pulp sci-fi cover +anime +artistic photograph +Baroque painting +Byzantine mosaic +Chiaroscuro painting +depth of field +digital painting +dutch golden age +filmed in IMAX +fine art +flat shading +Flemish Baroque +Fresco painting +Gouache Painting +graffiti +Grisaille painting +highly detailed +hyperrealism +Impasto painting +low-poly +Luminism painting +Marvel Comics +matte painting +mixed media +oil painting +Panorama +parallax +pastel painting +pencil sketch +Perspective painting +Playstation 5 screenshot +pop art +raytracing +rendered in cinema4d +rendered in maya +rendered in zbrush +schematic +sculpture +Sfumato painting +shot on 70mm +Sotto In Su +storybook illustration +surrealist +surveillance footage +Tempera Painting +tilt shift +Trompe L’oeil +Ukiyo-e +unreal engine render +vector image +Veduta painting +visionary hypermaximalism +volumetric lighting +vray tracing +watercolor painting