← Back to feed

What are Diffusion Models?

L5 · ResearcherTutorials & GuidesLilian Weng's Blog· 7/11/2021

Essential reference for ML researchers and engineers building or understanding generative models; provides rigorous mathematical foundations and connects diffusion theory to modern architectures like Stable Diffusion.

AI Summary

A comprehensive technical deep-dive into diffusion models, covering forward and reverse diffusion processes, mathematical parameterizations, conditioning techniques (classifier-guided and classifier-free), and optimization methods. This is Lilian Weng's seminal explainer that bridges foundational theory (stochastic gradient Langevin dynamics, score networks) with practical implementations and recent advances like latent diffusion and consistency models.

Excerpt

[Updated on 2021-09-19: Highly recommend this blog post on score-based generative modeling by Yang Song (author of several key papers in the references)]. [Updated on 2022-08-27: Added classifier-free guidance, GLIDE, unCLIP and Imagen. [Updated on 2022-08-31: Added latent diffusion model. [Updated on 2024-04-13: Added progressive distillation, consistency models, and the Model Architecture section.

Read Original
0 upvotes · 0 downvotes · 1 min read

Related Articles

L3 · BuilderTutorials & Guides@simonwillison.net
Simon Willison (@simonwillison.net): Made myself a custom Codex pet today (you'll never guess what it was), and had some fun reverse-engineering how the feature works - it generates animated sprite sheets using gpt-image-2 simonwillison.

Simon Willison shares his experience creating a custom animated pet (a pelican riding a bicycle) for Codex Desktop using GPT-5.6 Sol and gpt-image-2. He reverse-engineers the sprite generation process and documents the step-by-step workflow, including all intermediate images and prompts. The article provides practical insights into using AI image generation for creating game-ready animated sprites.

L4 · DeveloperTutorials & Guides@simonwillison.net
Simon Willison (@simonwillison.net): My parallel agent side-project today was having Claude Code port the new Moebius image pinpointing model to ONNX in order to run it entirely in the browser simonwillison.net/2026/Jun/22/...

Simon Willison documents his experience using Claude Code to port the Moebius 0.2B image inpainting model to ONNX format for browser-based execution via WebGPU. He walks through the agent-assisted conversion process and shares a working demo that allows image inpainting directly in the browser without CUDA dependencies.

L3 · BuilderTutorials & Guides@simonwillison.net
Simon Willison (@simonwillison.net): The most interesting Fable tip I've heard so far is to let the model use its own judgement as much as possible I told it "For all coding tasks use your judgement to decide an appropriate lower power

Simon Willison shares practical tips for optimizing Claude Code's Fable agent, including letting the AI use its own judgment for testing decisions and delegating coding tasks to lower-power subagents to save tokens. The article provides specific prompt examples and real-world results showing improved cost efficiency while maintaining productivity.

L3 · BuilderTutorials & Guides@simonwillison.net
Simon Willison (@simonwillison.net): New TIL: Using uvx in GitHub Actions in a cache-friendly way I finally found a recipe that I like for running `uvx tool-name` in GitHub Actions without downloading a fresh copy of the package every t

Simon Willison shares a cache-friendly approach for running Python tools with uvx in GitHub Actions, using the UV_EXCLUDE_NEWER environment variable to create deterministic cache keys without needing additional dependency files. The technique allows tools to be cached between workflow runs while providing a simple way to bust the cache when needed. This solves the problem of uvx repeatedly downloading packages from PyPI on every workflow execution.

L3 · BuilderTutorials & GuidesSimon Willison's Blog
simonw/pedalican

Simon Willison documents creating a custom animated desktop pet named 'Pedalican' using Codex Desktop's pet feature. The article details how GPT-5.6 Sol generated animated sprites through multiple rounds with gpt-image-2, including all prompts and generated assets. It explores using image generation for game-ready sprites and points to the open-source implementation details published by OpenAI.