Papers › Exact Diffusion Inversion via Bi-directional Integration Approximation

Exact Diffusion Inversion via Bi-directional Integration Approximation

10 Jul 2023arXiv:2307.10829archive 2025-07-28

Guoqiang Zhang, J. P. Lewis, W. Bastiaan Kleijn

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 zᵢ₋₁ at timestep tᵢ with the historical information (i,zᵢ) and (i+1,zᵢ₊₁). We first obtain the estimated Gaussian noise ϵ̂(zᵢ,i), and then apply the DDIM update procedure twice for approximating the ODE integration over the next time-slot [tᵢ, tᵢ₋₁] in the forward manner and the previous time-slot [tᵢ, tₜ₊₁] in the backward manner. The DDIM step for the previous time-slot is used to refine the integration approximation made earlier when computing zᵢ. A nice property of BDIA-DDIM is that the update expression for zᵢ₋₁ is a linear combination of (zᵢ₊₁, zᵢ, ϵ̂(zᵢ,i)). This allows for exact backward computation of zᵢ₊₁ given (zᵢ, zᵢ₋₁), 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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2307.10829")

Code

Syntology Ran 7 of 16 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 1 ran · fixture could not drive it; 4 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 6 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

guoqiang-zhang-x/BDIA officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 7 ran; 1 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
1ran · fixture could not drive it
4ran
9unverified

Licence: 16 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from guoqiang-zhang-x/BDIA. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

calculate_frechet_distance guoqiang-zhang-x/BDIA/text-to-image/stablediffusionV2/fid_score.py official repository ran · fixture could not drive it no licence file found · pointer only · 4cee7c1861294d59 · report
get_parameter_device guoqiang-zhang-x/BDIA/image-editing/my_diffusers/modeling_utils.py official repository ran no licence file found · pointer only · eafa252fd6f86857 · report
get_parameter_dtype guoqiang-zhang-x/BDIA/image-editing/my_diffusers/modeling_utils.py official repository ran no licence file found · pointer only · dc2045840ce679cb · report
get_timestep_embedding guoqiang-zhang-x/BDIA/image-editing/my_diffusers/models/embeddings.py official repository ran no licence file found · pointer only · 25d9cd38598c4751 · report
imread guoqiang-zhang-x/BDIA/text-to-image/stablediffusionV2/fid_score.py official repository ran · honoured contract no licence file found · pointer only · aa4cae054b657ba2 · report
upfirdn2d_native guoqiang-zhang-x/BDIA/image-editing/my_diffusers/models/resnet.py official repository ran no licence file found · pointer only · 498ae1b2f8e470f7 · report
check_imports guoqiang-zhang-x/BDIA/image-editing/my_diffusers/dynamic_modules_utils.py official repository unverified no licence file found · pointer only · 301682fc3342590a · report
downsample_2d guoqiang-zhang-x/BDIA/image-editing/my_diffusers/models/resnet.py official repository unverified no licence file found · pointer only · a0900d0499301ed4 · report
get_activations guoqiang-zhang-x/BDIA/text-to-image/stablediffusionV2/fid_score.py official repository unverified no licence file found · pointer only · 52f0b0681052dbb6 · report
get_full_repo_name guoqiang-zhang-x/BDIA/image-editing/my_diffusers/hub_utils.py official repository unverified no licence file found · pointer only · d7a3942d0d5c6041 · report
get_relative_import_files guoqiang-zhang-x/BDIA/image-editing/my_diffusers/dynamic_modules_utils.py official repository unverified no licence file found · pointer only · 00cc853a73f3aeb6 · report
get_relative_imports guoqiang-zhang-x/BDIA/image-editing/my_diffusers/dynamic_modules_utils.py official repository unverified no licence file found · pointer only · 450aeffe7f80f917 · report
init_git_repo guoqiang-zhang-x/BDIA/image-editing/my_diffusers/hub_utils.py official repository unverified no licence file found · pointer only · 4c264554ae99a2ef · report
load_state_dict guoqiang-zhang-x/BDIA/image-editing/my_diffusers/modeling_utils.py official repository unverified no licence file found · pointer only · 77bd5e6e8ca8c91d · report
upsample_2d guoqiang-zhang-x/BDIA/image-editing/my_diffusers/models/resnet.py official repository unverified no licence file found · pointer only · 9a0acd22f4c9b83f · report
chunk identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 8241c0562bc710fd · report

Tasks

Image GenerationImage ReconstructionText to Image GenerationText-to-Image Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections