Image and 3D Scene Editing
方双康
2024.06.15
Editing images from human instructions
(GPT-3) + (Stable Diffusion)
to generate a large dataset of image editing examples.
InstructPix2Pix, is trained on generated data.
InstructPex2Pix as a supervised learning problem
(a) We first use a finetuned GPT-3 to generate instructions and edited captions.
(b) We then use StableDiffusion in combination with Prompt-to-Prompt to generate pairs of images from pairs of captions. We use this procedure to create a dataset
(c) of over 450,000 training examples.
(d) Finally, InstructPix2Pix diffusion model is trained on our generated data to edit images from instructions. At inference time, our model generalizes to edit real images from human-written instructions.
Sampled 700 input captions from the LAION-Aesthetics V2 6.5+ dataset and manually wrote instructions and output captions.
InstructPix2Pix
Use generated training data to train a conditional diffusion model that edits images from written instructions. base-model: Stable Diffusion
Results
Results
First discover editing directions that reflect desired edits in the text embedding space
Propose cross-attention guidance to retain the cross-attention maps of the input image throughout the diffusion process
does not need additional training for these edits and can directly use the existing pre-trained text-to-image diffusion model.
changing foreground object (cat→ dog),
modifying object (adding glasses to a cat image)
changing style of the input (sketch → oil pastel), -for both real images and synthetic images.
Inverting Real Images
initial noise level
(64, 32, 16, 8)
Discovering Edit Directions
cat + c_edit → dog
Editing via Cross-Attention Guidance
Experiments
Others: Fast Distillation
distilling a slow, text-to-image diffusion model into a fast, feed-forward model