← All projects

Adobe May – Aug 2023 · Research draft

Control2Control

I worked on Control2Control during my Adobe internship. The project uses sketches, poses and layouts to edit an image while helping preserve the surrounding scene.

Research intern

Original / Edited

Edited generated corgi wearing sunglasses, with the surrounding road scene largely preserved.
Original generated corgi on a road, before the accessory edit.
Original Edited
Drag to compare the original and edited image.

Edit sketch

The sketch requests glasses, and the text prompt adds “wearing sunglasses.” Control2Control estimates the edit region internally.

Object movement

Edited cup moved to the right of the same table.
Original cup on the left of a wooden table.
Original Edited

Drag to compare

Movement layout
Move the cup to the requested position.

Pose-controlled edit

Edited person in the requested pose, in the same café.
Original illustrated person standing in a sunlit café.
Original Edited

Drag to compare

Target pose
Change the pose while retaining the surrounding scene.

How it works

Source and edited branches

The source branch uses the original spatial condition, while the target branch uses the edited sketch, pose or layout. Both use pretrained diffusion and spatial-control models; a new editor is not trained for each requested change.

Estimate the changed region

The method accumulates source and target self-attention features over intermediate denoising steps. Low-rank filtering of their difference and thresholding produce an edit mask, which selects where the target is allowed to change.

Attention-transfer diagram

The target keeps its own queries. The mask selects target keys and values inside the edit region and source keys and values elsewhere.

Revitalized attention transfer

Revitalized attention transfer is a mask-guided self-attention operation for diffusion image editing. At selected layers, it uses the target branch's keys and values within the edit region and the source branch's keys and values elsewhere.

K̂t = M ⊙ Kt + (1 − M) ⊙ Ks

V̂t = M ⊙ Vt + (1 − M) ⊙ Vs

M is the edit mask: 1 inside the changed region and 0 outside it. The subscripts t and s denote the target and source branches, respectively.

The target branch retains its own queries. This lets the edited object attend to the original scene while giving the changed region freedom to follow the new spatial condition.

Results

The draft demonstrates adding an accessory with a sketch, moving objects and changing poses using pretrained models.

Large edits can shift object identity, and errors in the estimated mask can change background details. These results are from the research draft.

Presentation

Editing a scene with a sketch

A sketch specifies the sunglasses to add. The edit preserves the corgi and its surroundings.

The input corgi, the sketch of sunglasses and the edited image displayed in sequence.
Original slide

Turning an edit into a spatial condition

A pretrained controller accepts a sketch, pose or layout that specifies the requested change.

Diagram showing the original input, edited spatial condition and resulting image.
Original slide

Preserving the scene outside the edit

Attention differences locate the edit. The model keeps target queries and uses target keys and values inside the mask and source keys and values outside it.

Attention-transfer diagram showing where source and target keys, values and queries enter the operation.
Original slide

Moving objects within a scene

Moving a cup on a reflective table, or several objects together, requires the edit to preserve the surrounding scene and object identities.

Single-object and multi-object movement examples with the source and edited scenes.
Original slide

Changing one or more poses

A separate skeleton specifies each person’s posture. These examples use Anything v4.0 with a pose-conditioned adapter.

Single-person and multi-person pose edits, shown with the guiding skeletons.
Original slide
Control2Control: Revitalizing Attention Transfer for Consistent Visual Editing

Adobe research draft 2023 · Research draft

All projects ↗

Special thanks to Codex for helping create this Projects section.