0

Exact Diffusion Inversion via Bi-directional Integration Approximation

BDIA-DDIM introduces a computationally efficient technique for exact diffusion inversion and enhances image editing and sampling quality compared to DDIM and EDM methods.

Year
2023
Venue
arXiv 2023
Authors
3
Hosting
Abstract onlyARXIV-DEFAULT

Cite

Notes

Only stored in your browser.

Attribution

Abstract & full text
arxiv.org/abs/2307.10829v6ARXIV-DEFAULT
TL;DR
Semantic Scholar
Attribution policy →

Abstract

Recently, various methods have been proposed to address the inconsistency issue of DDIM inversion to enable image editing, such as EDICT [36] and Null-text inversion [22]. However, the above methods introduce considerable computational overhead. In this paper, we propose a new technique, named \emph{bi-directional integration approximation} (BDIA), to perform exact diffusion inversion with neglible computational overhead. Suppose we would like to estimate the next diffusion state $\boldsymbol{z}{i-1}$ at timestep $t_i$ with the historical information $(i,\boldsymbol{z}i)$ and $(i+1,\boldsymbol{z}{i+1})$. We first obtain the estimated Gaussian noise $\hat{\boldsymbol{\epsilon}}(\boldsymbol{z}i,i)$, and then apply the DDIM update procedure twice for approximating the ODE integration over the next time-slot $[t_i, t{i-1}]$ in the forward manner and the previous time-slot $[t_i, t{t+1}]$ in the backward manner. The DDIM step for the previous time-slot is used to refine the integration approximation made earlier when computing $\boldsymbol{z}i$. A nice property of BDIA-DDIM is that the update expression for $\boldsymbol{z}{i-1}$ is a linear combination of $(\boldsymbol{z}_{i+1}, \boldsymbol{z}_i, \hat{\boldsymbol{\epsilon}}(\boldsymbol{z}i,i))$. This allows for exact backward computation of $\boldsymbol{z}{i+1}$ given $(\boldsymbol{z}i, \boldsymbol{z}{i-1})$, thus leading to exact diffusion inversion. It is demonstrated with experiments that (round-trip) BDIA-DDIM is particularly effective for image editing. Our experiments further show that BDIA-DDIM produces markedly better image sampling qualities than DDIM for text-to-image generation. BDIA can also be applied to improve the performance of other ODE solvers in addition to DDIM. In our work, it is found that applying BDIA to the EDM sampling procedure produces consistently better performance over four pre-trained models.

Authors

3