05Generative AI

Generative AI - DDPM Diffusion Model

Diffusion, written from scratch — no black boxes.

Generative AI - DDPM Diffusion Model project cover

Framework

PyTorch

Method

DDPM

Credential

NVIDIA DLI

Metric profile

01 / Signal

1000 T

0

Diffusion steps

full DDPM schedule

02 / Signal

Stable

0

Sample quality

cosine beta schedule

03 / Signal

Single GPU

0

Training footprint

NVIDIA DLI workflow

Overview

A full Denoising Diffusion Probabilistic Model built in PyTorch from first principles: forward noising schedule, U-Net noise predictor, and the reverse sampling loop, all implemented by hand.

Completed as part of NVIDIA Deep Learning Institute training on generative AI with diffusion models.

What makes it work

01

Forward process

A parameterised beta schedule progressively corrupts images to isotropic noise, with closed-form sampling at any timestep.

02

U-Net denoiser

A convolutional U-Net with timestep embeddings and residual blocks learns to predict the noise added at each step.

03

Reverse sampling

Iterative denoising reconstructs images from pure noise, making the generative trajectory fully inspectable.

Architecture

  • Beta schedule + closed-form forward diffusion
  • U-Net with sinusoidal timestep embeddings
  • MSE noise-prediction training objective
  • Ancestral sampling loop for generation

Stack

  • PyTorch
  • DDPM
  • CNN

Denoising Diffusion Probabilistic Model implemented from scratch in PyTorch (NVIDIA DLI training).

Interested?

Explore the code, or talk about the ideas behind it.