You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

How AI image generators make a picture from your words

An AI picture starts as a square of random dots

You type a few words into an AI image generator. A few seconds later, a picture is on your screen. No camera took it, and no artist drew it. Nobody cut it out of a photo. Where was that picture one minute before?

  1. 1 You type "a fox reading a newspaper in the snow" into an image generator, an app that makes pictures from words, and press Generate.youLet's see!a fox readinga newspaperin the snowGenerateimage generator

    You type "a fox reading a newspaper in the snow" into an image generator, an app that makes pictures from words, and press Generate.

  2. 2 A few seconds later, there it is. No camera took this picture, and no artist drew it.youWho madethis?

    A few seconds later, there it is. No camera took this picture, and no artist drew it.

  3. 3 The app makes nothing itself. It passes your sentence, called the prompt, to the program that makes the picture: a model. The one shown here is Stable Diffusion 1.5.a fox readinga newspaperin the snowthe promptthe modelA picture?On it!Stable Diffusion 1.5

    The app makes nothing itself. It passes your sentence, called the prompt, to the program that makes the picture: a model. The one shown here is Stable Diffusion 1.5.

  4. 4 The model does not look your fox up on the web, and it does not cut up photos to glue them together. It starts from a square of random dots, called noise.found on the webglued from photosNo photos. I startfrom these dots.noise

    The model does not look your fox up on the web, and it does not cut up photos to glue them together. It starts from a square of random dots, called noise.

  5. 5 Then it guesses which dots are noise and takes a little of them away. It looks again, and takes a little more. Pass after pass, the dots that stay gather into shapes, and the shapes into your fox.Noise here.A bit out!pass after pass

    Then it guesses which dots are noise and takes a little of them away. It looks again, and takes a little more. Pass after pass, the dots that stay gather into shapes, and the shapes into your fox.

  6. 6 Yet that first square hid no fox at all: lift a corner, and there is nothing under the dots. So how did the model know which ones to take away?nothing under ityou?

    Yet that first square hid no fox at all: lift a corner, and there is nothing under the dots. So how did the model know which ones to take away?

  7. Go further

    What your app does, in the words of the field, and why this model is the one shown.text-to-imageThe name for what your appdoes: words in, a pictureoutan open modelIts makers publishedits files and papers, soanyone can check howStable Diffusion 1.5 works.That is why it is shown here

    What your app does, in the words of the field, and why this model is the one shown.

Next episode Diffusion models: how an AI image generator learned from pictures buried in noise

Share this comic

More comics