Machine Learning

All you need to know about Stable Diffusion.

Mats LundeDec 3, 2022

Imagine that you could just tell a computer what you want to see, and the computer creates it. That’s Stable Diffusion.

I’ve always loved reading books, but sometimes I wished that the book would have a video adaptation and I could just leave it on in the background. I would daydream about having a program where you could pass in a book and it would spit out an animated version of it. Stable Diffusion is a great leap towards that being a reality. Though there is still a long mountain to climb.

In technical terms Stable Diffusion is a latent diffusion model, which converts a text prompt into a latent space representation of the text, and then converts the latent space into pixel space. In more understandable terms, you write a prompt and the model generates an image with a similar latent space as the text. One example is “a photograph of an astronaut riding a horse”. Another example is the Secure ML logo, which was generated using the prompt “padlock, brain, neurons, brain with padlock, blue, 2d illustration”.

There are many ways you can play around with stable diffusion, and many are trying to learn the art of finetuning their prompts to get the results they want. You can check out MidJourney or Hugging Face here to dip your toes into image generation through stable diffusion.