Diffusion Models from Scratch

Associated with Personal Project, 2024

This project is writen in Python

A denoising diffusion probabilistic model (DDPM) implemented from first principles in PyTorch, trained to generate anime-style faces.

The repository builds the full pipeline without relying on a diffusion library: the forward noising schedule, a U-Net noise-prediction backbone with time embeddings, the training objective, and the reverse sampling loop.

The project was written as a way to work through the mechanics of generative diffusion in detail, and doubles as a readable reference implementation.

Tags

diffusion models DDPM U-Net generative modeling image generation training from scratch deep learning CNN