End-to-End Diffusion Latent Optimization Improves Classifier Guidance

Bram Wallace, Akash Gokul, Stefano Ermon, Nikhil Naik
3/23/2023
cs.CVcs.AIcs.LG

Official code: salesforce/DOODL (74 stars, Apache-2.0, last commit 2025-01-27).

Abstract

Classifier guidance -- using the gradients of an image classifier to steer the generations of a diffusion model -- has the potential to dramatically expand the creative control over image generation and editing. However, currently classifier guidance requires either training new noise-aware models to obtain accurate gradients or using a one-step denoising approximation of the final generation, which leads to misaligned gradients and sub-optimal control. We highlight this approximation's shortcomings and propose a novel guidance method: Direct Optimization of Diffusion Latents (DOODL), which enables plug-and-play guidance by optimizing diffusion latents w.r.t. the gradients of a pre-trained classifier on the true generated pixels, using an invertible diffusion process to achieve memory-efficient backpropagation. Showcasing the potential of more precise guidance, DOODL outperforms one-step classifier guidance on computational and human evaluation metrics across different forms of guidance: using CLIP guidance to improve generations of complex prompts from DrawBench, using fine-grained visual classifiers to expand the vocabulary of Stable Diffusion, enabling image-conditioned generation with a CLIP visual encoder, and improving image aesthetics using an aesthetic scoring network. Code at https://github.com/salesforce/DOODL.

View on arXivView PDF

Code Implementations(1)

salesforce/DOODLOfficial100%
Apache-2.0
744Python, Jupyter NotebookApr 18, 20231 years agoApache-2.0

Similar Papers

Cite this paper

@article{wallace2023endtoend,
  title  = {End-to-End Diffusion Latent Optimization Improves Classifier Guidance},
  author = {Bram Wallace and Akash Gokul and Stefano Ermon and Nikhil Naik},
  year   = {2023},
  eprint = {2303.13703},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.13703v2},
  journal = {ICCV 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.13703.svg)](https://codeofpaper.com/paper/2303.13703)

Discussion