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 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 View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 16 code samples: 15 from 1 repository linked to this paper, 1 identical to code harvested from another paper's repository. Across all 16: 10 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 1 honoured, 0 violated, 2 with no contract checked; 7 where Syntology's instrument failed) · 6 unverified. Where Syntology's instrument failed: 6 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 15 samples from 1 repository, 9 ran (3 with no instrument failure; 6 where Syntology's instrument failed); 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.

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 10 samples that ran has no recorded date.

guoqiang-zhang-x/BDIA officialmentioned in papermentioned on GitHubpytorchSyntology: 15 samples, 9 ran (6 instrument-failed) · 6 unverified 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: 10 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 1 honoured, 0 violated, 2 with no contract checked; 7 where Syntology's instrument failed) · 6 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
6ran · our draft was wrong
1ran; the contract check could not run
2ran
6unverified

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. 1 sample is listed last, in a group without a repository. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

guoqiang-zhang-x/BDIA official repository 15 samples, 9 ran (6 instrument-failed) · 6 unverified
calculate_frechet_distance in 119 papers text-to-image/stablediffusionV2/fid_score.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant no licence file found · pointer only · 4cee7c1861294d59 · report fixture: signature mu1:ndarray/1/float, sigma1:ndarray/2/float, mu2:ndarray/1/float, sigma2:ndarray/2/float, eps:float/0/float · returned float64 · level recorded 2026-09-22
check_imports in 15 papers image-editing/my_diffusers/dynamic_modules_utils.py ran · our draft was wrong no licence file found · pointer only · 301682fc3342590a · report fixture: signature filename:str/0/str · returned list · level recorded 2026-09-26
get_parameter_device in 18 papers image-editing/my_diffusers/modeling_utils.py ran · our draft was wrong no licence file found · pointer only · eafa252fd6f86857 · report fixture: signature parameter:callable/0/? · returned device · level recorded 2026-09-24
get_parameter_dtype in 20 papers image-editing/my_diffusers/modeling_utils.py ran · our draft was wrong no licence file found · pointer only · dc2045840ce679cb · report fixture: signature parameter:callable/0/? · returned dtype · level recorded 2026-09-24
get_relative_import_files in 28 papers image-editing/my_diffusers/dynamic_modules_utils.py ran · our draft was wrong no licence file found · pointer only · 00cc853a73f3aeb6 · report fixture: signature module_file:str/0/str · returned list · level recorded 2026-09-26
get_relative_imports in 28 papers image-editing/my_diffusers/dynamic_modules_utils.py ran · our draft was wrong no licence file found · pointer only · 450aeffe7f80f917 · report fixture: signature module_file:str/0/str · returned list · level recorded 2026-09-26
get_timestep_embedding in 138 papers
census: 11 implementations from 15 papers, 5 distinct outputs across 2 buckets, one shared input per bucket
image-editing/my_diffusers/models/embeddings.py ran no licence file found · pointer only · 25d9cd38598c4751 · report fixture: signature timesteps:Tensor/1/float, embedding_dim:int/0/int, flip_sin_to_cos:bool/0/bool, downscale_freq_shift:float/0/float, scale:float/0/float, max_period:int/0/int · returned Tensor · level recorded 2026-09-24
imread in 54 papers text-to-image/stablediffusionV2/fid_score.py ran · honoured contract no licence file found · pointer only · aa4cae054b657ba2 · report fixture: signature filename:str/0/str · returned ndarray · level recorded 2026-09-22
upfirdn2d_native in 26 papers
census: 5 implementations from 7 papers, 1 distinct output on one shared input
image-editing/my_diffusers/models/resnet.py ran no licence file found · pointer only · 498ae1b2f8e470f7 · report fixture: signature input:Tensor/4/float, kernel:Tensor/2/float, up:int/0/int, down:int/0/int, pad:tuple/1/int · returned Tensor · level recorded 2026-09-24
downsample_2d in 11 papers image-editing/my_diffusers/models/resnet.py unverified no licence file found · pointer only · a0900d0499301ed4 · report
get_activations in 100 papers text-to-image/stablediffusionV2/fid_score.py unverified no licence file found · pointer only · 52f0b0681052dbb6 · report
get_full_repo_name in 18 papers image-editing/my_diffusers/hub_utils.py unverified no licence file found · pointer only · d7a3942d0d5c6041 · report
init_git_repo image-editing/my_diffusers/hub_utils.py unverified no licence file found · pointer only · 4c264554ae99a2ef · report
load_state_dict in 114 papers image-editing/my_diffusers/modeling_utils.py unverified no licence file found · pointer only · 77bd5e6e8ca8c91d · report
upsample_2d in 12 papers image-editing/my_diffusers/models/resnet.py unverified no licence file found · pointer only · 9a0acd22f4c9b83f · report
Repository not located 1 sample, 1 ran (1 instrument-failed) · 0 unverified
1 sample is identical to code Syntology harvested from another paper's repository; this paper's own copy was not located, so no repository is named and no licence is recorded.
chunk in 52 papers repository not located ran · our draft was wrong licence of this copy not recorded · 8241c0562bc710fd · report fixture: signature it:list/1/int, size:int/0/int · returned callable_iterator · level recorded, date not recorded

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