BEVERLY QIN

Back to Projects

Diffusion Image Editing

my role

Developer

year

2026

contribution

Generative Modeling, Image Editing, Experimentation

tools

Python, PyTorch, DeepFloyd IF, Diffusers

team

Individual project

Overview

Built a set of image-editing workflows on DeepFloyd IF: SDEdit translation, mask-based inpainting, text-conditioned image editing, visual anagrams, and hybrid images.

The methods and experiment outcomes below preserve the original report.

SDEdit Image-to-Image Translation

SDEdit adds noise to an input image before denoising it. The i_start value determines the editing-versus-preservation tradeoff: lower values let the diffusion prior change the source more substantially, while higher values retain more of its original structure.

Within every sweep, read left to right as i_start = 1, 3, 5, 7, 10, and 20. The Campanile series shows the basic control. The web image and hand drawings show how non-photorealistic inputs are projected toward the model's natural-image manifold—dramatic at lower values and more source-faithful at higher values.

Photograph: Campanile

Six edits of the same photograph at progressively larger noise-start positions.

Campanile SDEdit · i_start=1
Campanile SDEdit · i_start=1
Campanile SDEdit · i_start=3
Campanile SDEdit · i_start=3
Campanile SDEdit · i_start=5
Campanile SDEdit · i_start=5
Campanile SDEdit · i_start=7
Campanile SDEdit · i_start=7
Campanile SDEdit · i_start=10
Campanile SDEdit · i_start=10
Campanile SDEdit · i_start=20
Campanile SDEdit · i_start=20

Web image

The first tile is the input; the remaining tiles are its six SDEdit outcomes.

Web-image input
Web-image input
Web-image SDEdit · i_start=1
Web-image SDEdit · i_start=1
Web-image SDEdit · i_start=3
Web-image SDEdit · i_start=3
Web-image SDEdit · i_start=5
Web-image SDEdit · i_start=5
Web-image SDEdit · i_start=7
Web-image SDEdit · i_start=7
Web-image SDEdit · i_start=10
Web-image SDEdit · i_start=10
Web-image SDEdit · i_start=20
Web-image SDEdit · i_start=20

Hand-drawn image 1

Input drawing followed by the same six-step edit sweep.

Hand-drawn image 1 input
Hand-drawn image 1 input
Hand-drawn image 1 SDEdit · i_start=1
Hand-drawn image 1 SDEdit · i_start=1
Hand-drawn image 1 SDEdit · i_start=3
Hand-drawn image 1 SDEdit · i_start=3
Hand-drawn image 1 SDEdit · i_start=5
Hand-drawn image 1 SDEdit · i_start=5
Hand-drawn image 1 SDEdit · i_start=7
Hand-drawn image 1 SDEdit · i_start=7
Hand-drawn image 1 SDEdit · i_start=10
Hand-drawn image 1 SDEdit · i_start=10
Hand-drawn image 1 SDEdit · i_start=20
Hand-drawn image 1 SDEdit · i_start=20

Hand-drawn image 2

A second drawing tests whether the behavior generalizes to a different sketch.

Hand-drawn image 2 input
Hand-drawn image 2 input
Hand-drawn image 2 SDEdit · i_start=1
Hand-drawn image 2 SDEdit · i_start=1
Hand-drawn image 2 SDEdit · i_start=3
Hand-drawn image 2 SDEdit · i_start=3
Hand-drawn image 2 SDEdit · i_start=5
Hand-drawn image 2 SDEdit · i_start=5
Hand-drawn image 2 SDEdit · i_start=7
Hand-drawn image 2 SDEdit · i_start=7
Hand-drawn image 2 SDEdit · i_start=10
Hand-drawn image 2 SDEdit · i_start=10
Hand-drawn image 2 SDEdit · i_start=20
Hand-drawn image 2 SDEdit · i_start=20

Mask-Based Inpainting

