> For the complete documentation index, see [llms.txt](https://www.mlcompendium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.mlcompendium.com/generative-ai/diffusion-models.md).

# Diffusion Models

## Diffusion models

Most image generation today runs on diffusion models, so the first need is a clear picture of what they are. This part gives two conceptual explainers; the second part below adds guided introductions, a build-your-own tutorial, and one fine-tuned model.

The same notes are in [Diffusion Models](/generative-ai/diffusion-models.md).

1. [Lilian Weng on diffusion](https://lilianweng.github.io/posts/2021-07-11-diffusion-models/) is her post "What are Diffusion Models?", the reference explainer to start from.
2. [Diffusion models made easy](https://medium.com/data-science/diffusion-models-made-easy-8414298ce4da) — J. Rafid. It places diffusion after GANs and VAEs: GANs work for many applications but are hard to train and lose diversity through mode collapse and vanishing gradients, while VAEs have the more solid theoretical foundation, and diffusion is introduced against those two.

## Diffusion Models

Once the idea is clear, the next step is to see it built and then used. The list runs from an introduction, to a minimal implementation, to where the ideas came from, and ends with a model you can download.

The same notes are in [Diffusion models](/generative-ai/diffusion-models.md) and [GenAI Applications](/generative-ai/genai-applications.md).

1. [Intro to Diffusion Models](https://www.assemblyai.com/blog/diffusion-models-for-machine-learning-introduction/) is AssemblyAI's easy-to-follow guide to diffusion models, one of the biggest developments in machine learning of the past several years.
2. [Build your own](https://www.assemblyai.com/blog/minimagen-build-your-own-imagen-text-to-image-model/) is the MinImagen tutorial: a minimal implementation of the Imagen text-to-image model, from the same year as DALL-E 2.
3. [How physics advanced Generative AI](https://www.assemblyai.com/blog/how-physics-advanced-generative-ai/#generative-ai-with-thermodynamics) is a high-level look at how concepts from physics, thermodynamics among them, inspired many cutting-edge generative models.
4. [Openjourney](https://huggingface.co/prompthero/openjourney) is an open source Stable Diffusion fine tuned model on Midjourney images, by PromptHero

### Deprecated links

{% hint style="warning" %}
These links and images no longer work. The original wording is kept here. A same-resource copy, when one was checked, is used above.
{% endhint %}

* Diffusion models made easy. This address no longer opens: <https://towardsdatascience.com/diffusion-models-made-easy-8414298ce4da>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.mlcompendium.com/generative-ai/diffusion-models.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
