Lensa ML
Lensa ML

Diffusion Models

Step 1 of 6

Forward Diffusion

Gradually add noise to destroy signal

FORWARD DIFFUSION: x₀ → x_Tt=0 (clean)t=T (noise)noise
Time step t0
TIME STEP
0
σ(t)
0.00
SIGNAL
1.00

The original clean image. No noise has been added yet.

Step 1 of 6: Forward Diffusion

Gradually add noise to destroy signal

FORWARD DIFFUSION: x₀ → x_Tt=0 (clean)t=T (noise)noise
Time step t0
TIME STEP
0
σ(t)
0.00
SIGNAL
1.00

The original clean image. No noise has been added yet.

Step 2 of 6: Noise Schedule

How noise grows over time

NOISE SCHEDULE: LINEARβ(t)ᾱ(t)time step t →
Schedule0.00
SCHEDULE
Linear
β(10)
0.0100
ᾱ(10)
0.946

Linear schedule: noise grows uniformly. Signal degrades quickly in early steps.

Step 3 of 6: Reverse Process

Denoise step by step to generate

REVERSE PROCESS: x_T → x₀noiseclean
Denoise step20
STEP
20
NOISE
1.00
CLARITY
0%

Starting from pure noise. The model must predict and remove noise step by step.

Step 4 of 6: Training Objective

Learn to predict the noise

TRAINING: PREDICT THE NOISEε_trueε_pred‖ε - ε̂‖²
Noise level0.50
NOISE σ
0.50
L2 LOSS
0.0539
MATCH
0%

Medium noise: the prediction task is harder. The model must learn meaningful patterns to denoise.

Step 5 of 6: Sampling Steps

More steps, better quality

SAMPLING QUALITY vs STEPS5 steps10 steps20 steps35 steps50 steps← active steps used →Speed: Moderate · Quality: Good
Num steps20
STEPS
20
QUALITY
40%
SPEED
60%

Moderate steps: a good balance between speed and quality for most applications.

Step 6 of 6: Guidance Scale

Control diversity vs fidelity

CLASSIFIER-FREE GUIDANCESample 1Sample 2Sample 3Sample 4Sample 5DiversityFidelityw = 7.0ε = ε_uncond + w · (ε_cond − ε_uncond)
Guidance w7.00
SCALE
7.0
DIVERSITY
57%
FIDELITY
60%

Moderate guidance: good balance of prompt adherence and output diversity. Most commonly used range.