Skip to main content
Neural Defend

How Do Diffusion Models Generate Images?

Diffusion models generate images by starting from random noise and removing it in many small, learned steps until a picture emerges that matches the training data and any text prompt. During training the model sees real images with noise added at different strengths and learns to predict that noise. Fake images come from running that denoising loop with a prompt, a reference photo or a mask steering each step.

Maintained byNeural Defend Editorial
Updated October 1, 2026
Siva Shankar, Co-founder and CTO of Neural Defend.
Siva ShankarCo-founder & CTO
Granular noise passes through denoising chambers and condenses into a coherent media object.

How do diffusion models generate images?

A diffusion model generates an image by reversing a noising process. Training takes a real image, adds Gaussian noise in a fixed schedule until only static is left, and teaches a neural network to predict the noise that was added at each level. Generation runs the process backwards: the model begins with pure noise and, over dozens to hundreds of steps, subtracts its own noise estimate until a clean image remains.

Nothing in the network stores a training picture to be retrieved. Each run starts from a fresh noise sample, so the same prompt yields a different image every time. That is why diffusion tools produce endless variations, and why a suspect image usually has no single original to find.

The same mechanism works for other media. Audio models denoise spectrograms or waveforms, and video models denoise a stack of frames together so that motion stays consistent. Most image products now add two components around the core loop: a text encoder that turns the prompt into numbers, and an autoencoder that moves between pixels and a smaller latent space.

ComponentWhat it doesWhat it means for forensics
Noise scheduleSets how much noise is added or removed at each stepDifferent schedules and samplers leave different fine textures
Denoising networkPredicts the noise to remove at each stepThe core learned model; varies by family and version
Text encoder and cross-attentionFeeds prompt meaning into every denoising stepExplains prompt-following errors such as wrong counts or text
Autoencoder (latent models)Compresses images for denoising and decodes the resultThe decoder can leave its own texture patterns
GuidancePushes samples harder toward the promptStrong guidance can oversaturate colour and contrast
The main parts of a modern text-to-image diffusion system.

How did diffusion models change image generation in 2020?

Diffusion changed image generation in 2020 by showing that a denoising model could match or beat GANs on image quality without adversarial training. The idea had appeared in 2015, but the Denoising Diffusion Probabilistic Models paper by Jonathan Ho, Ajay Jain and Pieter Abbeel, posted on 19 June 2020, made it work at scale. It reported an Inception score of 9.46 and an FID of 3.17 on unconditional CIFAR-10, and sample quality on 256-pixel LSUN images comparable to ProgressiveGAN.

GANs pit a generator against a discriminator and are known for unstable training and mode collapse, where the generator keeps producing a narrow range of outputs. DDPM avoided that contest entirely. The cost moved to inference: generating one image required hundreds of network evaluations instead of one forward pass. Later samplers such as DDIM reduced the step count, but the 2020 paper settled the direction research took.

DDPM itself had no text prompts, no identity control and no video. Those capabilities arrived over the next two years, and reading them back into 2020 distorts the timeline.

A spiral of image plates resolves from granular noise into a coherent still life through repeated denoising.

How did text-to-image generation move from DALL-E to latent diffusion?

Text-to-image generation moved from token prediction to conditioned denoising between January 2021 and 2022. OpenAI announced DALL-E and CLIP on 5 January 2021. DALL-E treated an image as a sequence of tokens and predicted them from the text, much like a language model writes words. CLIP scored each candidate image against the prompt, and the best-matching samples were shown, so the published examples reflected generation plus selection.

Latent diffusion took a different route. Instead of predicting tokens, it denoised a compressed image representation and injected the prompt into every step through cross-attention layers. The same framework handled text-to-image, inpainting, super-resolution and layout-to-image tasks. DALL-E and latent diffusion are separate architectures, not successive versions of one design.

For anyone checking images, this shift matters because prompt-driven diffusion made it trivial to ask for a specific scene, a style or a person-like face, then regenerate until the result looked right. A realistic photo can still get the prompt, anatomy or facts wrong, which is one reason visual plausibility and authenticity have to be judged separately.

A triptych moves from token-built image candidates and optical selection to conditioned latent denoising.

Why did latent diffusion make text-to-image models easier to run?

Latent diffusion made text-to-image models easier to run because it denoises a small compressed version of the image rather than every pixel. Robin Rombach and colleagues, in a paper posted on 20 December 2021 and presented at CVPR 2022, trained a pretrained autoencoder to shrink images and ran diffusion in that latent space. They noted that pixel-space diffusion models often needed hundreds of GPU days to train and were expensive to sample, and that the latent approach cut those requirements while keeping visual detail.

Release decisions did the rest. Stability AI made Stable Diffusion, built on this approach, publicly available on 22 August 2022 under the CreativeML OpenRAIL-M licence, saying it needed about 6.9 GB of GPU memory. Downloadable weights meant anyone with a mid-range graphics card could generate images offline, fine-tune the model on new faces or styles and share the modified checkpoints.

Lower cost and open weights explain why diffusion images spread so quickly. They do not show who used a model in a particular incident, whether they followed the licence, or which checkpoint produced a given file.

