Lesson 1 • 2 min
Forward Process
Adding noise step by step
Photocopying a photocopy
Remember making copies of copies? Each generation gets a bit more degraded. The forward process is similar: we add a tiny bit of random noise at each step until the image becomes pure static.
Watch an image get progressively noisier
This is how we create training data. We take millions of clean images, add noise in controlled steps, and save each intermediate result. The model then learns to reverse each step.
The math (simplified)
# At each step t, we add a bit of Gaussian noise
def add_noise(image, t):
noise = random_gaussian(shape=image.shape)
# alpha controls how much original image vs noise
alpha = noise_schedule[t] # decreases over time
return sqrt(alpha) * image + sqrt(1 - alpha) * noise
# After ~1000 steps, image is pure noise
step_0: clean image
step_100: slightly fuzzy
step_500: mostly noise, vague shapes
step_1000: pure random staticQuick Win
You understand the forward process: progressively adding noise creates the training targets for the model.