At each denoising step, pixels outside the mask are reset to the original image, leaving the diffusion model free to generate only the unknown region. The resulting content is constrained by both the surrounding image and the learned image prior. Each sequence is original image, mask, then inpainted result.

Campanile original
Campanile original
Campanile mask
Campanile mask
Campanile inpainted
Campanile inpainted
Custom image 1 original
Custom image 1 original
Custom image 1 mask
Custom image 1 mask
Custom image 1 inpainted
Custom image 1 inpainted
Custom image 2 original
Custom image 2 original
Custom image 2 mask
Custom image 2 mask
Custom image 2 inpainted
Custom image 2 inpainted

Text-Conditional Editing

Text prompts guide SDEdit toward a new semantic target while i_start still controls structural preservation. The experiments use prompts such as “a drawing of a group of flamingos” and “a painting of the Colosseum.” Low values are dominated by the prompt; high values maintain more of the original image's structure.

Each six-image set is ordered left to right by i_start = 1, 3, 5, 7, 10, and 20, so the transition from prompt-driven to input-driven imagery is visible within a row.

Campanile source

Campanile text-conditioned edit · i_start=1
Campanile text-conditioned edit · i_start=1
Campanile text-conditioned edit · i_start=3
Campanile text-conditioned edit · i_start=3
Campanile text-conditioned edit · i_start=5
Campanile text-conditioned edit · i_start=5
Campanile text-conditioned edit · i_start=7
Campanile text-conditioned edit · i_start=7
Campanile text-conditioned edit · i_start=10
Campanile text-conditioned edit · i_start=10
Campanile text-conditioned edit · i_start=20
Campanile text-conditioned edit · i_start=20

Custom image 1 source

Custom image 1 text-conditioned edit · i_start=1
Custom image 1 text-conditioned edit · i_start=1
Custom image 1 text-conditioned edit · i_start=3
Custom image 1 text-conditioned edit · i_start=3
Custom image 1 text-conditioned edit · i_start=5
Custom image 1 text-conditioned edit · i_start=5
Custom image 1 text-conditioned edit · i_start=7
Custom image 1 text-conditioned edit · i_start=7
Custom image 1 text-conditioned edit · i_start=10
Custom image 1 text-conditioned edit · i_start=10
Custom image 1 text-conditioned edit · i_start=20
Custom image 1 text-conditioned edit · i_start=20

Custom image 2 source

Custom image 2 text-conditioned edit · i_start=1
Custom image 2 text-conditioned edit · i_start=1
Custom image 2 text-conditioned edit · i_start=3
Custom image 2 text-conditioned edit · i_start=3
Custom image 2 text-conditioned edit · i_start=5
Custom image 2 text-conditioned edit · i_start=5
Custom image 2 text-conditioned edit · i_start=7
Custom image 2 text-conditioned edit · i_start=7
Custom image 2 text-conditioned edit · i_start=10
Custom image 2 text-conditioned edit · i_start=10
Custom image 2 text-conditioned edit · i_start=20
Custom image 2 text-conditioned edit · i_start=20

Visual Anagrams & Hybrid Images

For visual anagrams, the UNet runs once on the normal image with one prompt and once on a vertically flipped image with a second prompt. The second noise estimate is flipped back and averaged with the first, allowing the image to resolve differently when rotated.

For hybrid images, two prompt-conditioned estimates are separated by frequency using Gaussian blur (kernel 33, σ=2). Low frequencies come from one prompt and high frequencies from the other, combining different identities across viewing scales.

Visual anagrams

Lake / roses anagram · normal view
Lake / roses anagram · normal view
Lake / roses anagram · flipped view
Lake / roses anagram · flipped view
Flamingos / Colosseum anagram · normal view
Flamingos / Colosseum anagram · normal view
Flamingos / Colosseum anagram · flipped view
Flamingos / Colosseum anagram · flipped view

Hybrid images

Roses / Colosseum hybrid
Roses / Colosseum hybrid
Plane-race hybrid
Plane-race hybrid