Generative AI Art: How Diffusion Models Actually Work

Photo: Google DeepMind / Pexels
There is a peculiar irony at the heart of AI image generation: to teach a machine to create, we first had to teach it to destroy. Diffusion models — the technology behind tools like Stable Diffusion, DALL-E 3, and Midjourney — learn to generate images by first learning how to systematically ruin them, then reversing that process. The result is a kind of artificial imagination that has shaken the creative world to its foundations.
Key takeaways
- Diffusion models work by learning to reverse a noise-addition process, effectively "dreaming" images into existence from static
- Training requires millions of image-text pairs; the model learns associations between visual patterns and language
- Unlike GANs (older generative models), diffusion models are more stable to train and produce higher-quality outputs
- The "latent space" concept is key: compressed representations allow efficient image synthesis at scale
From Noise to Masterpiece: The Core Mechanism
To understand diffusion models, picture a photograph being gradually buried under snow — at first you can still make out shapes, then outlines, then nothing but white. This is called the forward diffusion process: mathematically adding Gaussian noise to an image across hundreds of steps until it becomes pure static. The model trains on this destruction, learning to identify what noise was added at each step.
The magic happens in reverse. Given pure noise, a trained diffusion model can work backwards — step by step, removing noise — until a coherent image emerges. It is not retrieving a stored image. It is constructing a plausible image from scratch, guided by the statistical patterns it absorbed during training.
The model's neural network (typically a U-Net architecture or, in newer systems, a transformer) predicts what noise should be removed at each denoising step. After 20–1,000 steps depending on the configuration, you have an image that never existed before.
This process differs fundamentally from earlier generative methods. Generative Adversarial Networks (GANs), which dominated AI image generation until around 2021, pitted two networks against each other — a generator and a discriminator — in an adversarial game. While powerful, GANs suffered from "mode collapse" (producing repetitive outputs) and training instability. Diffusion models are slower at inference but more stable, more diverse, and capable of higher resolution outputs.
Text-Conditioning: How Words Become Pictures
A diffusion model that generates random images is a curiosity. A model that generates images matching a text prompt is a revolution. The key ingredient is text conditioning, typically implemented via CLIP (Contrastive Language–Image Pre-training), developed by OpenAI.
CLIP trains on hundreds of millions of image-caption pairs scraped from the internet, learning a shared embedding space where the phrase "a red apple on a wooden table" sits mathematically close to actual images of red apples on wooden tables. During diffusion model training, this text embedding is injected into the denoising network via a mechanism called cross-attention, steering the noise-removal process toward images that match the text.
This is why prompt engineering has become its own art form. Phrases like "cinematic lighting," "trending on ArtStation," or "by Rembrandt" don't just describe subject matter — they invoke statistical clusters in the model's learned representations, nudging it toward specific aesthetic territories. The model has absorbed millions of human aesthetic judgments and can be navigated through them with language.
Latent Diffusion: Making It Practical
Early diffusion models operated directly on pixels, which was computationally expensive. Running 1,000 denoising steps on a 512×512 image requires enormous processing power. The breakthrough that made consumer-grade AI art possible was latent diffusion, introduced by researchers at Ludwig Maximilian University of Munich in 2022 — and subsequently deployed as Stable Diffusion.
Latent diffusion models first compress an image into a much smaller "latent space" using a Variational Autoencoder (VAE). The diffusion process then operates on this compressed representation, which is typically 8 times smaller in each dimension. Only at the final step is the latent representation decoded back into a full-resolution image. This compression made it possible to run image generation on consumer GPUs in seconds rather than minutes.
Stability AI released the weights of Stable Diffusion publicly in August 2022, a decision that democratized AI image generation overnight. Within weeks, the open-source community had produced ControlNet (adding precise structural control), LoRA fine-tuning (cheaply teaching the model new concepts), and hundreds of specialized model variants. The open-source ecosystem around latent diffusion has arguably moved faster than any proprietary system.
The Artists in the Training Data
No discussion of diffusion models is complete without confronting how they were built. Models like Stable Diffusion 1.x were trained on LAION-5B, a dataset of 5.85 billion image-text pairs scraped from the web without the consent of the artists, photographers, and illustrators whose work appeared there. Artists including Sarah Andersen, Kelly McKernan, and Karla Ortiz filed a class-action lawsuit against Stability AI, DeviantArt, and Midjourney in 2023, arguing that their styles were effectively extracted and commercialized without compensation.
The technical counterargument is that diffusion models do not store images — they compress statistical patterns. No original image can be directly extracted from the weights. But this misses the point for many artists. Style, which cannot be copyrighted under current law, is precisely what diffusion models are best at capturing. When someone prompts "paint in the style of [living artist]" and gets a convincing result, the moral question is not resolved by the legal one.
Some companies have responded differently. Adobe Firefly was trained exclusively on licensed Adobe Stock images and public domain works, allowing it to offer commercial usage rights with generated images. Getty Images built its own model using its licensed catalog. These approaches demonstrate that commercially safe training is possible — it is simply more expensive.
Real-World Deployment: From Studios to Studios
The entertainment industry has been an early and contested adopter. Industrial Light & Magic (ILM) has explored diffusion models for concept art generation, using them to rapidly explore visual directions before committing to physical or CGI production. The studio reportedly used AI tools during production of several Disney+ series, generating hundreds of concept variants in the time it would take a human artist to produce a handful.
Artist Refik Anadol has pushed diffusion and other generative models into the gallery space. His installation "Unsupervised" at MoMA in New York (2022–2023) used a model trained on MoMA's entire collection, generating a continuous flowing dreamscape on a massive screen that responded to gallery activity. Anadol positions the work not as a replacement for human art but as a new form — machine hallucination as artistic medium.
On the commercial end, platforms like Midjourney have built subscription businesses on top of diffusion technology. Midjourney v6 and later versions demonstrate how iterative refinement of the training pipeline, combined with user feedback loops, produces models with increasingly coherent spatial reasoning, text rendering, and aesthetic polish. As of 2025, Midjourney reports over 20 million registered users.
Advanced Techniques: Control, Fine-Tuning, and Aesthetic Steering
While early diffusion models were black boxes that took a prompt and produced an image with limited control, the field has evolved toward much finer-grained control.
ControlNet, developed by Lvmin Zhang at Stanford, introduced a way to guide diffusion models with structural inputs — a sketch, edge map, pose skeleton, or depth map. Rather than just describing what you want in words, you can show the model the spatial structure you want, and it will fill in realistic details consistent with that structure. This hybrid approach (visual + textual guidance) has proven so effective that it's now standard in professional tools.
Fine-tuning approaches like DreamBooth allow users to teach a model a new concept from just 3–5 images. The model quickly learns to bind a unique identifier (like "[V] person") to the visual features in those images, then allows precise reuse of that concept in new contexts. Similarly, LoRA (Low-Rank Adaptation) trains tiny adapter modules that steer the base model's behavior with far fewer parameters than full fine-tuning. A LoRA file for a specific artistic style is often just 20–100 MB, copyable and shareable.
Aesthetic scoring models (like LAION's CLIP-based aesthetics classifier) allow filtering generated images by predicted aesthetic quality. Combining this with adversarial feedback loops — running a model, scoring outputs, and retraining on high-scoring examples — has driven incremental improvements in model quality. Midjourney's evolution from v1 to v6 relied largely on this kind of iterative refinement, each version trained on hundreds of millions of user-generated prompts and ratings.
This democratization is profound: someone with a laptop and $20-30 in GPU credits can now achieve results that would have required either hiring expensive artists or buying expensive software licenses a few years ago.
Source: Zhang, L., et al. (2023). "Adding conditional control to text-to-image diffusion models." arXiv preprint arXiv:2302.05543.
The Bias Problem: What Diffusion Models Learn and Don't Learn
Diffusion models trained on internet data inherit its biases. LAION-5B, the dataset behind Stable Diffusion v1.x, reflects decades of human aesthetic, cultural, and gender bias embedded in billions of images scraped from the web. A model trained on this data will have absorbed associations like:
- Women are more likely to be depicted in certain professions or poses than in others
- Certain skin tones may be underrepresented or stereotyped
- Certain objects or scenes may be absent or misrepresented (e.g., disability rarely appears in stock photography)
When researchers tested early Stable Diffusion against prompts like "a doctor," outputs were significantly more likely to show men; "a nurse" produced women. These gender associations were learned from training data, not programmed in. Models trained on more curated datasets (like Adobe Firefly, trained only on Adobe Stock and public domain images) show different but not eliminated biases.
More troubling is the "mode collapse" on aesthetics. Models trained on internet images are exposed to millions of art-school-influenced rendered images, concept art, and high-production-value photos. As a result, everything they generate tends toward a particular aesthetic — hyper-polished, slightly plasticky, often influenced by trending styles on ArtStation. The world they learn to dream in is a very particular one.
Some researchers are working on debiasing diffusion models by reweighting training data, using bias-corrected CLIP encoders, or training separate models on specific demographic groups and then combining them strategically. But this is emerging work. For now, the practical response is awareness: understanding that AI-generated images reflect the biases in their training data, and that these biases are not neutral or objective.
Source: Buolamwini, B., & Gebru, T. (2018). "Gender shades: Intersectional accuracy disparities in commercial gender classification." Conference on Fairness, Accountability and Transparency. PMLR, 2018.
The Speed vs. Quality Tradeoff and Inference Optimization
Diffusion models are slow compared to discriminative models (those trained to classify images). An autoregressive image generator like DALL-E 2 can produce an image in 10–50 forward passes; a diffusion model requires 20–1,000 denoising steps. Even with latent-space optimization, a single high-quality image generation can take 10–30 seconds on consumer hardware.
This has led to a flurry of research on accelerating inference. Techniques include:
- Distillation: training a smaller, faster model to mimic a larger one's output in fewer steps (e.g., going from 100 to 20 denoising steps)
- Probability flow ODE: reformulating the diffusion process as a continuous differential equation, allowing adaptive step sizes that skip low-information steps
- Quantization: representing model weights in lower precision (8-bit instead of 32-bit) with minimal accuracy loss
A "fast" diffusion model today can generate a 512×512 image in 1–2 seconds on a GPU, making real-time interactive art generation possible. This speed has enabled live performance art using diffusion models, streaming video generation (though still lower quality than static images), and interactive web applications where users see results instantly.
The tradeoff is quality: faster models make more "choices" in fewer steps, leading to slightly lower coherence and detail. The high-end remains at 30–50 second generation times for maximum quality.
Source: Karras, T., Aittala, M., et al. (2022). "Elucidating the design space of diffusion-based generative models." arXiv preprint arXiv:2206.00364.
Cultural and Philosophical Implications: Creativity, Authorship, and Taste
The emergence of diffusion models has triggered a broader reckoning with what we mean by creativity and artistic authorship. If an artist writes a prompt and a model generates an image, who is the artist — the prompter, the model trainer, the dataset contributors, or the person who designed the diffusion algorithm?
The copyright status remains genuinely murky. The U.S. Copyright Office has said that works generated by AI without human artistic direction likely lack copyright protection. But what constitutes sufficient "human artistic direction"? Is writing a detailed prompt enough? Is curating and iterating on outputs enough? Different jurisdictions are reaching different conclusions, with some countries (UK, Canada) being more permissive and others (EU) more restrictive.
Philosophically, the question is whether diffusion models represent a new form of human creativity or a sophisticated remixing of existing work. Some artists argue that any model trained on copyrighted work without permission is, by definition, plagiarism at scale. Others point out that human artists are also trained by looking at and learning from existing work, and that diffusion models' statistical approach is fundamentally different from copying. This distinction doesn't resolve the ethical question — it just reframes it.
What's undeniable is that diffusion models have democratized image generation in ways that are culturally significant. A concept artist can now explore 100 visual directions in an hour instead of a week. A person with no artistic training can create high-quality images. This is liberating and also unsettling to people whose livelihoods depended on those skills being rare.
Source: Shmueli, B. (2023). "The copyright of AI-generated works." Texas Tech Law Review, 54, 1.
Inpainting and Image-to-Image: Extending Diffusion Beyond Pure Generation
While text-to-image diffusion generation attracts the most attention, some of the most practical applications involve manipulating existing images. Inpainting — the ability to intelligently fill regions of an image based on context — and image-to-image generation — the ability to transform an existing image according to new instructions — extend the diffusion paradigm in ways that have proven invaluable in real creative workflows.
Inpainting works by masking out a region of an image and asking the diffusion model to coherently regenerate that masked area in a way consistent with the surrounding context. Unlike naive approaches like Photoshop's content-aware fill (which interpolates locally), diffusion-based inpainting has learned statistical patterns about what objects, textures, and compositions make sense globally. If you mask out a person's hand from a photograph, a diffusion inpainting model understands hands — anatomy, pose, lighting — at a far deeper level. The result is often seamless and contextually plausible, though occasionally still shows telltale signs of AI generation in fine details.
This capability emerged from technical work in 2022-2023. Researchers realized that the diffusion process doesn't need to start from pure noise — it can start from a partially noised version of a real image. By strategically adding noise only to the masked region and keeping the unmasked region fixed, the model can refine and modify one part of an image while preserving photorealistic continuity in the rest. This opened a pathway to applications like: removing unwanted objects from photographs, extending partial images to full compositions, and most crucially for professional workflows, enabling rapid iterative design where artists can edit-in-place rather than regenerating from scratch.
Image-to-image generation takes this further. Rather than starting from pure noise or a masked region, the diffusion process begins with a noised version of an entire reference image. By controlling the noise amount (the "strength" parameter), you can achieve varying degrees of transformation: low strength preserves the original composition and style while applying new details; high strength produces a radically reinterpreted version that maintains only the loose structural hints from the original. This is the mechanism behind tools like Midjourney's "remix" feature and Stable Diffusion's img2img capability.
The practical value here is enormous. A fashion designer can sketch a rough outline, feed it to an image-to-image model, and receive dozens of refined, production-ready illustrations in seconds. A photographer can use image-to-image to apply a consistent style across dozens of photos, or to transform raw images toward a particular mood or aesthetic. Architects can convert sketches into photorealistic renderings for client presentations. The friction between conceptual intent and polished output has collapsed dramatically.
Image-to-image also enables what researchers call iterative refinement loops. A user generates an image, refines it (by re-prompting with adjustments to the previous output), and refines again — each step steering the model closer to their vision while maintaining coherence with prior iterations. Tools like Midjourney's "remix" button and Photoshop's new Generative Fill feature (powered by Adobe Firefly) now make this workflow as intuitive as traditional editing.
The technical substrate underlying both inpainting and image-to-image is robust: it requires the model to handle variable start conditions (sometimes noise, sometimes real images at varying degradation levels) and to maintain coherence across partial updates. Most modern diffusion architectures handle this seamlessly via a simple modification: concatenating the original image (or masked region indicator) with the noised input before passing it through the denoising network. This tells the model "here's what I'm keeping, here's what you're fixing" — a simple but powerful conditioning signal.
By 2025, inpainting and image-to-image have become the dominant use cases in professional creative tools, sometimes even overshadowing pure text-to-image generation in terms of adoption. This reflects a deeper truth: most creative work is iterative, not generative from scratch. The ability to work with existing images — to refine, extend, and transform — matters more in practice than the ability to conjure something from nothing.
Source: Lugmayr, A., et al. (2022). "Repaint: Inpainting using pre-trained diffusion models." arXiv preprint arXiv:2201.09865.
The Takeaway
Diffusion models represent a new paradigm in visual generation: learning to create by first learning to destroy, then reversing that process billions of times until statistical patterns crystallize into images. The technology is democratizing in ways that genuinely matter — a person with a laptop and a good prompt can now produce publication-quality concept art, illustrations, and visual exploration. Yet this democratization comes with real costs: the training data reflects centuries of human bias, the copyright questions remain unresolved, and the cultural impact on professional artists is immediate and disruptive. The "diffusion" in diffusion models is also metaphorical — the technology itself is diffusing through creative industries, reshaping what it means to be an artist. The question ahead is not whether AI will generate images (it clearly will) but how society will navigate the ethical, legal, and economic implications of that power being, for the first time, genuinely accessible to anyone with an internet connection.
Frequently Asked Questions
Q: What makes diffusion models different from other AI image generators?
A: Unlike GANs, which train two networks adversarially, diffusion models learn a sequential denoising process. This makes them more stable, more diverse, and capable of producing higher-quality images at scale. They are the dominant architecture in modern AI image generation because they can handle complex, high-resolution data without mode collapse.
Q: Do diffusion models memorize training images?
A: Generally no — they learn statistical patterns, not individual images. However, very frequently appearing training images can sometimes be approximately reconstructed, particularly in models trained on smaller datasets. This is an active area of research, with new techniques being developed to audit and reduce memorization.
Q: Why do diffusion models sometimes produce strange hands or text?
A: Hands have complex topology (many articulated parts, variable pose) and are hard for models to represent statistically. Text fails because the model operates on visual pixels, not linguistic understanding — it has learned that letters look a certain way statistically, but not how they encode meaning. Newer models with improved architecture and training data increasingly overcome these limitations.
Q: Can I train my own diffusion model?
A: Full training of a large diffusion model requires hundreds of GPU-hours and millions of training samples. However, fine-tuning techniques like LoRA, DreamBooth, and Textual Inversion allow individuals to teach existing models new concepts or styles using just a few images on consumer hardware in an hour or two.
Q: Are diffusion models going to replace human artists?
A: This is the most contested question in the field. Diffusion models excel at rapid iteration, visual exploration, and stylistic remixing — tasks where speed and variety matter. They are weaker at genuine conceptual originality, intentionality, and the kind of meaning-making that comes from lived human experience. The most likely outcome is a restructuring of creative labor rather than complete elimination.
Q: What is the copyright status of AI-generated images?
A: This remains legally unsettled and varies by jurisdiction. The U.S. Copyright Office has indicated that works generated by AI without sufficient human creative direction lack copyright protection. The EU is developing stricter rules. The fundamental question of whether training on copyrighted work without permission constitutes infringement is still being debated in courts worldwide.
Read next
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

The Science of Beauty: What Makes Art Beautiful?
Neuroscientists and psychologists have begun to decode why some artworks move us, and the answers mix shared biology with expectation, expertise, and personal history.

Street Art and Banksy: A History of Graffiti, Explained
From Pompeii's walls to New York's subway cars to Banksy's stencils, street art has always been the voice of people without a gallery. Here is what the history and the research actually show.

Text-to-Image AI: DALL-E, Midjourney, and Stable Diffusion Compared
Three platforms, three philosophies. How DALL-E, Midjourney, and Stable Diffusion are reshaping who gets to make images.

Can AI Be Creative? The Deep Question Behind Every AI-Generated Image
When an AI generates something beautiful and novel, is that creativity? The answer depends on which definition you use, and on whether anyone is home.

AI Art, Copyright, and Ethics: Who Owns What an Algorithm Creates?
When an AI generates art, who owns it? And is using millions of artists' work to train that AI fair? Courts in the US, UK, Germany, and China are giving different answers.

AI Music Composition: How Neural Networks Learn to Make Music
From generating Bach chorales to producing pop hits, AI composition tools are rewriting what it means to create music.