Project 5: Fun with Diffusion Models

By Tony Wan

Part 0: Setup

The random seed I'm using is 777. The quality of the photo is already decent for n=10, but for n=5, there are still many visible noise particles.

a man wearing a hat (n=5).png a man wearing a hat (n=10).png
a man wearing a hat (left n=5, right n=10)
a rocket ship (n=5).png a rocket ship (n=10).png
a rocket ship (left n=5, right n=10)
an oil painting of a snowy mountain village (n=5).png an oil painting of a snowy mountain village (n=10).png
an oil painting of a snowy mountain village (left n=5, right n=10)

Part 1.1: Forward Process

Clean Image at t=0.png Noisy Image at t=250.png Noisy Image at t=500.png Noisy Image at t=750.png
Noisy Campanile at t=0, 250, 500, 750 (left to right)

Part 1.2: Classical Denoising

Noisy Image at t=250.png Noisy Image at t=500.png Noisy Image at t=750.png
Noisy Campanile at t=0, 250, 500, 750 (left to right)
Denoised Image at t=250.png Denoised Image at t=500.png Denoised Image at t=750.png
Gaussian Blur Denoising at t=0, 250, 500, 750 (left to right)

Part 1.3: One-Step Denoising

Denoised Image at t=0.png Denoised Image at t=250.png Denoised Image at t=500.png
Noisy Campanile at t=0, 250, 500, 750 (left to right)
Denoised Image at t=0.png Denoised Image at t=250.png Denoised Image at t=500.png
Denoised Campanile at t=0, 250, 500, 750 (left to right)

Part 1.4: Iterative Denoising

Nagoya.png sushi.png Nagoya.png sushi.png sushi.png
Noisy Campanile at t=90, 240, 390, 540, 690 (left to right)
Nagoya.png sushi.png Nagoya.png sushi.png
Original, Iteratively Denoised, One-Step Denoised, Gaussian Blurred Campanile (left to right)

Part 1.5: Diffusion Model Sampling

Building.png door.png washer.png door.png washer.png
5 Samples

Part 1.6: Classifier-Free Guidance (CFG)

Building.png door.png washer.png door.png washer.png
5 Samples with CFG

Part 1.7: Image-to-image Translation

Building.png door.png washer.png door.png washer.png door.png washer.png
Campanile SDEdit with i_start=1, 3, 5, 7, 10, 20, and original (left to right)
Building.png door.png washer.png door.png washer.png door.png washer.png
Golden Gate SDEdit with i_start=1, 3, 5, 7, 10, 20, and original (left to right)
Building.png door.png washer.png door.png washer.png door.png washer.png
Monterey SDEdit with i_start=1, 3, 5, 7, 10, 20, and original (left to right)

Part 1.7.1 Editing Hand-Drawn and Web Images

door.png washer.png door.png washer.png door.png washer.png Building.png
Horse at i_start=1, 3, 5, 7, 10, 20, and original (left to right)
door.png washer.png door.png washer.png door.png washer.png Building.png
Smile at i_start=1, 3, 5, 7, 10, 20, and original (left to right)
door.png washer.png door.png washer.png door.png washer.png Building.png
Grass at i_start=1, 3, 5, 7, 10, 20, and original (left to right)

Part 1.7.2: Inpainting

door.png washer.png door.png washer.png
Campanile, Mask, Hole to Fill, Inpainted (left to right)
door.png washer.png door.png washer.png
Golden Gate, Mask, Hole to Fill, Inpainted (left to right)
door.png washer.png door.png washer.png
Monterey, Mask, Hole to Fill, Inpainted (left to right)

Part 1.7.3: Text-Conditional Image-to-image Translation

door.png washer.png door.png washer.png washer.png door.png washer.png
Rocket Ship at noise level 1, 3, 5, 7, 10, 20, and original (left to right)
door.png washer.png door.png washer.png washer.png door.png washer.png
Pencil at noise level 1, 3, 5, 7, 10, 20, and original (left to right)
door.png washer.png door.png washer.png washer.png door.png washer.png
Snowy Mountain Village at noise level 1, 3, 5, 7, 10, 20, and original (left to right)

Part 1.8: Visual Anagrams

door.png washer.png
an oil painting of an old man and an oil painting of people around a campfire
door.png washer.png
an oil painting of a snowy mountain village and a photo of a dog
door.png washer.png
a lithograph of waterfalls and a lithograph of a skull

Part 1.10: Hybrid Images

door.png door.png
Hybrid image of a lithograph of a skull and a lithograph of waterfalls
door.png washer.png
Hybrid image of a photo of a dog and a photo of a man
door.png washer.png
Hybrid image of a rocket ship and a pencil

Part B.1.2: Using the UNet to Train a Denoiser

door.png
Varying levels of noise on MNIST digits

Part B.1.2.1: Training

door.png
Varying levels of noise on MNIST digits
door.png
Results on digits from the test set after 1 epoch of training
door.png
Results on digits from the test set after 5 epochs of training

Part B.1.2.2: Out-of-Distribution Testing

door.png
Results on digits from the test set with varying noise levels.