New Issue: Orbital Catastrophe Ahead? Read Now

See How AI Generates Images from Text

Generative AI algorithms use probability to create visuals from noise

Person surrounded by black boxes. Each black box has a glowing screen with a similar base image projected on it. A few versions of the image are crisp. One includes static.

Matthew Twombly

Join Our Community of Science Lovers!

In 2022 the Internet got its first taste of image-generating artificial intelligence. Suddenly, technology that had once been offered only to specialists was available to anyone with a web connection. The enthusiasm shows no signs of abating, and AI-generated images have won a major photography competition, created the title credits of a television series and tricked people into believing the pope stepped out in a fashionable puffer coat. Yet critics have noted how training the algorithms on existing works could potentially infringe on copyright, and using them could put artists’ jobs in jeopardy. Generative AI also risks supercharging fake news: the pope coat was fun, but a generated photograph supposedly showing an attack on the Pentagon briefly inspired a dip in the stock market.

How did programs such as DALL-E 2, Midjourney and Stable Diffusion get to be so good all at once? Although AI has been in development for decades, the most popular of today’s image generators use a technique called a diffusion model, which is relatively new on the AI scene. Here’s how it works:

A sequential graphic shows how diffusion-model AI image generators work.

Matthew Twombly (graphic), Amanda Hobbs (research)


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


Sophie Bushwick was formerly the technology editor at Scientific American. She makes frequent appearances on radio shows such as Science Friday and television networks, including CBS, MSNBC and National Geographic. She has more than a decade of experience as a science journalist based in New York City and previously worked at outlets such as Popular Science,Discover and Gizmodo. Follow Bushwick on X (formerly Twitter) @sophiebushwick

More by Sophie Bushwick

Matthew Twombly is a freelance illustrator and infographic designer. His work can be viewed at www.matthewtwombly.com

More by Matthew Twombly

Amanda Hobbs is a freelance researcher, writer and visual content editor specializing in storytelling via art and information graphics. Her work can be viewed at www.athcreative.com

More by Amanda Hobbs
Scientific American Magazine Vol 329 Issue 3This article was published with the title “How AI Generates Images from Text” in Scientific American Magazine Vol. 329 No. 3 (), p. 66
doi:10.1038/scientificamerican1023-66

Subscribe to Support Independent Journalism

Great science journalism requires human expertise, time, effort and creativity. And it costs money. That’s why I and the journalists here at Scientific American hope you’ll join our community.

When you subscribe, you are supporting staff and freelance journalists who are passionate about telling science stories that are true, important and compelling. Our editors and reporters are often experts in their fields, which means they understand the nuances of big discoveries and can untangle the breakthroughs from the hype. With a subscription, you are also supporting rigorous fact-checking to ensure the words we publish are precise and accurate. And you’re supporting original illustrations, graphics and photos that bring you closer to an advanced laboratory, an ice sheet in Antarctica or a space mission in orbit. You’re helping us craft other types of high-quality journalism as well: Our newsletters are carefully written, edited and curated by staffers you have or will come to know and love. Our Science Quickly podcast is based on original reporting, collaboration with editors and scientists and exacting production.

Subscriptions keep this engine running so we can continue to deliver thoughtful, rigorous and independent science journalism to you. In an era of viral misinformation, this work is crucial. If you value what we do, I hope you’ll consider joining us as a subscriber

Thank you,

Jeanna Bryner, Editor in Chief, Scientific American

Subscribe