diffusion.gallery - A Constantly Changing Machine Generated Art Gallery
10 Sep 2022 Tagged: aitl;dr: diffusion.gallery is a website I put together which feeds random prompts from OpenAI into Stable Diffusion. It’s pretty neat.
Stable Diffusion
The past few weeks have been an exciting time for ML/AI (at least to an outside observer like myself). There’s been a staggering amount of innovations and experiments around Stable Diffusion, a new model which can synthesize images from text (similar to DALL-E) or even from other source images. You can use it to generate houses, “draw the rest of the owl”, or create some really cursed images just to give a few examples.
Trying It Out
I saw on Twitter that someone had added support for Apple Silicon to the image generation scripts, and since I daily-drive a M1 MacBook Pro that made it easy enough for me to try out. One of the first things I asked it to generate was some concept art for a place called the “Dreaming City” from one of my favorite games, Destiny 2. The results were really impressive, especially considering that I hadn’t done any prompt or parameter tuning:
The Idea
After messing around a bit more and seeing some of the things Stable Diffusion was able to produce, I thought it would be neat to have it constantly generating new art pieces and have them shown in a framed display on my wall, resembling art in a gallery. The first idea I had was for it to randomly pick from a handful of subjects, environments, and styles and ask the model to generate that. However after mentioning it to a friend, he suggested I go “full AI” and have an OpenAI model generate the prompt which Stable Diffusion then generates the image for.
After a few hours of tinkering, the result is diffusion.gallery.
diffusion.gallery
Every 5 minutes a new prompt and image is generated and uploaded to the gallery. The page will automatically refresh so you can leave it up all day if you want - every time you switch to it, odds are there will be a brand new piece.
The bottom right shows a description card for the piece including its “author” (the model that generated the image), its “title” (the timestamp at which it was generated), and the prompt passed to Stable Diffusion which generated the image.
N.B. The images are created at a 16:9 aspect ratio (1024x576) for ideal viewing on normal widescreen monitors.
For those wondering: the odd resolution is due to the fact that the dimensions must be divisible by 64, and this is the only 16:9 resolution (below 1080p) for which this is true.
Disclaimer
To try and avoid generating anything NSFW, the prompt to OpenAI explicitly requests that the resulting prompt (from which the image is generated) does not focus on any specific people. Combined with the safety classifier built in to Stable Diffusion, I don’t think anything generated will be offensive, but obviously it’s still possible that something bad comes out. Use the site at your own risk.
Some Pieces
After letting it run for just a few hours, I saw some really interesting images go by ranging from:
Hyper-realistic pictures
Prompt: A mostly barren landscape with a few jagged peaks in the distance. The sky is a harsh, unforgiving blue, and the air is cold and dry.
To dystopic drawings
Prompt: This painting is of an abandoned building in the middle of a dark desert. The subject is an old, crumbling building surrounded by nothing but empty, scorched earth. The painting is dark and moody, with a erie, atmospheric feel to it.
To impressionist paintings
Prompt: This painting depicts a bustling city street full of people and their belongings. The scene is brightly lit and colorful, and the buildings in the background are sharply silhouetted against the sky. The painting is undoubtedly impressionistic, with a loose, free style that allows the various elements to share the spotlight.
To the abstract
Prompt: This painting is of an abstract landscape with bright blues, greens, and oranges. It has a feeling of dynamism and energy, as if it is constantly moving. The style is impressionistic, with soft brush strokes and strong highlights.
And finally, the best example of AI: a prompt confidently describing a non-existant painting with a full background story and artist
Prompt: Salmon Run is an iconic painting by American painter Robert Henri. It depicts a panoramic view of the Columbia River, with salmon leaping upriver to spawn. The painting was commissioned by the Oregon Railroad and Navigation Company in 1914 as a celebration of the railroad’s 50th anniversary.
Framing It
To close out the project, I picked up a thin 15.6” OLED display and a cheap 11x17 frame. Some taping and wire management later, the gallery was now up on the wall.