6.4 Diffusion from Scratch

Created Date: 2025-06-15

In this session, we walked through all the building blocks of Stable Diffusion, including:

  • Principle of Diffusion models.

  • Model score function of images with UNet model.

  • Understanding prompt through contextualized word embedding.

  • Let text influence image through cross attention.

  • Improve efficiency by adding an autoencoder.

  • Large scale training.

6.4.1 Playing with Stable Diffusion

6.4.2 Build Stable Diffusion U-Net Model

6.4.3 Build a Diffusion Model (U-Net + Cross Attention)