A full image folds into a compact latent prism, is denoised, and unfolds on a local workstation.

Why diffusion fakes slip past detectors built for GANs

Many early deepfake detectors learned the fingerprints of GAN upsampling, such as periodic patterns in the frequency spectrum. Diffusion images are produced differently and often lack those patterns, so a detector trained mostly on GAN data can score them as real. The problem is worse for fine-tuned community checkpoints, which shift textures away from any base model a detector has seen.

Diffusion also complicates attribution. A single delivered image may combine a base model, a sampler, guidance settings, a reference adapter, an inpainting mask, a decoder and a round of manual editing. A detector can say an image shows signs of diffusion generation; naming the exact model and version requires a system built and validated for that task, and most are not.

  • Test detectors on several diffusion families and on fine-tuned checkpoints, not one popular model.
  • Include inpainted images where only a region was generated, since whole-image scores can miss local edits.
  • Recompress and resize test images the way social platforms do before measuring results.
  • Keep the original received file; screenshots and re-saves destroy the faint traces detectors rely on.

How NeuroDetect examines suspected diffusion images

NeuroDetect, Neural Defend's forensic workspace, lets an analyst upload an authorized image into a case and review it at region level, with explainability heatmaps and attention views showing which areas drove the result. That matters for diffusion fakes, where an inpainted face can sit inside an otherwise genuine photo. The case keeps the model and version used, so the finding can be re-examined later.

The detection model behind it, ARCAS 1B, was evaluated on generator-diverse image benchmarks. The ARCAS paper reports pooled accuracy of 99.99% on GenImage, which spans several diffusion and GAN generators, 99.92% on WildFake and 99.09% on AIGIBench. On the public VendorBench-100 set of 100 adversarial still images, which includes AI photo edits and text-to-video stills, Neural Defend ranked first of 36 systems with an MCC of 0.876. One VendorBench author also co-authored the ARCAS paper, and the corpus is public for anyone to rerun.

For high-volume screening of selfies and profile photos rather than case work, NeuroVerify runs the same kind of analysis through one API call, including AI Generative Model Analysis and AI Pixel-Level Manipulation signals.

Evidence boundary

Limitations

  • Diffusion is a family of methods; results described here may not apply to every sampler, decoder or fine-tuned checkpoint.
  • A detection score can indicate AI generation but does not identify the specific model, version or person who produced an image.
  • ARCAS benchmark figures describe the records evaluated in the paper and are not a guarantee on unseen generators.

Frequently asked questions

How do diffusion models create fake images?

Diffusion models create fake images by starting from random noise and repeatedly removing a predicted amount of it until a coherent picture appears. A text prompt, reference photo or mask steers each step, so the user can ask for a specific scene or face and regenerate until it looks convincing. No real camera capture is involved unless the user edits a genuine photo.

Is Stable Diffusion a diffusion model?

Yes. Stable Diffusion is a latent diffusion model: it denoises a compressed image representation produced by an autoencoder, then decodes the result to pixels. Its weights were released publicly in August 2022, which is why many fine-tuned variants exist.

Are diffusion models better than GANs?

For most image generation tasks, diffusion models now produce more varied and higher-fidelity results and train more stably than GANs. GANs are still faster at inference because they generate in one pass, which is why some real-time face tools use GAN-style generators.

Can you tell which diffusion model made an image?

Usually not with certainty. A detector can report that an image shows signs of AI generation, and some research systems estimate the model family. Exact attribution to a model and version needs purpose-built, validated methods plus provenance data such as C2PA Content Credentials, which many images do not carry.

Do diffusion images contain hidden watermarks?

Some do. Several commercial generators add invisible watermarks or Content Credentials, but open-weight models run locally usually add nothing, and recompression or cropping can remove marks. Treat a missing watermark as no evidence either way.

Source record

Sources and references

  1. arXiv (Ho, Jain, Abbeel)Denoising Diffusion Probabilistic ModelsPublished June 19, 2020. Verified October 19, 2026.
  2. arXiv (Rombach et al.)High-Resolution Image Synthesis with Latent Diffusion ModelsPublished December 20, 2021. Verified October 19, 2026.
  3. Stability AIStable Diffusion Public ReleasePublished August 22, 2022. Verified October 19, 2026.
  4. OpenAIDALL-E: Creating Images from TextPublished January 5, 2021. Verified August 7, 2026.
  5. OpenAICLIP: Connecting Text and ImagesPublished January 5, 2021. Verified August 7, 2026.
  6. arXiv (Selvarajan et al.)Benchmarking Neural Defend ARCAS 1B: A Foundational Multimodal Deepfake Detection ModelPublished September 21, 2026. Verified October 19, 2026.
  7. arXiv (Deshmukh et al.)VendorBench-100: A Unified Cross-Paradigm Benchmark for Deepfake Image DetectionPublished July 29, 2026. Verified October 19, 2026.

Diffusion image review

Examine a suspected AI image region by region.

Upload an authorized image to NeuroDetect and see heatmaps, attention views and model context for each finding.

Explore NeuroDetect