Skip to content
BIASED

Point-based editing: DragGAN and DragDiffusion

Block 1 of 8~2 min

Grab a point and drag

The topic Latent diffusion ended with a working text-to-image model: a frozen autoencoder, DDPM in its latent space, a prompt read through cross-attention, and DDIM for speed. A prompt is good at saying what is in the picture. It is a blunt tool for saying where. "Turn the head a little to the left" or "move the paw 40 pixels down" rarely comes out right.

Point-based editing gives a direct handle instead. The user clicks a few handle points pip_i on the image and, for each one, a target point gig_i where that bit of content should end up. Optionally they paint a mask MM: the region that may change, with M=1M = 1 inside and M=0M = 0 outside. A good edit is

  • precise: the content under each pip_i ends up at gig_i;
  • general: it works for faces, cars, cats and landscapes, without a separate tool for each;
  • faithful: everything else stays as it was, and whatever the moved object uncovers is filled in plausibly.

Simply warping the pixels fails the last test. Rotate a head, and the ear that was hidden behind it has to come from somewhere. A generative model knows what such regions usually contain. So both methods in this topic move content in the latent space of a generator and let the generator redraw the image. DragGAN (Pan et al., 2023) does this with a GAN. DragDiffusion (Shi et al., 2024) carries the same idea over to latent diffusion.

Answers are saved on the server and tied to this browser until you sign in.