LanPaint: Training-Free Diffusion Inpainting with Asymptotically Exact and Fast Conditional Sampling
Authors: Candi Zheng
Yuan Lan
Yang Wang
Venue: Accepted by TMLR ()

Abstract: Diffusion models excel at joint pixel sampling for image generation but lack efficient training-free methods for partial conditional sampling (e.g., inpainting with known pixels). Prior works typically formulate this as an intractable inverse problem, relying on coarse variational approximations, heuristic losses requiring expensive backpropagation, or slow stochastic sampling. These limitations preclude (1) accurate distributional matching in inpainting results, (2) efficient inference modes without gradients, and (3) compatibility with fast ODE-based samplers. To address these limitations, we propose LanPaint: a training-free, asymptotically exact partial conditional sampling method for ODE-based and rectified-flow diffusion models. By leveraging carefully designed Langevin dynamics, LanPaint enables fast, backpropagation-free Monte Carlo sampling. Experiments demonstrate that our approach achieves superior performance with precise partial conditioning and visually coherent inpainting across diverse tasks. Code is available on https://github.com/scraed/LanPaint.

Published in Transactions on Machine Learning Research (10/2025)
LanPaint: Training-Free Diffusion Inpainting with Asymp- totically Exact and Fast Conditional Sampling
Candi ZHENG
cchenggaeBcomeccl.uuk ust.kk
Deportment of Mathematics, Hong Kong University of Science and Technology
Yuan LAN
glanaa@@comnet..ust..
Independent Reseorcher
Yang Wang
yangwanggust..
Department Mathematics, Hong Kong University Science and Technology
Reviewed OpenReview: https: openreview. net/ forum? id= JCC8,y0UUU
Eqqual Contribution. "Corrosponding author.
Abstract
Diffusion models excel at joint pixel sampling for image generation but lack efficient training- free methods for partial conditional sampling (c.g., inpainting with known pixcls). Prior works typically formulate this as an intractable inverse problem, relying on coarse varia- tional approximations, heuristic losses requiring expensive backpropagation, or slow stochas- tic sampling. These limitations preclude (1) accurate distributional matching in inpainting results, (2) efficient inference modes without gradients, and (3) compatibility with fast ODF-based samplers. To address these limitations, propose LanPaint: training-free, asymptotically exact partial conditional sampling method for ODE-basod and rectified-flow diffusion models. By leveraging carefully designed Langevin dynamics, LanPaint enables fast, backpropagatton-fii
Monte Carlo sampling. Experiments demonstrate that our ap- proach achieves superior performance with precise partial conditioning and visually coherent inpainting across diverse tasks. Code is available on httpss:/githuu..cmm//ee /wt.baacccccc/////////coooo LanPaint
1 Introduction
Denoising Diffusion Probabilistic Models (DDPMs)
(Sohl-Dickstein et al. 2015 Song & Ermon 2019a Song
et al. 2020c Ho et al. 2020 Rombach et al.
Betker et al. 2023) have emerged powerful generative frameworks that produce high-quality outputs through itcrative denoising. Subscquent advances in ODE- based deterministic samplers (Karras et al. 2022
2021
Lu et al. 2022 Zhao et al. 2023), well as equivalent rectified flow models (Lipman et al. 2022 Liu et al. 2022b Gao et al. 2025 have dramatically improved the efficiency of DDPMs, reducing the sampling steps from hundreds to dozens. These innovations, combined with model variants trained in the community, have broadened the scope and quality of the generative visual arts.
While diffusion models excel at whole-image sampling, their global denoising mechanism inherently limits partial conditional sampling given partially known pixels. The key question is
Given p(x,y), how to sample from p(xly)
More rigorously, for a pretrained model p(z) with arbitrary splitting z = (x,y), y), sampling x ~ p(xly) in training-freo way remains a fundamental challenge for diffusion models. Current approaches fall into
two categories: (1) Sequential Monte Carlo (SMC) methods (Trippe al.) 2022 Wu et al.) 2024h. They depend stochastic DDPM sampling, making them incompatible with deterministic ODE samplers and

---

Published in Transactions on Machine Learning Research (10/2025)
Stable Diffusion 3.5
HiDream 11 dev
Flux.1 dev
Stable Diffusion XL
Original Masked
LanPaint Inpaint Output
Original & Masked
LanPaint Inpaint Output
Figure 1: Demonstration of LanPaint-5 (5 inner iterations) inpainting results on HiDream-L1 HiDream.at
2025), Flux.1 dev (Labs, ) SD 3.5 Essse et al.) 2024) and XL (Podell et al. 2023 Images are generated
through ComfyUT (Comfy Org 2025) with Fuler sampler (Karras al. 2022) (30 steps). All samples
generated from fixed seed (seed=0) producing a batch of 4 distinct random latents avoid cherry-picking, These results demonstrate LanPaint's practical effectiveness across modern diffusion architectures, including both rectified flow (HiDream, Flux, SD 3.5) and denoising (SD) XT.) models.
computationally expensive; and (2) Langevin Dynamics Monte Carlo (LMC) methods (Lugmayr el al. 2022 Cornwall et al. (024)). They can be treated as iterative denoising and renoising, making them compatible with ODE samplers. But they suffer from convergence issues (Cornwall al. 2024h and local maxima trapping key limitation analyze in this work.
linear inverse problem, where observed pixels y Hz + arise from a known degenerate operator // and Gaussian noise e. These methods approximate the intractable posterior qzlyy) using the diffusion prior p(z) through either houristic losses ([ly Hzl or DDIM-based
Another line of work formulates inpainting
variational inference (Chung al.] 2022a
Grechka et al. 2024: Kawar et al. 2022: Zhang et al. 2023a
Janati et al., 2024 Ben-Hamu et al.) 2024). While lincar inverse problem applicable other generative
models (e-g., GANs (Goodfellow et al. 2014)) and tasks such as deblurring, they fundamentally address
different problem: The posterior qzlly) heuristic approximation that aims to construct visually plausible (x,y) without requiring to follow exactly the joint distribution p(z) modeled by the pretrained diffusion model.
Training-bast based approaches ZZhang et al. 2023b Mayet et al.) 2024 Zhuang et al. 2024 also address con- ditional sampling and achieve good performance. However, these methods require training of specializod networks modules for each model architecture, making them impractical for adoption across business and community models of diverse architectures, hindering their ecosystem development.
2

---

Published in Transactions on Machine Learning Research (10/2025)
In this work, propose LanPaint, training-free and efficient partial conditional sampling method based on Langevin Dynamics Monte Carlo, tailored for ODF-based diffusion samplers and rectified flow models. LanPaint achieves asymptotically exact partial conditional sampling without heuristics. It introduces two core innovations: (1) Bidirectional Guided (BiG) Score, which enables mutual adaptation between inpainted and observed regions, and avoids local maxima traps caused by ODE-samplers with large diffusion step sizes. This significantly improves inpainting quality; and (2) Fast Langevin Dynamics (FLD), an accelerated Langevin sampling scheme that yields high-fidelity results in just 5 inner iterations per step, drastically reducing computational costs compared to prior Langevin methods. Experiments confirm that LanPaint outperforms existing training-free approaches, delivering high-quality inpainting and outpainting results for both pixel-space and latent-space models.
2
Related Works
2.1 ODE-based Sampling Methods and Rectified Flow
Vanilla DDPMs are slow, requiring numerous denoising steps.
Acceleration strategies like approximate 2022a Song et al. 2020a, Zhao et al. 2023) and advanced
diffusion processes (Song et al., 2020c Liu et al.
ODE solvers (Karras et al. 2022 Lu ct al. 2022
Zhao et al. 2023 convert stochastic DDPM sampling into
deterministic ODE flows, anabling larger lime steps and laster generation, dominating current diffusion model
sampling. Rectified flow (Lipman et al. 2022 Liu et al. 2022b), a recent alternative, is a reparameterization
of ODE-based diffusion models with improved numerical properties. As shown by (Gao et al.] 2025), it also belongs to the ODE sampling family,
2.2 Training-Fres Partial Conditional Sampling with Diffusion Models
While DDPMs have achieved significant success, they lack inherent support for partial conditional sampling with partial observations.
One family of works tackling this problem is Langevin dynamics Monte Carlo (LMC). This approach pioneered by RePaint (Lugmayr et al. 2022). which employs a "time travel' mechanism of iterative denoising and renoising steps. This mechanism was later shown by (Cornwall et al., 2024) to be equivalent to LMC. A crucial advantage of this formulation is that it enables easy switching between stochastic and ODE sampling, by simply switching the denoising step from SDE to ODE.
LMC
The original RePaint framework relies on computationally intensive DDPM sampling and suffers from con- vergence issues. TFG (Cornwall et al. 2024) addresses the convergence issue by reformulating RePaint's 'time travel" mechanism as an independent Langevin dynamics. However, their approach remains confined to DDPMs and does not extend to more efficient ODE-based solvers. (Janati et al. 2024 also used Langevin
dynamics for linear inverse problems to reduce bias in optimizing the heuristic loss Iy - Hz but the heuristic prevents accurate partial conditional sampling.
In this work, we first adapt both RePaint and the Langevin dynamics approach from (Cornwall et al. 2024) to an ODE sampler as our baseline. Through this implementation, we identify their common limita- tion susceptibility local maxima trapping and subsequently address it with our proposed bidirectional guidance.
SMC Alternative approaches based on Sequential Monte Carlo (Wu et al. 2024 Trippe et al. 2022 provide exact partial conditional sampling but remain computationally expensive, requiring hundreds of steps and large filtering particle sets. While (Wu et al. 2024) developed a more efficient SMC variant, their method still depends on DDPM's probabilistic framework, making it incompatible with deterministic ODE-basod solvers.
Linear Inverse Problems Methods basod on lincar inverse problems target plausible inpainting results rather than exact partial conditional sampling. These approaches infer z from observations y under the model y Hz + e, where H is known degenerate operator and e represents Gaussian noise.
3

---

Published in Transactions on Machine Learning Research (10/2025)
One approach minimizes heuristic losses y Hz p. in MCG Chhng al. 2022b) DPS (Chung et al.
2022a), GradPaint (Grechka et al. 2024), DCPS (Janati et al. 2024), and D-Flow (Ben-Hamu et al. 2024 However, most of these methods are tailored for stochastic DDPM samplers without easy migration to ODE samplers (e.g. DCPS), requiring costly full-model differentiation or expensive optimization (c.g., line search in D-Flow). For our baselines, we select only those compatible with ODE samplers and free from line search.
Another approach uses variational inference in the DDIM framework, such as DDRM (Kawar al, 2022). CoPaint (Zhang et al. 2023a) and MMPS (Rozet et al., 2024 also adopt variational inference and
to improve the optimization of heuristic losses and enhance stability, While DDIM enables fast deterministic sampling, its variational approxinations introduce limitations.
While we include these inverse problem baselines for comparison, they differ fundamentally from partial conditional sampling. Linear inverse problems (effective for inpainting) do not enforce matching the joint distribution between inpainted and known regions-a core requirement of our approach. Morcover, mini- mizing the heuristic loss lypically requires 2 times more GPU memory than standard inference, making it prohibitive for production-level models on consumer GPUs. Accordingly, these baselines are included supplementary reference points rather than essential benchmarks.
2.3 Trained Partial Conditional Sampling with Diffusion Models
While joint diffusion models lack inherent partial conditional sampling capability, inpainting be achieved by training conditional diffusion models with external guidance. Approaches like ControlNet (Zhang et al. 2023b) (using depth/canny maps), TD-Paint (Mayet et al.) 2024), and PowerPaint (Zhuang et al. 2024) demonstrate this, but require training specialized modules for each architecture, limiting their practical adoption across diverse diffusion models. This rraiiin--dependen paradigm hinders ccosystem development around new large-scale models, highlighting the need for generalizable, architecture-agnostic inpainting so- lutions.
3 Background
3.1
Langevin Dynamics
Langevin Dynamics is a Monte Carlo sampling technique, For a target distribution p(z), the dynamics is governed by the stochastic diffcrential equation (SDE):
dz, = s(z,) dr + V2dW.,
(1)
where s(z) Vx poz) It asymptotically converges to the stationary distribution z, ~ p(z) as T +
(Appendix B However, this method risks trapping samples at local likelihood maxima of p(z).
3.2 DDPM and ODE Based Sampling
DDPMs learn a target distribution p(z) by reconstructing a clean data point Zo ~ p(z) from progressively noisier versions. The forward diffusion process gradually contaminates zo with Gaussian noise. A discrete- time formulation of this process is:
0r. V1- or, E Isign
(2)
where é, ~ I) is Gaussian noise. This arises from discretizing the time Constein-Uhlenbedd (OU) process:
dz; = 1 24 dt + dW, where a, = - and dW is a Brownian motion increment (Appendix The OU process ensures z; transi- tions smoothly from the data distribution p(z) to pure noise (0,
(3)
To sample from p(z), we reverse the diffusion process. Starting from noise Zy N(O, I), the SDE and ODE backward diffusion processes are:
SDF: dzy (3 + s(ze, T 11)) di' + dW ODF: dzy (2r s(2, T (')) dt'
(4)
4

---

Published in Transactions on Machine Learning Research (10/2025)
where t' E [0, T| is the backward time, t T t', and s(z,t) = Vz (z is the score function of the random variable 24, which guides noise removal. The score function is usually learnt a denoising neural network (Appendix C and Dj. The recent popular flow matching model, though commonly thought as a different architecture, also falls into this category (Appendix
3.3 Inpainting as Partial Conditional Sampling
Unlike many works treating inpainting as solving an ill-posed inverse problem, we treat inpainting as a partial conditional sampling problem for diffusion models: given a joint distribution of images (DDPM). how to sample one part given the other part of the image. Partial conditional sampling in DDPMs poses a significant challenge due to the inaccessibility of the conditional score function. A DDPM is trained to model a joint distribution p(z) y)x.y), where is the whole image, x denotes the region be inpainted, and y denotes the region to be observed. But partial conditional sampling aims to generate x p(x y = =y); where Yo is the observed region of given image. During the sampling process, DDPM's denoising network is trained to provide these joint scores:
yx = V logy,(x,y);: sy(x,y,t) = Vy (x.
(5)
for every time t. However, the conditional score
Sx Vx log yo) = V lo, yo);
(6)
which is required for direct sampling from p(x yo), remains inaccessible. (The second equality holds because x and y are conditionally independent given yo.)
Decoupling Approximation Rather than tracking the unknown distribution px yo), we can approx- imate it as an allernative distribution y yo):
pe(x, yo) R y yo) = pc(x y) Pe yy).
This decoupling introduces dependencies between x, and y: - unlike the original DDPM framework, where x; and yt are independent given yo. In particular, the approximation (=) becomes exact (=) at =0 because py yy)) 6(y yo), ensuring that the final output still follows precisely p(x y yy.)
Here, pr(y yo) is analytically known from the forward process (y yo) N(y Varyo, (1 a. I)), while (x y) shares the same score Sx as the joint distribution in Eq 5) This makes the approximation tractable in practice. The only problem that remains is how to let the DDPM generate samples from (x, yo) instead of (x( y) during the sampling process.
The Replace Method During backward diffusion sampling with t' = T -tt, approximately samples Xe, Yv -r---(xx y yo) by replacing unconditionally sampled ye with
t, (Song & Ermon 2019b
Ye (y- Iyo)
for each time step of sampling process. correctly samples yr, but fails to ensure x (x This yields mix between unconditional and partial conditional sampling
(xr Between (prneen[[prreee (x. y) and [qr-e ly)]
(9)
While straightforwwrd, this method is inaccurate. In inpainting tasks, for example, it may create sharp boundaries between the conditioned and unconditioned regions (Lugmayr et al. 2022).
RePaint [ugmaay et al. 2022 improves over the Replace Method by introducing "time traveling" step that refines Xy. Between two backward diffusion times 1/ = T- f, and t/41 = T f411, it performs multiple inner iterations, alternating between forward and backward diffusion steps:
(k+1) Forward a
Backwarde--eus
(10)
Rq
Eq (SDE) and Sx

---

Published in Transactions on Machine Learning Research (10/2025)
Mcanwhile, Ye is still replaced each step by Eq As this work focuses on ODE sampling. we replace RePaint's SDE backward steps with an ODE backward (Euler ODE sampler (Karras et al. 2022 and name this adaptation Repaint-Eules
By adding forward and backward together, Repaint effectively simulates a Longevin dynamics Eq I with dr = 1 - 142 whose stationary distribution Pt, (x y)- Therefore after sufficient. iterations, RePaint asymptotically produces samples from qe(x, y yo).
RePaint's key limitation is that its step size dr is fixed by the backward sampling schedule. A small number of sampling steps leads to overly large step sizes, causing divergence, while too many steps result in excessively small step sizes, preventing convergence to a stationary state.
Langevin Dynamics Methods Recent work (Cornwall et al. 2024 replaces forward-backwand iteration
with Langevin dynamics, enabling flexible step sizes. However, two key limitations remain: (1) Samples
Xy' often get trapped local maxima of (x y) (Fig (2) Slow convergence necessitates many costly inner-lopp iterations per diffusion step, reducing efficiency.
4 Methodology
4.1 Bidirectional Guided (BiG) Score
In RePaint and Langovin-based approaches, the inpainted region Xy backward diffusion time i' is iterated towards high likelihood region of pr-e(( y), but the observed region Ye remains unaware of xy. This one-way dependency creates a critical flaw: if Xy enters suboptimal region, Yr cannot receive corrective feedback, resulting in local maxima trapping of xy (Fig 3). To escape such local optima, we propose to jointly optimize Xy and yv through bidirectional feedback: while X is refined by yv (as in prior work), yr is also updated under the guidance of X while preserving observed content.
To achieve this, we observe that Eq is a special case of the following equivalent but more general form
1 (x yo) y yo) Z pc(x y)
pe(y Pelyj*
(11)
with Yo as the observed region of given clean image, >> -1 as the guidance scale and Z is normalizing constant. At / = 0, the approximation (>) still becomes exact (-), which means that a sampled x from 9x also a sample of the desired conditional distribution p(x yo) at = 0. The '=' holds at t= because Po(y Yo) = 5(y - yo) delta distribution that remains invariant (up to normalization) when multiplied by other functions. Therefore P still represents 8(y yo), enforcing that the sampled Yr=o equals y..
Przoly)
Now the only problem that remains how to let the diffusion model generate samples from gr with Langevin dynamics. The component of the score function of qr is still Sx in Eq while the y component score be approximated by the BiG score
gx (xx,,11) (1 (1+
Vā.yo -y
Sy (x ].
(12)
Score of p(y: (Dc))
Score p(y:/yo)
which is obtained by substituting py()) (x p. (xly) into Eq 11 then discarding the unknown term Vy log
It successfully incorporates information of x, as guidance for the sampling process.
The BiG score's behavior depends on A: when = -1, it reduces to unconditional sampling: at = 0, it matches RePaint-like inpainting; and for X > 0, enhances inpainting by penalizing unconditional scores Sy. Larger À values strengthen the corrective feedback from X2, helping y: escape local optima more effectively.

---

Published in Transactions on Machine Learning Research (10/2025)
The BiG score can be implemented by simulating the following Langevin dynamics:
dxg (x( yv. T t') + v2dW,, dy: gx yr, -1) dr + V2dwy,
(13)
BIG score
Though the unknown Vy log (xly)) term is discarded when deriving the BiG score, still yields asymptot- ically exact conditional samples given partial observation, this term is negligible (See Fig 9. Appendix near t = 0 compared to the score of pr(y)yo), as the following theorem states:
Theorem 4.1 (Asymptotic Exact Conditional Sampler). Under the dynamics of Eg 13 the joint state (x) conweryes lo the distribution
1 Xt, Yt ~ Z Pc( yy) Pe(viy.) pi(y)A + +O(vI-
(14)
where Z is normalizing constont. Consequently, at t= 0, the marginal xo po yo) is exact conditional sample, provided the Langevin dynamics converges. (Proof in Appendiz
In summary, the BiG score enables bidirectional feedback between Xx, and yo,, avoiding local maxima trapping while preserving the exactness of conditional sampling.
4.2 Fast Langevin Dynamics (FLD)
Solving Langevin dynamics (Eq 13 is challenging: direct discretization requires trading step size against performance. Large steps accelerate convergence but introduce significant errois that yield noisy results, while small steps cause impractically slow convergence. We therefore seek an acceleratod scheme with a stable solver, ensuring fast convergence the stationary distribution while tolerating larger steps.
For fast convergence to the stationary distribution, existing approaches include Underdamped Langevin Dynamics (ULD) (Duncan et al.) 2017 Cheng et al. 2018), preconditioning (AlRachid et al. 2018 and HFHR Li et al. 2022). We exclude Metropolis-Hasting and Hamiltonian Monte Carlo, as their acceplance- rejection steps require multiple score evaluations per step -a-ihhhih is too expensive compared to standard Langevin dynamics' single evaluation.
After balancing interpretability, stability, and accuracy (Appendix we propose Fast Langevin Dynamics (FI.D)= a variant of ULD defined by:
dz, qr dr
(15)
dq, = r
(-rr--o0 (-q, dr + s(z,, dr V2dW.)
where is the "time" of Langevin dynamics, 2, (x,, contains both the inpainted/known region, r is the friction coefficient, 9- is the momentum. This dynamics is solved numerically using the FLD solver Eq 115 which computes Zr+Ar analytically from 2,. Details about FLD and its solver are discussed in Appendix and Algorithm
The FLD and its solver incorporates two key design features: (1) It introduces momentum qr into the Langevin dynamics. Comparing with revelss that 15 represents a tine-averaged Langevin dynamics with decay rate r. This time averaging acts momentum by incorporating memory of previous states, thereby accelerating convergence towards the stationary distribution. (2) We introduce diffusion damp- ing force when solving FLD mumerically to enhance stability. The diffusion damping force is introduced by decomposing the score function as s(2,,1) = (2,),) - A,z in the FLD solver. The term C,(z,) ) is treated + Ar], while the diffusion damping force -A, serves as regularization inspired by the forward diffusion process, ensuring that 2,+ remains finite and stable, even for large AT.
as constant over a numerical time interval [T, +
To understand how the diffusion damping force is related to the diffusion model and enhances stability, consider A, = (1-āz)- -1, As AT + 00, ZrtAr remains finite and stable, following:
lim Z++Ar ~ N (v Voyza, ãe) A0
(16)

---

Published in Transactions on Machine Learning Research (10/2025)
Lorfun310 190 10
Lantont
Copain-10
2011
KL-JReereece (Log Scale)
citfusion steps
Inner Iteration Stops
Figure Comparison of inpainting methods for conditional distribution sampling (known y, inpaint x).
Left: Ground truth Gaussian samples. Middle: KL divergence versus diffusion steps across methods ("-10" denotes 10 inner iterations where applicable). Right: Effect of inner iterations at 20 diffusion steps. The dashed line at KT=0.01 highlights the performance gap wetween asymptotically exact methods and heuristic. approaches.
where 2g (1=((=)))s the Tweedie estimator for the clean image. This matches the forward diffusson Vou
process in [2 ensuring stability. Thus, large time steps can accelerate convergence without compromising output stability.
A key property FLD that preserves the stationary distribution of the original Langevin dynamics, shown in the following theorem.
Theorem 4.2 (Stationary Distribution). Under the fast Longevin dynamics Eq 15 the joint state (z, q) has stationary distribution given by
(. ~ p(z) x N(q 0, r).
(17)
Hence, alone relains the same stalionary distribution as the original Langevin dynamics Eq 1 (Proof in Appendir H
4.3 Rectified Flow Model Compatibiliy
We have introduced LanPaint using variance-preserving (VP) notation (Song et al. 2020c), corresponding to the forward diffusion process in Eq 2 However, LanPaint is not limited to VP notation; it general enough apply other mathernttcally equivalent. diffusion frameworks, such as variance-exploding and rectified flow notations (Liu al. 2202bb) by converting the score function into an eps-prediction or velocity prediction function, respectively. Detailed conversions among VP, variance-exploding, and rectified flow
notations are provided in Appendix
4.4 Generalization Arbitrary Dimensions
LanPaint's core formulations, the BiG score (Eq. 12 and FLD (Eq.
15 are dimension-agnostic operating on joint scores s(x,y,) for arbiteary-dinnnnsonaal lensors z = (x E Rd (d 2 1) without 2D-specific assumptions. This enables exact conditional sampling x ~ p(x y) across modalities (e.g., 1D audio soquenees, 2D images, 3D volumes, spatio-temporal data such as vidco). As an example, we extend LanPaint video inpainting, treating video as tensor Fxxxx (stacked frames z(f) E HxW f 1.....)) with static masks in 5.6
8

---

Published in Transactions on Machine Learning Research (10/2025)
5 Experiments
5.1 Conditional Gaussian:
Exactness of LanPaint
We validate the exactness of LinPaint a synthetic 2D conditional Gaussian benchmark with an analytically known ground truth distribution and score function. This sctup climinates diffusion model training effects, allowing for an isolated comparison of sampling methods.
The task conditions on the y component to infer the x component. We compute the mean and covariance matrix of 50,000 samples and compare them with the ground truth distribution using KL divergence. Fig shows the method comparisons across three plots: Ground Truth, KL Divergence vs. Diffusion Steps, and KL Divergence vs. Inner Iteration Steps. We adopt the same step size for Langevin based methods (TFG and LanPaint).
Fig also demonst that LanPaint achieves near-zero KL divergence with the fewest diffusion steps and inner iteration steps, outperforming other methods. Fig Fright) (right) also highlights that fast Langevin dynamics (FLD) alone, without BiG score, significantly accelerates convergence compared to the TFG method adopting the original Langevin dynamics.
A key observation is that heuristic linear inverse problem approaches (MCG, DPS, CoPaint, DDRM) cannot achieve KL divergence below 0.01 (dashed line) even with large number of steps or iterations, while exact conditional sampling methods (RePaint, TFG, LanPaint) succeed. This performance gap reflects their fundamental methodological difference: the former optimize heuristic objectives rather than the true distribution.
5.2
Mixture of Gaussian: Local Maxima Trapping
1.7
Steps, LasPoint (B16 FLD) 20 Stops, Lar iFLD
stops Langesis
100 sesp Langovin
400 st0% Langovih
700 staps Langevin
1.50
local maxima
-200
Nogat global maxima
global maxima
0.7
0.0
3.0
1.5
y
Figure 3: Local maxima trapping inpainting x given known y using Fuler sampler Karras al. 2022
Red dots show unlikely samples trapped at local maxima of p(zly 1.55) (along the dashed line). Fewer diffusion steps (right left) increase trapping key limitation of fast. ODE sampler. Left panel shows LanPaint's ' BiG score mitigates this issue. Methods perform 10 inner iterations/ster (LanPaint, Langevin)
We validate LanPaint 500-component Gaussian mixture benehmark with analytical ground truth dis- tribution. Its samples demonstrated in Fig 4 The task is framed 2D inpainting: given observed g-coordinates, infer masked u-values.
The multi-modal Gaussian mixture distribution poses significant challenge for inpainting with ODE sam- plers. As shown in Fig Langevin- based inpainting tends to concentrate samples at the 'corners' of the distribution- maxima of p(ally)desppte despite their low joint likelihood (æ, y)- This trapping phenomenon is not unique to Langevin methods; Fig shows that other approaches also produce samples clustered at the corners, where the distribution appears blurred.
Such trapping occurs due to insufficient information flow from the inpainted component æ to the observed y. During diffusion sampling, æ optimizes solely for p(æly), with no mechanism to penalize low p(y[æ). This motivates our BiG score [2 which propagates information from x to y, steering samples away from low joint-likelihodd regions, as shown in Fig3
Fig compares sampling results and KL divergences across methods. Due to local maxima trapping, no method achieves zero KL divergence. However, LanPaint achieves significantly lower divergence than alter-
9

---

Published in Transactions on Machine Learning Research (10/2025)
Ground Trush
Repace KL:0.772
DORM KL:0.763
MCG KL-0
DF5 KL 0.547
CoPaint-10 KL:07233
To Piiooonn to
Known by)
Repaint-Fulee- KL.0.490
Langevin-3 KL:0.410
Repa nS-Eule--10 Langevin-10
LanPaint-5 KL:0.251
LanPaint-10
Figure 4: Inpainted samples and KL divergence for inpainting methods a Gaussian mixture distribution. The top-left panel displays ground truth samples; other panels show inpainted samples of various methods. ("-5" and 1-10" denotes 5 or 10 inner iterations where applicable)
natives, demonstrating its effectiveness in mitigating trapping and producing accurate inpainting that closely matches the ground truth distribution.
5.3 Latent and Pixel Space Model: CelebA and ImageNet
Table 1: LPIPS and FID comparison on CelebA-HQ-256 for various inpainting and outpainting setups. Fuler Discrete Sampler, 20 steps. Lower LPIPS and FID values indicate better perceptual similarity and feature distribution similarity to the ground truth, respectively. Numerical suffixes (-5, -10) denote inner iterations (network evaluations per sampling step, except for CoPaint which requires multiple evaluations per inner iteration). Time per sample and memory overhead (extra memory required during inference) are also reported. Exaluations were conducted single RTX 3090.
Box
Half
Checkerboard
Outpaint.
Time
MemOver
Method
LPIPS
LPIPS
LPIPS
FID
LPIPS
FID
s s/image
MB /ituage
Hearistic Methods
Replace
0.131
31.7
0.303
30.3
0.162
42.1
0.514
89.5
CoPaint-2
0.180
43.6
0.346
35.7
0.252
79.8
0.546
107.6
1.7
CoPaint-3
41.7
0.331
34.4
0.225
66.6
0.532
99.5
DDRM
0.128
0.308
33.5
0.148
30.0
0.537
94.6
MCG
0.130
31.6
0.302
30.2
0.162
42.4
0.513
80.7
248
DPS
0.181
44.1
0.345
35.4
0.275
90.6
0.534
99.9
0.8
247
Asymptotically Exact Methods
Repaint-Euler-5
0.115
34.5
0.282
39.4
0.137
29.8
0.526
96.2
Repaint-Euler-10
0.112
34.6
0.272
41.0
0.134
31.0
0.511
95.9
TFG-5
0.119
31.9
0.299
35.9
0.132
25.5
0.531
91.0
1.5
TFG-10
0.114
33.2
0.288
38.5
0.128
26.3
0.530
91.5
2.6
LanPaint-5 (ours)
0.105
27.9
0.268
30.4
0.108
20.5
0.493
82.3
1.6
81
LauPaint-10 (ours)
0.103
29.5
0.272
32.2
0.107
21.3
0.489
85.1
2.9
81
We evaluate the inpainting performance of LanPaint on the CelebA-HQ-256 (Liu al. 2015) and ImageNet-
256 (Deng et al. 2009) datasets, leveraging pre- pre-trained latent (Rombach al.) 2021 and pixel space (Dhari- wal & Nichol 2021h diffusion models, respectively. The experiments assess reconstruction quality across various mask geometrics, including box, half, checkerboard, and outpainting. Following the same setting as the previous works (Kawar et. al.) 2022 Chung el. al. 2022b), perceptual fidelity is quantified through LPIPS (Zhang et al. 2018) and FID metrics, calculated on 1,000 validation images per dataset. Results are presented in Tables and We also provide qualitative visualization of generated samples in Fig and Fig G All methods employ consistent parameters across tasks and masks, utilizing a 20-step Euler Discrete Sampler. Further details about. parameters provided in Appendix
10

---

Published in Transactions on Machine Learning Research (10/2025)
Table 2: LPIPS and FID comparison on ImageNet for various inpainting and outpainting setups. Euler Discrete Sampler, steps. Lower LPIPS and FID values indicate better perceptual similarity and feature distribution similarity to the ground truth, respectively, Numerical suffiees (-5, -10) denote inner iterations (network evaluations per sampling step, except for CoPaint, which requires multiple evaluations per inner iteration). Time per sample and memory overhead (extra memory required during inference) are also re- ported. Evaluations were conducted on a single RIX 3090.
Box
Half
Checkerboard
Outpaint
Time
MemOver
Method
LPIPS
FID
LPIPS
FID
LPIPS
FID
LPIPS
FID
//image
MB /image
Heuristic Methods
Replace
0.229
75.7
0.380
69.0
0.406
146.4
0.565
98.2
1.9
581
CoPaint-2
0.234
85.1
0.379
63.4
0.319
186.3
0.565
102.1
15.7
5444
CoPaint-3
0.228
76.9
0.371
60.8
0.276
146.9
0.337
94.8
22.4
5445
DDRM
0.216
67.2
0.385
60.2
0.214
58.1
0.570
81.6
583
MCG
0.225
83.5
0.378
82.2
0.429
152.9
0.561
106.8
6.4
5445
DPS
77.2
0.510
275.7
0.572
112.1
Asymptotically Exact Methods
Repaint-Eulers
0.216
62.8
0.385
56.5
0.137
31.4
0.579
82.9
11.8
581
Repeint-Euler-10
0.215
61.0
0.383
53.5
0.135
32.8
0.564
79.8
20.5
TFG-5
0.235
69.3
0.418
67.6
0.317
78.6
0.654
92.1
11.9
TFG-10
0.234
0.433
64.3
0.247
53.9
0.682
89.4
21.7
LanPaint-5 (ours)
180
49.3
0.323
49.3
0.127
24.1
0.508
68.6
11.3
599
TanPaint-10 (ours)
0.171
46.4
0.314
44.7
0.117
21.2
0.486
62.0
20.8
599
Original
Masked
CORM
MDG
CoPaint22
CoPain-3
Repaints Repaims-10 LarPared LanPaim 10
Figure 5: Visual comparisons on ImageNet-2566 for center box, half, outpaint and checkerboard masks (top to bottom). Numbers 5 and 10 denote the inner iteration counts for RePaint, TFG, and LanPaint. The bottom row zooms into the checkerboard results (fourth row), highlighting LanPaint's superior coherence and texture fidelity compared to baselines, which exhibit visible checkerboard artifacts.
LanPaint consistently achieves superior LPIPS and FID scores across most test scenarios, demonstrating robustness, particularly in challenging checkerboard and outpainting tasks. In contrast, methods such as DPS (Chung et al.) (022a) and CoPaint (Zhang et al.] (022a)), designed for stochastic sampling with 250-500 steps, exhibit reduced performance in the 20-step ODE setting.
Notably, DPS and CoPaint's removing of the manifold constraint from MCG (Chung et al. 2022b com- promises their stability, leading to poorer performance compared to MCG, which remains robust among heuristic methods. This contradicts prior findings in stochastic DDPM sampling, where removing the man- ifold coistraint. typically enhances performance.
On CelebA-HQ-256, Replace (Song Ermon 2019b) marginally outperforms LanPaint in FID for the half- mask scenario (30.3 vs. 30.4), result attributed FID's high variance when large inpainted regions deviate significantly from the original images. This variance is exacerbated by the use of 1,000 validation images,
11

---

Published in Transactions on Machine Learning Research (10/2025)
Original
DORS
MOG
CoPank-2
CoPans-
TFG-6
TFG-10
Repained
Rupaini-1 LanPart-6 LanFain: 50
85
6
U5
Figure 6: Comparative visualization of in- in-painted images in CelebA-HQ-2555 dataset. for center box, half, outpaint and checkerboard masks (top to bottom). Sampler: EulerDiscrete, 20 Step. For visualization purposes, masks are shown on the original pixel images, although they were applied within the 64 x 64 x latent space during the inpainting process.
opposed to the typical 30,000 for highly divergent sets, similarly affecting outpainting results. Consequently, FID scores for half and outpainting masks should be interpreted cautiously.
Beyond perceptual metrics, computational efficiency is critical for practical deployment. We report time per sample and memory overhcad (MemOver), defined the additional GPU memory roquired during inference beyond model loading (i.e., maximum GPU memory during inference minus maximum before inference). Evaluations were conducted on a single RIX 3090. On CelebA-HQ-2550 LanPaint-le 10 delivers top-tier performance with time and memory overhead comparable to Repaint and TFG. On ImageNet- 256, LanPaint-10 uses 20.8 s/image and 599 MB/image, comparable to Repaint (20.5 s, 581 MB) while achieving superior LPIPS and FTD scores. Notably, Lan Laina''''s memory overhead is low compared to heuristic methods requiring backpropagation for gradient computation, such as MCG, DPS, and CoPaint (5445 MB ImageNet), whose overhead scales with model size, rendering them less practical for large models where loading alone nearly exhausts GPU memory. These results highlight LanPaint's 's effective balance of high fidelity and resource efficiency.
5.4 Ablation Study
Table 3 presents the ablation study of LanPaint's major components: the BiG score and FLD, along with the impact of step size on performance. The study is conducted on two datasets, CelebA-HQQ256 and TmageNet., using the box inpainting tasks (Other masks share similar trends). Results are reported for five different step sizes (0.02, 0.05, 0.1, 0.15, and 0.2) with LPIPS and FID metrics, where lower values indicate better performance. Sensitivity of other parameters is provided in Fig
For the ImageNet dataset, the ablation study demonstrates that both the BiG score and FLD significantly contribute to overall performance. Without FLD, the Langevin dynamics diverge as the step size increases from 0.05 to 0.15, resulting in progressively worse performance metrics. However, incorporating FLD sup- presses this divergence, cnabling the use of larger step sizes and improving performance. The BiG score enhances performance by facilitating bidirectional information flow between the inpainted and known re- gions, while FLD supports larger step sizes, accelerating the convergence of the Langevin dynamics and yielding better results with the same number of iterations.
In contrast, for the CelebA-HQ-226 datasel, performance metrics exhibit low sensitivity to step size varia- tions. The BiG score is the primary driver performance improvement over the original Langevin dynamics, with the method remaining robust across step size changes. This stability is attributed to the robustness of CelebA-Ho BaobA--Q-200 HH--HHQ22555 256's latent space, which, unlike pixel space sampling, is less affected by subtle variations in the sampling process.
12

---

Published in Transactions on Machine Learning Research (10/2025)
Table 3: Ablation study of LanPaint- 10's components on CelebA-HH-225 and ImageNet with box inpainting. Results for different step sizes (0.02, 0.05, 0.1, 0.15, 0.2) are shown with LPIPS and FID metrics. Lower values are better.
Step Size 0.02
Step Size 0.05
Step Size 0.1
Step Size 0.15
Step Size 0.2
Method
LPTPS
FID
LPIPS
FID
LPIPS
FID
LPIPS
FID
LPTPS
FID
CelebA-HQ-256
None (Langevin)
0.121
28.9
0.115
28.4
0.111
29.2
0.114
30.9
0.108
30.1
BIG score
0.110
26.1
0.104
26.5
0.102
28.5
0.103
28.7
0.103
30.0
FL.D
0.121
28.6
0.115
28.9
0.112
29.9
0.116
31.7
0.109
30.5
(BIG score + FLD)
0.111
26.7
0.105
26.6
0.103
28.5
0.103
29.5
0.103
30.2
ImageNet
None (Langevin)
0,220
66.7
0.223
65.1
0.314
81.6
0.441
125.9
0.475
141.1
BiG score
0,205
58.6
0.213
38.0
0,303
76.0
0.431
121.4
0.474
140.0
FLD
0.217
68.3
0.205
60.7
0.195
56.9
0.188
54.4
0.181
51.4
(BiG score + FLD)
0.201
58.9
0.190
52.7
0.179
48.1
0.171
46.4
0.167
45.1
5.5 Production-Level Model Evaluation Across Architectures: Stable Diffusion, Flux, and HiDream
Previous evaluations of LanPaint limited academic benchmarks, leaving its performance real-world production diffusion models wicee to the best of our knowledge, no prior training-free inpainting methods, except variants of the replace method (built in ComfyUI), have demonstrated such validation in their publications or been implemented by third parties for this purpose.
with their diverse architectures and higher resolutions unexamined. Notably,
To assess LanPaint's effectiveness on modern generative models, we implemented (HiDream.a) ail 2025), Flux.1 Dev (Labs 2024). Stable Diffusion 3.5 (Esser et al. 2024 and Stable Diffu- sion XL. (Podell et al.
on HiDream-LI
Images were generated using ComfyUT (Cooffy Org 2025 with the Euler (30 steps), fixed seed of O, and batch size of 4 to ensure reproducibility and avoid cherry-picking. These experiments deeonsstaat LanPaint's 's practical ellicacy across diverse diffu- sion architectures, including rectified flow models (HiDream-LL, Flux.1, Stable Diffusion 3.5) and denoising diffusion probabilistic models (Stable Diffusion XL). Additionally, we have released LaiPaint as a publicly available, plug-and-play exlension for ComlyUI.
2023
sampler (Karras et al.
2022
Fig D showcases the inpainting results. We also provide more examples in Appendix [ LanPaint consistently produces scamless inpainting across both DDPM-based (Stable Diffusion XL) and rectified flow-based (Stable Dilfusion 3.5, Flux.1, HiDream-L1) architectures, highlighting ils robust generalization capabilities.
5.6 Video Inpainting Results
We demonstrate LanPaint's dimension-agnostic formulation on video inpainting and outpainting using the Wan 2.2 T2V model Wan et al. (2025) (14B parameters, fp8-scaled). Our setup processes 40-frame, 480p clips using Euler ODE sampling with 20 steps and two LanPaint inner iterations. Fig. highlights these capabilitics. These results affirm Lan Paint's versatility for vidco editing. Full videos are available https:
Limitation and Future work
LanPaint's exactness comes cost: it heavily relies the score interpretation of diffusion models. This interpretation, while applicable to various architectures such as variance-presorvingg variancc-exploding, and flow matching, is valid only for models Irained from scratch, not for distilled models trained without denoising or flow matching. Our experience shows that LanPaint's performance degrades with distilled models. Future studies on distillation methods that preserve the score interpretation of diffusion models are desired. A distillation method that captures LanPaint's capabilities within model is also of interest, as it could significantly accelerate LanPaini.
13

---

Published in Transactions on Machine Learning Research (10/2025)
Frame Frame
Frame
Frame 30
Inpainting Input
Add white fascinator
Inpainting
LanPaint-2
Outpainting Input
Outpainting LanPaint-2
Figure 7: LanPaint-2 video inpainting and outpainting Wan 2.2 T2V 14B models (seed=0,, 480p resolution, 20 diffusion sampling steps). Top: Inpainting with prompt "Add white fascinator' showing input with masked region (cyan) and output. Bottom: Outpainting with prompt 'Change ratio to 11:6" showing input with padding regions (cyan) and output. Five key framess displayed (frames 1, 10, 20, 30, 40).
LanPaint assumes noise-free observations yo. Adapting it to handle noisy observations with specified noise level feasible but requires modifying the conditional distribution (y(y yo) in Eq This adaptation represents a promising direction for future research.
In this paper, we primarily focus image inpainting. However, LanPaint, a conditional sampling method independent of data modalily, can be applied to diverse domains, including texl, audio, video, and scientific applications such protein scaffolding and fluid field reconstruction.
Broader Impact Statement
LanPaint's efficient image inpainting boosts creative applications but risks misuse in generating deepfakes or misinformation. We advocate watermarking, provenance tracking, and community regulation to mitigate harm, as discussed Denton 2021) and (Franks Waldman 2018
References
Houssam AlRachid, Letif Mones, and Christoph Ortner. Some remarks preconditioning molecular dy- namics. The SMAT Journal of computational mathematics, 4:57-80, 2018.
Brian. D. O. Anderson. Reversc-time diffusion equation models. Stochastic Processes and their Applications, 12:313 326, 1982.
Heli Ben-Hanu, Omri Puny, Itai Gat, Brian Karrer, Uriel Singer, and Yaron Lipman. D-flow: Differentiating through flows for controlled generation. arXiv preprint arXiv:2402. 14011, 2024.
James Betker, Gabriel Goh, Li Jing, Tim Brooks, Jianfeng Wang, Linjie Li, Long Ouyang, Juntang Zhuang, Joyce Loc, Yufei Guo, et al. Improving image generation with better captions, 2023.
Xiang Cheng, Niladri S Chatterji, Peter L Bartlett, and Michael Jordan. Underdamped langevin meme: A non-asymptotic analysis. In Conference learning theory, pp. PMLR, 2018.
14

---

Published in Transactions on Machine Learning Research (10/2025)
Hyungjin Chung, Jeongsol Kim, Michael T Mccann, Mare L Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. arXiv preprint or Xiviv22009 14687, 2022a.
Hyungjin Chung, Byeongsu Sim, Dohoon Ryu, and Jong Chul Ye. Improving diffusion models for inverse problems using manifold constraints. Advances in Neural Information Processing Systems, 35:25683-25600 256696 2022b.
Comfy Org. Comfyui: A powerful and modular stable diffusion gui and backend. https://github..com Contyanoonynous/Coottyy 2025. Documentation available at httess//ddocs.comfy..rrgg
ComfyUl Wiki. How to impaint an image in comfyui, 2025. URL hanpec/ooooot---paat-t--------e- com Accessed: 2025-07-18.
Lewis Cornwall, Joshua Meyers, James Day, Lilly S Wollman, Neil Dalchau, and Aaron Sim. Training- freee
guidance of diffusion models for generalised inpainting, 2024. URL https://openrreiee..rr hepperrevieennet/fouumiii net/forum?id
AC1QLOJK71
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pallern Recognilion, pp. 248 255, 2009. doi: D0.109//CVPR.2000.52200
Emily Denton. Ethical considerations of generative ai. Invited Talk Workshop: Synthetic Data Generation: Quality, Privacy, Bias, International Conference on Learning Representations (ICLR) 2021, 2021. URL
Accessed: 2025-08-10.
Prafulla Dhariwal and Alex Nichol. Diffusion models beat gans on image synthesis. ArXiv, abs/2105.05523, 2021.
Andrew Duncan, Nikolas Nüsken, and Grigorios A Pavliotis. Using perturbed underdamped langevin dynamics to efficiently sample from probability distributions. Journal of Statistical Physics, 169:1098- 1131, 2017.
Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas Müller, Harry Saini, Yam Levi, Dominik Lorenz, Axel Sauer, Frederic Boesel, et al. Scaling rectified flow transformers for high-resolution image synthesis. In Forty-first international conference on machine learning, 2024.
Denis J. Evans and Gary Morriss. The microscopic connection, pp. 33-78. Cambridge University Press, 2008.
Mary Anne Franks and Ari Ezra Waldman. Sex, lics, and vidcotape: Deep fakes and free specch delusions. Md. L. Rev., 78:892, 2018.
Ruiqi Gao, Emiel Hoogeboom, Jonathan Heek, Valentin De Bortoli, Kevin Patrick Murphy, and Tim Sali- mans. Diffusion models and gaussian flow matching: Two sides of the same coin. In The Fourth Blogpost Track at ICLR 2025, 2025. URL ltttps://openrevicn net net/fforuridddC3yyyyrrp
Tan Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farloy, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014.
Asya Grechka, Guillaune Couairon, and Matthieu Cord. Gradpaint: Gradient-guided inpainting with dif- fusion models. Computer Vision and Image Understanding, 240:103928, 2024.
HiDream.ai. Hidream-il: A 17b parameter open-source image generative foundation model. https:// 2025. Additional details available at https: htttps://gtthb. ghtt.u...
huggingface.com http///DeammaaHHHDDaaa com
Jonathan Ho, Ajay Jain, and P. Abbeel. Denoising diffusion probabilistic models. ArXiv, abs/ 2006..1299, 2020.
15

---

Published in Transactions on Machine Learning Research (10/2025)
Yazid Janati, Badr Moufad, Alain Durmus, Eric Moulines, and Jimmy Olsson. Divide-and-conquue posterior sampling for denoising diffusion priors, 2024. URL httpa:://axxiv.or/bbbb.... 11407
Tero Karras, Miika Aittala, Timo Aila, and Samuli Laine. Elucidating the design space of diffusion-based generative models. ArXíe, abss/2206.00366 2022.
Bahjat Kawar, Michael Elad, Stefano Ermon, and Jiaming Song. Denoising diffusion restoration models. Advances in Newral Information Processing Systems, 15:22593-236600 2022.
Black Forest Labs. Flux.
2024.
Ruilin Li, Hongyuan Zha, and Molei Tao. Hessian-free high-resolution nesterov acceleration for sampling.
In International Conference on Machine Learning, pp. 13125-13162. PMLR, 2022.
Yaron Lipman, Ricky TQ Chen, Heli Ben-Hamu, Maximilian Nickel, and Matt Le. Flow matching for generative modeling, orXiv preprint arXiv:2210.0211 2022.
Luping Liu, Yi Ren, Zhijie Lin, and Zhou Zhao. Pseudo numerical methods for diffusion models on manifolds. 2022a.
ArXiv,
Xingchao Liu, Chengyue Gong, and Qiang Liu. Flow straight and fast: Learning to generate and transfer data with rectified flow. arXiv preprint arXiv:2209.0380 03003, 2022b.
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. Tn Proceedings of International Conference on Computer Vision (ICCV), December 2015.
Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu, Dpm-solver++: Fast solver 2022.
for guided sampling of diffusion probabilistic models. ArXiv,
Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu. D +- Fast solver for guided sampling of diffusson probabilistic models. Machine Intelligence Research, pp. 1-22, 2025.
Andreas Lugmayr, Martin Danelljan, Andres Romero, Fisher Yu, Radu Timofte, and Luc Van Gool. Repaint: Inpainting using denoising diffusion probabilistic models. In Proceedings of the IEEE/CVF conference on compuler vision and pallern recognition, pp. 11461 11471, 2022.
Tsiry Mayet, Pourya Shamsolmoali, Simon Bernard, Eric Granger, Romain Hérault, and Clement Chate- lain. Td-paint: Faster diffusion inpainting through time aware pixel conditioning. arXiv preprint arXiv:24 1rXiv:241000930 10.09300... 2024.
Dustin Podell, Zion English, Kyle Laccy, Andreas Blattmann, Tim Dockhorn, Jonas Müller, Joe Penna, and Robin Rombach. Sdxl: Improving latent diffuusin models for higb-resolution image synthesis, 2023.
Robin Rombach, A. Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 10674-10685, 2021.
François Rozet, Gérôme Andry, François Lanusse, and Gilles Louppe. Learning diffusion priors from observa- tions by expectation maximization. Advances in Neural Information Processing Systems, 37:87647 87682, 2024.
Jascha Narain Sohl-Dickstein, Fric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. ArXiv, abs/1503, 1503.03588. 2015.
Jiaming Song, Chenlin Meng, and Stefano Ermon. abs/2010.02502, 2020a.
Denoising diffusion implicit models.
ArXiv,
Jiaming Song, Chenlin Meng, and Stefano Ermon. arXi::2010.0250 2020b.
Denoising diffusion implicit models. arXiv preprint
16

---

Published in Transactions on Machine Learning Research (10/2025)
Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. In Newral Information Processing Systems, 2019a.
Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. Aduances in neural information processing systems, 32, 2019b.
Yang Song, Jascha Narain Dohl-Dickstein, Diederik P. Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. ArXiv, abs/ Abs/2001.13445 2020c.
Brian L Trippe, Jason Yim, Doug Tischer, David Baker, Tamara Broderick, Regina Barzilay, and Tommi Jaakkola. Diffusion probabilistic modeling of protein backbones in 3d for the motif- sooff-scaffolding problem. arXiv preprint arXix:2206.00 041 119, 2022.
George E. Uhlenbeck and Leonard Salomon Ornstein. On the theory of the brownian motion. Physical Review, 36:823 841, 1930.
Team Wan, Ang Wang, Baole Ai, Bin Wen, Chaojic Mao, Chen-Wei Xie, Di Chen, Feiwn Yu, Haiming Zhao, Jianxiao Yang, Jianyuan Zeng, Jiayu Wang, Jingfeng Zhang, Jingren Zhou, Jinkai Wang, Jixuan Chen, Kai Zhu, Kang Zhao, Keyu Yan, Lianghua Huang, Mengyang Feng, Ningyi Zhang, Pandeng Li, Pingyu Wu, Ruihang Chu, Ruili Feng, Shiwei Zhang, Siyang Sun, Tao Fang, Tianxing Wang, Tianyi Gui, Tingyu Weng, Tong Shen, Wei Lin, Wei Wang. Wci Wang, Wenmeng Zhou, Wente Wang, Wenting Shen, Wenyuan Yu, Xianzhong Shi, Xiaoming Huang, Xin Xu, Yan Kou, Yangyu Lv, Yifei Li, Yijing Liu, Yiming Wang, Yingya Zhang, Yitong Huang, Yong Li, You Wu, Yu Liu, Yulin Pan, Yun Zheng, Yuntao Hong, Yupeng Shi, Yutong Feng, Zeyinzi Jiang, Zhen Han, Zhi-Fan Wu, and Ziyu Liu. Wan: Open and advanced large-scale video generative models, 2025. URL https: /ttp///axvvvv//////////eeelaaav org/ httg/abb/25000 20314
Luhuan Wu, Brian Trippe, Christian Nacsseth, David Blei, and John P Cunningham. Practical and asymp- totically exact conditional sampling in diffusion models. Advances in Newral Information Processing Sys- tems, 36, 2024.
Ling Yang, Zhilong Zhang, Shenda Hong, Runsheng Xu, Yue Zhao, Yingxia Shao, Wentao Zhang, Ming- Hsuan Yang, and Bin Cui. Diffusion modcls: A comprehensive survey of methods and applications. ACM Computing Surveys, 2022.
Guanhua Zhang, Jiabao Ji, Yang Zhang, Mo Yu, Tommi Jaakkola, and Shiyu Chang. Towards coherent image inpainting using denoising diffusion implicit models. 2023a.
Lymin Zhang, Anyi Rao, and Maneesh Agrawala. Adding conditional control to texl-to-image diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 2023b.
Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness deep features as a perceptual metric. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 586-595, 2018.
Wenliang Zhao, Lujia Bai, Yongming Rao, Jie Zhou, and Jiwen Lu. Unipe: unilied predictor-correcloor framework for fast sampling of diffusion models. ArXio, abs/2302.04867, 2023.
Junhao Zhuang, Yanhong Zeng, Wenran Liu, Chun Yuan, and Kai Chen. A task is worth one word: Learning with task prompts for high-quality versatile image inpainting. In European Conference on Computer Vision, pp. 195 211. Springer, 2024.
17

---

Published in Transactions on Machine Learning Research (10/2025)
A More Ablation and Implementation Details
Mask Types The box mask covers central region spanning from 1/4 to 3/4 of both the height (H) and width (W) of the image. The half mask covers the right half of the image. The outpaint mask covers the area outside the box mask, serving its complement. The checkerboard mask forms grid pattern with cach square sized at 1/16 of the original image dimensions. For latent space operations, these masks are applied to the encoded latent representations of the image.
LanPaint We implement. LanPaint using the diffusers package, following Algorithm Hyperparameters are configured follows: y 15, O., and À 8 for all image inpainting tasks, drawing loosely from the insights gained through scnsitivity analysis in Fig The notation LanPaint-5 and LanPaint-I1 10 denotes N = and N = 10 sampling steps, rspectively. The step size is set to 0.15 for both Celeb-A and ImageNet.
The impact of step size ablated Table g with the impact of other parameters discussed in Fig S have also provided impact of different samplers in Table
We
Import Alpha
Irspact on
Impact
0.50
0.164
0.1703
0.1 1703
0.1093
0.55
0.1003
0.5
0.103
0.172
0.370
0000)
8.6
Lamiidd
Alpha Oog stale)
Figure 8: Impact of expected noise a, guidance scale X, and friction y on LanPaint-10's LPIPS for ImageNet box inpainting at stepsize 0.15, evaluated on a validation set of 100 images. Expected noise a most affects LPIPS, ideally 0 for image inpainting. Guidance scale À significantly improves performance from 0 (no guidance) to 4, with optimal range of 6 10. The friction parameter y has less significant effect; in practice, we use a prescribed value of 15 without finetuning, sharing this value across all tasks.
Table 4: Ablation study on the impact of different diffusion samplers (Euler, + et al. 2025), and DDIM (Song et al. (020bb) for various heuristic and asymptotically exact inpainting methods. Performance evaluated using LPIPS (lower better) and FID (lower is better) metrics on 1,000 images from the CelebA and ImageNet datasets with box mask.
CelobA
ImageNet
Fuler
+
DDIM
Fuler
DPM++
DDIM
Method
LPIPS
FID
LPIPS
FID LPIPS
FID
LPIPS
FID
LPIPS
FID
LPIPS
FID
Heuristic Methods
Replace
0.131
31.7
0.119
26.7
0.130
31.5
0.229
75.7
0.234
75.
0.228
75.6
CoPaint-2
0.180
43.6
0.186
45.8
0.169
41.1
0.234
85.1
0.233
84.5
0.297
89.1
CoPaint-3
0.172
41.7
0.181
44.3
0.163
38.9
0.228
76.9
0.228
78.9
0.288
82.1
DDRM
0.128
32.4
0.135
34.8
0.127
32.2
0.216
67.2
0.215
68.9
0.211
65.3
MCG
0.130
31.6
0.113
25.9
0.124
29.7
0.225
83.5
0.266
88.1
0.253
86.7
DPS
0.181
44.1
0.166
40.2
0.179
43.7
0.252
107.5
0.248
103.0
0.249
108.2
Asymptotically Exact Methods
Repaint-5
0.115
34.5
0.127
41.7
0.114
34.2
0.216
62.8
0.342
133.6
0.211
60.8
Repeint-10
0.112
34.6
0.409
223.3
0.111
34.4
0.215
61.0
0.604
174.5
0.211
59.7
TFG-5
0.119
31.9
0.113
31.9
0.118
31.4
0.235
69.3
0.281
83.7
0.234
69.7
TFG-10
0.114
33.2
0.108
33.2
0.112
31.2
0.234
66.5
0.305
89.5
0.235
65.8
LanPaint-5 (ours)
0.105
27.9
0.097
23.7
0.104
28.0
0.180
49.3
0.201
56.2
0.178
48.6
LanPaint- 10 (ours)
0.103
29.5
0.097
26.9
0.103
29.3
0.171
46.4
0.205
55.1
0.172
45.6
18

---

Published in Transactions on Machine Learning Research (10/2025)
TFG TFG ((Cornwall al. 20241) corresponds pure Langevin sampling. It is implemented via the Fuler-Maruyama discretization, with step size schedule dr nyv de with 0.04 as reported in their paper.
DDRM Our implementation of DDRM follows Equations (7) and (8) in Kawar et al. (Kaaar et al. 2022), with By O, V I, and 8; 1 for observed regions y and 8; = for inpainted regions x. The hyperparamcters 17 = 0.7 and lo are selected based on the optimal KID scores reported in Table 3 of the reference.
MCG We implement MCG as described in Algorithm of Chung et al. (Chung et al. 2022b using = 0.1/1ly PRolI as recommended in Appendix C. An alternative choice, = 0.1/1y P&oll: was evaluated but resulted in significantly poorer performance on ImageNet, as shown in Table 5 Consequently, we opted against using this alternative.
DPS
We adopt DPS (Chung et al. 2022al using a = 1/1ly- - -%oll as recommended Appendix D.
Table 5: Ablation study of DPS and MCG CelebA-HQ- and ImageNet. with box inpainting. Results for different alpha values (0.1, 1.0) are shown with LPIPS and FID metrics. Lower values are better.
Alpha 0.1
Alpha 1.0
Method
LPTPS
FID
LPIPS
FID
HeQ2bA-HH-2566
MCG
0.130
31.6
0.125
30.1
DPS
0.190
41.5
0.181
44.1
ImageNet
MCG
0.226
83.5
0.240
79.5
DPS 0.251
110.7
0.252
107.5
RePaint We implement RePaint based on Algorithm 1 in Lugmayr al. (Lugmayr al., 2022 with modifications to accommodate fast samplers. While the original method was designed for DDPM, we adapt it by replacing the backward sampling step (Line 7) with Euler Discrete Sample step. Additionally, the jump step size to 1 instead of the default 10 backward steps recommended in Appendix B of the original work. This adjustment. is necessary because fast samplers typically operate with only around 20 backward sampling steps, making larger jump sizes impractical.
set
Diffusion Process and Langevin Dynamics
Diffusion Process forms the mathematical foundation of diffusion models, describing a system's 's evolution through deterministic drift and stochastic noise. Here we consider diffusson process the following form of stochastic differential equation (SDE):
dx; = p(x;, t) di + axx; dW,,
(18)
where the drift term txx,,t) dt governs deterministic motion, while dW, adds Brownian noise.
The Brownian noise dW is key characteristic of SDEs, capturing their stochastic nature. It represents series of infinitesimal Gaussian noise, A good way to understand it is through formally definition:
dW. = Vdl lim
6
(19)
where E; are independent standard Gaussian noises with mean and identity covariance matrix I. The limit in this definition shows that dW is not just single Gaussian random variable with mean 0, but rather
19

---

Published in Transactions on Machine Learning Research (10/2025)
the cumulative effect of infinitely many independent Gaussian increments. Such cumulation allows us to compute the covariance of dW as vector product:
dWe dw? Cov(dd,, dW)) = = Idl,
(20)
where / is the identity matrix. When quadratic terms of dW, are involved, dW, can often be roughly treated as edte, where e e~ 1) is a standard Gaussian random variable.
The Brownian noise dWW, scales as vdt, which fundamentally alters the rules of calculus for SDEs. change of variable in ordinary calculus has ds = da dt, but for Brownian noise is dW, = / ds dt
de dW,, Morcover, the
differentiation of function is (t,) f Vxf dx, in ordinary calculus, but for SDE, it follows the Itô's lemma:
a² df = Ocfdt + Vxl dx, +
2 Vefdtt
(21)
stochastic offect
This is derived by differentiating ʃ using the chain rule with the help of Ex 18 and 2g while keeping all terms up to order dt (note that dW scales as vdt). The emergence of the second-order derivative term f is the key distinction from ordinary calculus. We will later use this lemma to analyze the evolution of the distribution of Xt-
Langevin Dynamics is a special diffusion process aims to generate samples from a distribution p(x). It is defined as
dx, = s(x))dt + V2dW..
(22)
where s(x) Vx ((g)(x) is the score function.
This dynamics is often used as a Monte Carlo sampler to draw samples from p(x), since p(x) is its stationary distribution- distribution that x, converges to as - co, regardless of the initial distribution of Xg-
More precisely, this means that if an ensemble of particles (x(" ) evolves according to the given SDE, and their initial positions (x(²) } follow a distribution p(x), then their positions (x((0) } will continue to be distributed according to p(x) at all future times t >>> 0.
To verify stationarity, will show that after evolution from time 0 to At, the distribution of x is still p(x). Consider a test function f and initial positions xo p(x), stationary be assessed by tracking the change in the expectation Exo [f (xxa)). Using Itô's lemma and note that [x[dW] = 0 for any distribution of
x, we compute:
xxxx)(x) (f(xa) f(x0) 22 At / (Vx) s+ V*f) dx
At / f(x) (-Vx x (ps) + V2p) dx (integration by parts)
(23)
At / [(x)Vx (-15+ VxP) dxx
= 0,
where 0 is obtained by substituting s = Vx log Because Exo<pix) [xxx)) f(xo)] 0 for any test function f, this means the distribution of XAr must have been kept the same as Xo-
Langevin Dynamics as 'Identity" The stationary of p(x) very important: The Langevin dynamics for p(x) acts as an "identity" operation on the distribution, transforming samples from p(x) into new samples from the same distribution. This property enables efficient derivations both forward and backward diffusion processes for diffusion models.
20

---

Published in Transactions on Machine Learning Research (10/2025)
C The Denoising Diffusion Probabilistic Model (DDPMs)
Langevin dynamics can be used to generate samples from a distribution p(x), given its score function s. But its success hinges on two critical factors. First, the method is highly sensitive to initialization a poorly chosen X. may trap the sampling process in local likelihood maxima, failing to explore the full distribution. Second, inaccuracies the score estimation, particularly near Xo, can prevent convergence altogether. These limitations led to the development of diffussin models, which use unified initialization process: all samples are generated by gradually denoising pure Gaussian noise.
DDPMs (Ho ct al. 2020) are models that generate high-quality images from noise via sequence of denoising steps. Denoting images as random variable x of the probabilistic density distribution p(x), the DDPM aims to learn a model distribution that mimics the image distribution p(x) and draw samples from it. The training and sampling of the DDPM utilize two diffusion process: the forward and the backward diffusion process.
The forward diffusion process of the DDPM provides necessary information to train DDPM. It grad- ually adds noise to existing images Xp p(z) using the Ornstein-Uhlenbeck diffusion process (OU process) (Uhlenbeck & Ornstein 1930) within finite time interval t [0, The OU process is defined by the stochastic differential equation (SDE):
dx; = 2 xtdt dt + dWe,
(24)
in which t is the forward time of the diffusion process, is the noise contaminated image at time t, and W, is a Brownian noise.
The forward diffusion process has the standard Gaussian (O,, as its stationary distribution. Moreover,
regardless of the initial distribution px) of positions {x60) Ji=1: their probability density px(x) at time converges to (x I) as t + cc.
(0) L
The backward diffusion process is the conjugate of the forward process. While the forward process evolves Pt toward I), the backward process reverses this evolution, restoring (N to pt. To derive it, we know from previous section that Langevin dynamics Eq acts as an 'identity' operation on a distribution. Thus, the iomposition of forward and backward processes, at time 4, must yield the Langevin dynamics for (x).
To formalize this, consider the Langevin dynamics for (x(x) with a distinct time variable т, distinguished from the forward diffusion time I. This dynamics can be decomposed into forward and backward components as follows:
dx, s(x,,t)dr V2W
1 [xx + s(x,:t) dr + d2
2 xT + dd!
(25)
+
Forward
Backward
where s(x, = Vx log (x) the score function of (x).. The "Forward' part corresponds to the forward diffusion process 24 effectively increasing the forward diffusion time t by dr, bringing the distribution to (x). Since the forward and backward components combine to form an 'identity" operation, the "Backward' part in 25 must reverse the forward process decreasing the forward diffusion time t by dr and restoring the distribution back to (x)).
Now we can define the backward process according to the backward part in Eq and a backward diffusion time t' different from the forward diffusion time
dxp x5x0+ s(xxx.) dt' + dWe.
(26)
It remains to determine the relation between the forward diffusion time and backward diffusion time L'. Since dt' is interpreted as "decrcase" the forward diffusion time f, we have
di = -dt!
(27)
21

---

Published in Transactions on Machine Learning Research (10/2025)
which means the backward diffusion time is the inverse of the forward. To make t' lies in the same range [0, of the forward diffusion time, we define i = T - t'. In this notation, the backward diffusion process (Anderson 1982) is
dxy = (2x0 + s(xU, +²) dt' + ddWr,
(28)
in which 1' E [0, () is the backward time, s(x,t) = Vx (x) is the score function of the density of x; in the forward process.
Forward-Backward Duality The forward and backward processes form a dual pair, advancing the time t' mcans recoding time t by the same amount. We define the densitics of x, (forward) as px()); the densities of X (backward) as (x). If we initialize
(o(x)= = px)
(29)
then their evolution are related by
qu (x) (x)
(30)
For large T, pr (x) converges to (xx T)- Thus, the backward process starts t' 0 with ((0, 7) and, after evolving to t' = T, generates samples from the data distribution:
(T(x) = px()..
(31)
This establishes an exact correspondence between the forward diffusion process and the backward diffusion process.
Numerical Implementations In practice, the forward OU process Eq 24 is numerically discretized into the variance-proserving (VP) form (Song et al., 2020c):
B B
(32)
where L.... n is the number of the time step, 9 is the step size of each time step, x; is image at ith time step with time t; Σド S3, C, is standard Gaussian random variable. The time step size usually takes the form 3; ((bg-b)) by where d, 10-4 and b2 0.02. Note that our interpretation of 3 differs from that in (Song el al.] 2020c), treating 3 as a varying time-step size to solve the autonomous SDE Eq instead of time-dependent SDE. Our interpretation holds as long as every 8 is negligible and greatly simplifies future analysis. The discretized OU process Eq 32 adds a small amount of Gaussian noise to the image at each time step i, gradually contaminating the image until x, I),
Training a DDPM aims to recover the original image To from one of contaminated versions Fy. In this case Eq 32 could be rewritten into the forward diffusion process
x; = V + vI- o;C;; 15isn.
(33)
where a; = 01 - B5) is the weight of contamination and é, a standard Gaussian random noise to be removed.
An useful property we shall exploit later is that for infinitesimal time steps B, the contamination weight ā; is the exponential of the diffusion time &
lim ai + -4
(34)
max, Bg >D
The backward diffusion process used to sample from the DDPM by removing the noise of an image step by step. It is the time reversed version of the OU process, starting zi ~ [x((0, /), using the reverse of the OU process Eq 28 In practice, the backward diffusion process is discretized into
X + s(xp, T - 14 14)8n + Vn--EEr
X
(35)
VI
22

---

Published in Transactions on Machine Learning Research (10/2025)
where 1' 0, is the mumber of the backward time step, Xy is image at 1'th backward time step with time f مj= Pn-1-s = T tn-p. This discretization is consistent with Eq 28 as long as 3 are negligible. The score function s(x,, T (g) is generally modeled by neural network and trained with a denoising objective.
Training the score function requires training objective. We will show that the score function could be trained with a denoising objective.
DDPM is trained to removes the noise é, from x, in Eq 33 by training a denoising neural network eg (x, 4) to predict and remove the noise E.. This means that DDPM minimizes the denoising objective (Ho al. 2020
n
Lidenoiso (E))
Ex E E (0((x,44)1
(36)
Now we show that Eo trained with the above objective is proportional to the score function s. Note that the Eq 33 tells us that the distribution of x, given Xo is Gaussian distribution
pxxx N (xx (1 a;)
(37)
and the noise E in Eq 33 is directly proportional to the score function
? == - (xxxxx fz),
(38)
where ((x/Xx t.) Xx, (x//(x the score of the conditional probability density p(x;(xo) x,
The Eq 38 is an important property. It tells us that the noise is directly related to conditional score function. This conditional score function is connected to the score function s(x,t) () through the following equation:
Expspa (x; t;) = E Exo (xx) xo)
(39)
where f is an arbitrary function and s(x, t) = Vx (o) is the score function of the probability density of X₃.
Substituting Eq 38 into Eq 36 and utilizing Eq 39
we could derive that Eq equivalent a denoising
score matching objective
Lieeoose (EE)
Expep, (2) ais(x;, f.) c 4.)l2.
E
(40)
71
This objectives says that the denoising neural network co(x,t,) is trained to approximate a scaled score function 6(x, 4)) (Yang et al. 2022)
(x(x,4)) -xx
(41)
Therefore the denoising neural network is actually scaled estimate of the score function s(x, f), hence could be inserted into the backward sampling process Eq to generate images.
D The ODE Based Backward Diffusion Process
The backward diffusion process Eq 26 is not the only reverse process for the forward process Eq We can derive a deterministic ordinary differential equation (ODE) as an alternative, removing the stochastic term dW in the reverse process.
To obtain this ODE reverse process, consider the Langevin dynamics Eq 25 with a rescaled time (dr - dr):
1 dx, 2 s(x,, + dW.,
2 x, + dW, z x, + 1 2
(42)
t)),,
Forward
Backward
23

---

Published in Transactions on Machine Learning Research (10/2025)
Following the same logic used to derive the backward diffusion process Eq 28 the backward ODE (known as the probability flow ODE (Song et. al. 2020c
extract from this splitting
dxe = 2 (x: + s(xx, T t')) dt',
(43)
where 1' E [0, is backward time, and t(x,t) = xx, log the score function of the density x in the forward process. This ODE maintains the same borward-backwad duality as the SDE reverse process Eq 28
Since the ODE is deterministic, it enables faster sampling than the SDE version. Established ODE volvers-suce as higher-order methods and exponential integrators can further reduce computational steps while mainlaining accuracy.
E Three Notations of Diffusion Models
In this section, discuss three common formulations of diffusion models: variance-oxploding (VE), and rectified flow (RF). We demonstrate their mathematical equivalence and show how they can be transformed into one another.
(VP),
To simplify notation, we now use continuous time and its corresponding state x (as Eq 24 rather than discrete notations like t, and x,.
Variance Perserving (VP) The DDPMs introduced in the previous section are called 'variance- preserving' models. This name originates from the forward process Eq if the clean images Xo are normalized such that Cov(x,,X)) I, then this covariance is preserved at any time t,, with Cov(x, I.
The forward diffusion process Eq 33 in contimous time t is:
X VarXo + v1 ārE,,
(44)
where - (from Eq 34 and & I).
The continuous-time processes are:
Forward SDE Comstein-Uhlenbeed process):
dx: =
2 x,dt + dW,
(45)
Backward ODE (Probability flow):
1
dx.- = 2 (xr + s(x,, T (()) dt'.
(46)
where 1' [0 is reversed time, and the function s(x,t) Vx log is learned via the denoising objective Eq and Eq
While we previously trained the denoising network Ga using objective Eq 36 (related to the score function via Eq 41,, we can alternatively model the score function sy directly. By substituting eœ with so and dropping the v1 de scaling factor, obtain the equivalent score-based objective:
Lscore (8o) = E Exo E BanNion)
é: -1-6i
+ so (x(x
(47)
where x, follows Eq 44
This represents an equivalent but reweighted version of the original denoising
objective Eq
36
24

---

Published in Transactions on Machine Learning Research (10/2025)
Variance Exploding (VE) serving. Define:
The variance exploding formulation provides an alternative to variance pre-
Oz
o'=
Zo
X
Zg
X
e(Zo, = -v1 d,s(x,,,), t). (48)
QT-
VOT -1
Rewriting the VP forward Eq
44 in VE notation yields:
Z, Zo + oE.
(49)
where Zo is the clean image corrupted by noise of magnitude d. The contimuous-time procosses become:
Forward SDE (from Eq 4
d2g = 22ddW.. o oE 0e 1-ár
(50)
Backward ODE (from Eq 46
dzg. c(zor,o')do'' d'),o', o' [V>=
[
1-áz
(51)
dr
To directly model (z(z,,), o), we adapt the denoising objective Eq 36 Ze:
VE coordinates by replacing x, with
denoise (Eo) E00- E Ex E, ~N(,.)) ف ca(2,, o))
(52)
where maa /(1 ār)/ār ar and 2, follows Eq 49 operating VE space.
This preserves the denoising objective's structure while
Rectified Flow (RF) While often presented distinct framework from DDPMs, rectified flows are mathematically equivalent. Gao et al. 2025 to DDPMs. We now provide much simpler proof via the transformations:
8'
2
Z
v(r,,
E(2o, o) rs
(53)
1 +o
1
1+ o²
1
Rewriting the VE forward process Eq 49 in RF coordinates yields:
= (1 - s)ro + Sē.r
(54)
which lincarly interpolates between clean data (ro) and noisc
The continuous-time dynamics become:
Forward SDE (from Eq500:
dr, rs ds + V 1
2s dW s [0.1]
(55)
s
Backward ODE (from Eq
drs v(rs,s')ds' s' E [1,0]
(56)
To directly model s'), we transform the denoising objective Eq 52 by substituting co with vo and
inserting the RF forward process Eq into Eq 52 while removing a constant scaling factor (1 s). This yields the flow matching objective:
25

---

Published in Transactions on Machine Learning Research (10/2025)
flol (vo) E9-1((001) Be ro vo(
(57)
where rs follows Eq 54 This represents a re-weighted equivalent of the denoising objective 3q interpreted in the flow matching framework where E corresponds to the endpoint rı and Va models the velocity field transporting To to r1.
In summary, the three notations (VP, VE, and RF) are mutually transformable through the mappings defined in Eq 48 and 53 This equivalence enables a practical LanPaint implementation strategy: we can design LanPaint using any single notation (such as VP) and automatically extend to other frameworks by applying these transformations.
48
F Stationary Distribution of Langevin Dynamics with the BiG score
In this appendix, we prove that the BiG score Langevin Dynamics defined in Eq converges to the target distribution
Pr(y yo) ovvl - kz).
xx x Px( y)
(58)
(y))
with a negligible deviation as + The joint dynamics X, and yr are governed by the following Langevin dynamics:
dx, = sx Yt, d) wdww.
(59)
dy, gA (X,, Nz, t) dww,
where the drift term gx defined as
y, = -(1==-)++0000)0 - - Yo
--
+ (x)((x)))))
(60)
1- ōe
F.1 Idealized SDE for the Target Distribution
To establish the convergence of BiG score, we first consider an idealized Langevin dynamics whose invariant distribution the exact target distribution
x yz) x p(x: I y.) ply: 2+)
(61)
(y)
The score function used in this idealized Langevin dynamics is given by:
s" tx Vx.y P: y) + (1 + log yo)
(62)
Expanding this and note that (r = pi(x.y) px(xly) we obtain:
dx; (x,, vlawx.
(63)
dy: = Nt. /2 dww,
where
(x),,tt) sx,
(64)
(x,,,11) (1+ A) V, logp(x y, + (1+ X) Vy logply Ya. - A Vy logp(x,y,0).
Using the fact that plye yo) N(y. I (1 I), we simplify sy to:
Vānyo A y. logp(x,.y1).
S = (1 + Vy, logp(x; -1 -1)- 1 ā
(65)
26

---

Published in Transactions on Machine Learning Research (10/2025)
F.2 Comparison with BiG score Drift Term
To connect the idealized SDE with the BiG score dynamics, analyze the relationship between sy and gx- Define the following quantities:
Ye Va No
r2 16 v1))
1 αt
gr)) v..) Vy, logp(xe (o)ll2>
(66)
T1 Vy, log p(x, yr)-
Soond
Here, Scond is rescaled version of Vy, logp(x; yt) that matches the order of magnilude of Ve-vās No.
Substituting these definitions into Sy, we obtain:
8t rt sy (1+ A)
Spond + gxi, ().
(67)
Thus, the idealized score function y* y. 1) can be expressed
8 (x,,,,1) (x, Bx( + 8t "0, Scond).
(68)
F.3 Perturbation Between Ideal and BiG score Scores
To quantify the deviation between the idealized score sy and the BiG score score gx, analyze the scaling relationship between the terms st and vI -ā- Recall that & and rt defined as: T
y ā Yo
r(t) (x.r)
a₁ V log (x y)
(69)
s(t) (x.))
From the relationship between the score function and the noise term in diffusion models (sce Eq 41 we
have:
<(x,t) - ā. s(x t),
(70)
where -t This implies that the score function s(x, 1) can be expressed
c(x, t)
s(x, t) = V1
(71)
To proceed, we make the following assumption about the noise term e(x, t): Assumption F.1. The expected T- norm of the noise term E(x, 1) is a positive bounded value, ie.. there exists constant C > 0 such that
Eptx. [|e(x, 1)l C.
772)
Under Assumption F.1 we can derive the scaling behavior of & and ry:
1. Scaling of 8r: Since Vy logpe(x y) a score function, it follows the same scaling as s(x, t). Thus,
C
s(t) E (x.s) | log (x y)ll2
(73)
VT- at
2. Scaling of ry: The term Y-vū, Ya represents the deviation of y from its conditional mean. For small 1 āc. 1-a,
this scales as:
y
/ ai No
C
r(t) (x,)
(74)
1 02
2
Cr.
27

---

Published in Transactions on Machine Learning Research (10/2025)
where C² > 0 is constant proportional to the standard deviation of y.
3. Ratio 2; Combining the scaling behaviors of 8t and Tty we obtain:
C/V1- āi Ft C²((1 (4)) C
C v Cr.
(75)
Thus, it scales as OVVI- o1). f
Now we have shown that the idcalized Langevin dynamics Eq 03 and the BiG score Langevin dynamics Eq differ only by an Ovvl at) perturbation. We also provide numerical verification of this analysis in Fig 9
Score Norm Ratio over
1.0
Average
pl PL.
0.8
Score Nomm Rudo
0.6
0.2
Figure 9: We analyze the average norm ratio between the ideal score sy (Eq 65 and the component discarded by the BiG score, sy gA, relative to ae, in the conditional Gaussian case (Section 5.1). We focus on the right part of the image when 0₂ approaches 1 (i.c., t - 0), which determines the distribution of generated clean image. This ratio decreases at the same rate vI ae, indicating that the BiG score gx closely approximates the ideal score sy with negligible error as - 0. This confirms that the error scales ot), laying the foundation for Theorem 4.1
F.4 Fokker-Planck Equation Analysis
We now show that an O(vI-ay deviation from the idealized score function translates to an O(VI at) deviation in the stationary distribution of Langevin dynamics.
The Fokker Planck equation 147 describes the time evolution of the probability density p(z,7) 7) associated with stochastic process governed by stochastic differential equation (SDE). For general SDE of the form:
d2; = h+(z) + (zy
(76)
the corresponding Fokker Planck equation can be written in operator form as:
0plz, L)(z,T),
(77)
where C is the Fokker-Planck operator, defined as:
= - ( 1 -D()V...
(78)
Here, h(z) the drift vector, D(z) (Z) T the diffusion matrix, and V. denotes the divergence operator.
F.4.1 Fokker-Planck Operator for BiG score
The BiG score dynamics are governed by the SDE Eq BiG score is:
59
The corresponding Fokker-Planck operator for the
LBGG score -x [sx (1
Vy [B. V2
(79)
28

---

8r Published in Transactions on Machine Learning Research (10/2025)
where 2 is the Laplacian operator.
The corresponding Fokker-Plan Planck operator for the idealized SDE Eq 63 is:
Cideal Vx. (v,) Vy. (x1, t2, 1 42.
(80)
F.4.2 Deviation Between BiG score and Idealized SDE
The key difference between the BiG score and the idealized SDE lies their score functions. Specifically, the score function sy for the idealized SDE can be expressed in terms of the BiG score score function gx as:
sy (1 +1 rt
Scond BA.
(81)
where Scond ft Vy, log p(x, yr). Thus, the difference between the Fokker-Planck operators for the BiG score and the idealized SDE is:
LBiG score Lideal -yy: (1
A) Scand
(82)
Pt
This additional term represents the perturbation between the BiG score and the idcalized SDE.
F.4.3 Analysis Using Dyson's Formula
To analyze the deviation of the solutions to the Fokker-Planck equations, we use Dyson's Formula (Evans & Morriss 2008), powerful tool in the study of perturbed differential equations. Dyson's Formula expresses the solution to a perturbed differential equation in terms of the unperturbed solution. Specifically, for a differential equation of the form
0p(z,T) (Co LT)p(Z,T), ÔT
(83)
where Lo is the unperturbed operator and L, a perturbation, the solution can be written as
p(z, -) = el60ttiir = coT p(z,0) + S' cColT-s) () Lip(z, 8) ds.
(84)
This formula allows us to express the solution to the perturbed Eq 83 as the sum of the unperturbed solution and a correction term due to the perturbation.
In our case, the Fokker-Planck equation for the BiG score can be viewed a perturbation of the Fokker- Planck equation for the idcalized SDE. Let (X) ye, be the solution to the idcalized Pokker-Planck equation:
Opideal
Lideal
(85)
The solution to the BiG score Fokker-Planck equation can then be written using Dyson's Formula as:
Ve, = Pideal (X,, Te, + //' (Crteu((--)) (LBIG score - Lideal) PBIG score (Xi, s) ds.
PBIG score Vt,
(86)
Substituting the perturbation term, we obtain:
PBig score (Xt, N2, T) Pideal (X,, (1 2) St (" CCumilt-s) [Soond PBiG score (X,,
Vr, (1,, s)] ds. (87)
Tt
From the analysis in Section F.3 we know that ~ -1-ar. Thus, the deviation term is proportional to
V1 dz.
29

---

Published in Transactions on Machine Learning Research (10/2025)
F.5 Conclusion
As - x,, the idealized solution (x; Vt, converges exponentially lo the stalionary distribution x² vx), driven by the contractive nature of Lideal. The BiG score dynamics, governed by PBIG score: deviate from n" by a term proportional to vI- dz. Thus, the BiG score dynamics converge to x (xx, with negligible error as + 0, controlled by the vanishing perturbation of the order v1- ct. This argument hence proves Theorem 4.1 as long as the term
P Ccdeallt-s) |Second PBiG score (x,,
Vt. Nt. s)] ds
(88)
remains bounded for all
F.6 Supp: P bounded
This section aims to show that the term
P /'' Vitealt-ss) (SSoodd PBiG score (x,, Vr. 8)] ds
(89)
is bounded.
Assumptions
Let S(x;, Vt. Scond PB:G (X,, 5), which is well-defined, bounded for all X and 8, and vanishes as Iyrll + xo.
The idcalized Fokker-Planck equation (with generator Lideal), has a unique stationary solution for each initial condition and finite relaxation time.
Key Properties
1. Spectral Gap:
Assumption 2 implies that Lideal has spectral gap L > 0, equivalently, -L is the largest non-zero eigenvalue.
2. Exponential Damping: The term e Vy, -S represents the evolution of the initial condition
Vy, S from time 0 to T - s. Suppose
c= lim CCueaalr - (eo S
(90)
Due to the spectral gap, this term behaves like e ((T-8) + c.
Integral Evaluation If the integrand behaves like e ((r-s) (suppose c c= 0), then the integral
Jr -L(rr-)) ds 1 1 LLe
(91)
L
is finite for 7 > 0, which completes the argument.
Proof of c= 0 Under Assumption 1, since S vanishes as llyell - oc, the divergence theorem yields:
/ Vvx. Sdy. 0.
(92)
Furthermore, because the Fokker-Planck operator Lideal preserves probability mass, we have:
/
( S Sdy,
(93)
for all s 2 0. As T oo, this quantity must relax to zero its unique stationary solution-withonr constant term C.
30

---

Published in Transactions on Machine Learning Research (10/2025)
QED The integral is bounded:
constant
PP|
(94)
G
Fast Langevin Dynamics (FLD) with Momentum
In this section, we introduce how we design the solver for FLD step by step.
The Original Langevin Dynamics perform conditional sampling task:
Suppose we wish to solve the Langevin dynamics for LanPaint
dx dx= 2dW,,
(95)
Vx (xx) the score function modeled by the diffusion model. Our goal to simulate the dynamics x until converges to its stationary distribution p(x).
where sxx)
The simplest approach is use the Euler- Anler-Maruyama scheme:
x(t + At) x(t) s(x(0)) V2AVS,
(96)
where & is a standard Gaussian noise. This a first-order scheme with a total numerical error scaling as ((St). However, this method has two drawbacks:
Slow convergence: It requires many time steps for x to reach the stationary distribution unless we use large At.
The numerical error scales with At. If A is large, will add too much noise within one step, manifesting as either visible white noise (pixel space) or blurriness (latent space) in the generated images.
White Noite Issue:
To address these issues, we aim to:
Accelerate convergence to reduce the number of required steps.
Use more accurate numerical scheme to suppress the white noise artifacts.
The Underdamped Langevin Dynamics (ULD) To accelerate convergence, we adopt the under- damped Langevin dynamics, which introduces momentum to the original Langevin dynamics:
dx dt.
(97)
dv 7 dt s(x) dt + /2 dWv,
m
where 7 is the friction coefficient, m is the mass, and v is an auxiliary momentum variable. The stationary distribution of this system is:
p(x,v) (vv),,
(98)
Momentum well-known to accelerate convergence optimization problems, and the same holds for Langevin dynamics. While ULD provides faster convergence, it has two key drawbacks:
Interpretability: The parameters of and m is non-intuitive and challenging to understand,
Momentum cannot be switched off: There exists no parameter choice (y or m) that recovers the original Langevin dynamics. This makes it difficult to isolate whether the acceleration stems from momentum effects or other factors (e.g., larger effective step sizes) in comparative studies.
31

---

Published in Transactions on Machine Learning Research (10/2025)
The Fast Langevin Dynamics the transformations: q V. 7 m yielding the following system:
To address these limitations, reformulate the ULD by introducing and >²
dx qdt
d (-qdr+s(x)er + v2dw,
(99)
dq = r
This formulation provides key advantages that resolve our previous concerns:
Improved interpretability: The (s(x) dr + v2dW,) term directly correspond to the original dynamics, with q representing an exponentially weighted moving average of these terms with decay rate
Exact recovery of original dynamics: By taking I - oo, we recover the original Langevin dynamics exactly, as the momentum equation reduces to:
dr = s(x dr + d2dW,
(100)
This allows direct comparison between the momentum and non-momentum cases.
Parameter reduction: The reformulation combines the two original parameters (y, m) into single parameter I, revealing that one parameter is redundant. This allows us to set m 1 in the original ULD without loss of generality, simplifying both analysis and implementation.
It remains to design an accurale numerical scheme for this dynamics. For LanPaint, we aim to perform conditional sampling with minimal computational cost. The most computationally expensive operation is the evaluation of the score function s(x). We therefore limit the number of function evaluations (NFE) of the score function to per time slep.
This constraint eliminates many traditional high-order numerical schemes that could potentially improve numerical accuracy with more NFE per time step. Moreover, in practice, we have found that traditional high-order schemes (which assume smooth second- third-order derivatives of s) performs poorly.
Given these considerations, the most accurate approach while using only one score function evaluation per step appears to be solving the dynamics analytically under the assumption that s(x) remains constant during each time step.
A Naive Solver of FLD Within a single time step, the dynamics simplifies to:
dx qdr
(101)
dq r (-qdr + sd + v2dW,)
However, this approach has important limitation: When take r - oo to recover the original Langevin dynamics, the system reduces to:
dx = s + V2dW,
(102)
Solving this exactly over time interval [0, Ar] with constant s yields:
x(Ar) = x0) + sAT + V2AT &
(103)
where& & ~ (O 1). This solution is identical the Euler-Maruyn Marruymm scheme, meaning inherits the same white noise problems aimed to avoid.
32

---

Published in Transactions on Machine Learning Research (10/2025)
While the previous approach represents the best can do without prior knowledge of the diffusion model, can fortunately leverage such knowledge to develop better scheme. In variance-preserving notation, the diffusion model adopts the forward process:
x = Vā,x0 + v1 ā,E
(104)
where Xy is the clean image, X₁ is the noisc-contaminatee image at diffusion time t (distinct from Langevin dynamics time), Og follows the diffusion schedule (lypically approximaling exp(-()), and 6 6~ N(0, I).
The model trains a denoising network E(X², t) predict the noise, which relates the score function through:
c(x,, t) -v1 ā, Xx logp(x,) -V1 ,,,(x;)
(105)
This relationship enables estimation of the clean image:
xx,x,) = X + (1 (xx)
(106)
Vaz
This estimator provides a simple way to the clean image Xy without noise.
The FLD Solver We propose solution to address the white noise issue: by engineering the FLD dynamics such that for large år, x asymptotically converges to the form specified in Eq [04 In contrast to Eq 103 which introduces infinitely large noise to x as Ar - xo, the asymptotic behavior for large Ar should satisfy:
N [ V Va, 1 -āz)
(107)
This design ensures that the Langevin dynamics neither introduces excessive noise nor improperly suppresses it when Ar is large.
Such asymptotic behavior can be technically achieved by treating *x(x) as constant within cach time step, rather than s(x), leading the Fast Langevin Dynamics (FLD) equations:
dx dr
dq=r(-qdr
Vār x dr + 2dW (-qqrr
(108)
dq -r
where the clean image estimate is:
xn(x) x + -1-10 (x))s(x
(109)
Va
Analyzing the limiting case r + oo reveals an Ornstein-Uhlenben process:
dx Var80 - x dr + V2dW,
(110)
This process has the desired stationary distribution VVV āt), rigorously satisfying Eq 107 and
maintaining the correct noise characteristics. Now, let's design an exact solver for the FLD equation Eq 108 treating &g as constant.
The FLD equation is special case of the following general form of stochastic harmonic oscillator:
dx = qdr
(111)
dq = (- dd - Axdr Cdr + DdW,),
where 4,4 > > 0, q
dx and nt 2
aW= dr
This system can be rewritten as second-order stochastic
differential equation:
dx
dx TC = IDn.
+
(112)
d-2
dt
33

---

Published in Transactions on Machine Learning Research (10/2025)
Here, 7/, <W is the formal derivative of Wiener process W,, representing white noise. If formally express the Wiener increment as dW, vdre, where is a standard Gaussian noise, then 7, can interpreted as 7 va= This defines a singular stochastic process with zero mean and a corra-cordllated covariance:
B|n
(113)
Equation [1 describes a damped harmonic oscillator with noise, whose behavior is governed by the competition between restoring force and damping The key parameter the discriminant:
A = 1 44 r
(114)
which emerges when solving I + 14 ++ I'Ar 0 via the exponential test solution æ ex This yields charactoristic roots À [- Iv revealing three distinct regimes according to square roots of A:
Underdamped (A 0): Complex roots cause oscillatory docay (like a swinging pendulum coming lo rest).
Critically damped (A 0): librium.
repeated real root enables fastest non-oscillatory return equi-
Overdamped (A > 0): Distinct real roots lead sluggish, non-oscillatory decay.
The exact solution the FL.D equation Eq 108 with initial conditions x(0) and q(0) follows a multivariate normal distribution time r:
(x(r).
(115)
The mean a and covariance E are given by:
x+ + (C))
(116)
(()) E((TT, A(1 G[T,, + + (C- Ax)(1 F. A))
(1,2 [[T A]]²
[[T'((('T, A)}²)
== D2
(117)
T [[T
where the auxiliary functions are defined as:
<1(1T, A) 1- 1- Jrr
sinh(trrr
+ cosh (ІTTVA)
VA
T - -A)
(TTr, A) -e- 11" sinh (
ITVA
(118)
E(TT, A) 1 - ITGG A)
(
1- (1-cosh[[TVV
sinh[TrvAa
(TT[T,, A) =11 -Irr -c-
VA
022 (T, IT A)
2
1 1- I-e [+
sinh(TTVV))
cosh(P VA)
VA
A
The solution captures all three damping regimes through the discriminant A 1-4A/T, with the hyperbolic functions smoothly transitioning between oscillatory (A 00, critical (A 0), and overdamped (A
34

---

Published in Transactions on Machine Learning Research (10/2025)
0) behavior. The covariance structure reflects the coupling between position and momentum fluctuations induced by the stochastic forcing.
Algorithm 1: Stochastic Harmonic Oscillator
Input: Initial position Xo IR" initial mmmentum qo E I (optional), time step т > 0, friction >> O, scalar IR, vector C E IR", scalar D E R
Output: Final position X, E R", final momentum qr R
if qo is None then Sample _N( Tm)
// Standard normal vector in Rm
Set 90 f - - distribution
// Initialize the velocity according to stationary
end
X ~ (H,, E) according to Eq.115 115
Sample
return X,, qr
Parameter Schedule
For the FLD equation Eq 108 the coefficients take specific forms:
1 C.
(x s(x) + Ax
A
C
V2
(119)
1 8
where s(x) is the score function. Substituting these into the general solution Eq 115 yields an exact analytical solver for the FLD dynamics (&o treated constant).
More generally, we have the freedom to choose the coefficients C and A, long as they add up to the score function
s(x) = C(x) - Ax
(120)
where C is treated as a constant. during a single time step. This freedom allow us to do the following modification to Eq 119
1. The coefficients can take the following forms:
A āi + 0r C=s(x) AA, D V2.
(121)
The hyperparameter a > 0 can be tuned based on the task. It represents the expected noise level of the sampling target, derived according to the forward diffusion process 2 under which a Gaussian random variable with standard deviation a follows the distribution N/ 1-0,1-áz ā. + ā whose score has linear term of the form T-ā.+ā, x. It particularly useful when the assumption that &n(x) constant does not hold. For instance, when sampling from a Gaussian distribution with standard deviation o, 8o(x) varies, and setting optimizes A. Thus, can be interpreted the 'noise level' of the target distribution. For image generation tasks, set =
2. The coefficients can alternatively be expressed as:
1+1 A = l-a;
C=s(x)+Ao Ax D /2
(122)
This formulation incorporates the guidance scale À from Eq 12 where A scales proportionally with X. The proportional relationship ensures stable solutions even at large values. In practice, adopt this set of parameter for the masked (y, known) part of LanPaint.
Substituting these coefficients into the general solution (FLD Gaussian solution) yields exact analytical expressions for the FLD dynamics over an arbitrary time interval [0, r). In practice, this can be adapted to a shifted interval [T, Ar].
Note that the parameters A and C depend on the diffusion time (or say noise level), meaning the FLD dynamics vary throughout the diffusion process. Consequently, both the time step Ar for each iteration and
35

---

Published in Transactions on Machine Learning Research (10/2025)
the friction coefficient I must be adjusted accordingly to adapt to these changing dynamics and maintain solution stability.
FLD Solver Summary As a summary of previous discussion. We now show one time step of the FLD solver
Algorithm 2: Ist-order FLD solver
Input: Xo, qo: ÂT, L, A, D, function Ccoe
Output: X,, 97
// Compute coefficients C via Eq 121 Eq. 122
C f (x,ef(xx/2)
// Advance time with Algorithm
X,, +- Stochaticlamooiiihellllaoo.... qo, AT, return X,, 9r, C,
The solver can be made sccond-order accurate in time step T by introducing midpoint states X,/2, 47/2 without requiring additional neural network evaluations, maintaining the same computational efficiency. The idea is to do the following operator splitting:
dx = cdT
(123)
dq = l' (- Axdr C DdW,),
split into
dx qdr
(124)
dq r (-q Axdr + Co + DdW+),
and
dx =
(125)
dq = l' 1CCx - Co)
then
do a 2nd order
Strang
splitting.
The
resulting
method
is
Algorithm 2nd-order FLD solver
Input: Xo, qo: AT, I, A, Co, D, function Ccoe
Output: X,, 9r, C,
// Advance time with Algorithm
X-/2, 9-/2 +- Stochasticlarmoni@@sellaatat
q, AT/
// Compute C via Eq 121 Eq 122
C, CCooef(xx/2)
4r/2 9r/2 + T(C, Cn)Ar // Advance time with Algorithm 9, + return X,, 4, C,
Co. D)
Friction Schedule The friction schedule designed based on a core principle: the FLD dynamics should maintain its charactoristic damping behavior consistently throughout the entire diffusion process. Whether the system is underdamped or overdamped, this state should remain invariant for all time t.
To achieve this, ensure that the discriminant A remains constant across all diffusion times t. A straight- forward choice is
r T ToAe
(126)
This schedule preserves a constant discriminant for cach time It uniformly control the global damping behavior transitioning between underdamped and overdamped regimes while ensuring consistent dynamics at every diffusion step.
36

---

Published in Transactions on Machine Learning Research (10/2025)
Time Step Schedule
We employ the time step schedule inversely proportional to A
Tr. TTo Ar A
(127)
to maintain constant product l'T across all diffusion times (Ar acts normalization constant). This design is motivated by the fundamental principle that the step size should adapt to the system's rate of change: faster-cvolving dynamics (large T) require smaller steps, while slower dynamics (small r) permit larger ones.
The key insight comes from examining the exponential terms Eq 118 When T = AT, most terms scale like -AT, where the product nåт directly determines the decay rate. By keeping Pâr constant, we ensure a consistent 'amount of change' per step- effeetivve balancing step size with the system's intrinsic timescale. This approach automatically adjusts Ar; to be smaller when F is large (fast dynamics) and larger when I' is small (slow dynamics), yielding stable and efficient numerical step across all diffusion time.
Extension of FLD: Hessian- High Resolution(HFHHR Dynamics The HFHR technique accel- crates the convergence of Undcrdamped Langevin Dynamics (ULD) by introducing a new parameter a into the ULD dynamics:
dx vdt + axx)) + 2adW>
(128)
dv 7 vdlt s(x)dt + 2
The additional term, as(x)dt + /2ddWxx corresponds to the original Langevin dynamics. Empirically, setting a accelcrates convergence, but remains unclcar whether this improvement stems from an increased effective step size in ULD or inherent acceleration due to the added terms. To analyze the dynamics, perform parameter transformation. Let
V = a
q
T
1/ 7
P
(129)
V
m&
which transforms the system into:
1 -
1 -
1
dx = qdr +
s(x) dr +
dw
V
V
(130)
dq r --q dr s(x) dr 1 dWw
1
2
In this form, two key observations emerge:
Limit behavior: As oo, the dynamics reduces the original Langevin dynamics:
dx s(x) dr + d2dW,.
(131)
2. Linear combination: The HFHR dynamics is a weighted combination of Langevin dynamics and ULD, with weighting factor and 9-1
This reveals that HFHR does not introduce inherent acceleration beyond ULD. Instead, its convergence improvement stems primarily from an increased effective step size. For this reason, we do not adopt HFHR in the FLD sampler.
Extension of FLD: Pre-conditioned Langevin Dynamics original Langevin dynamics
The stationary distribution x(x) of the
dx s(x) dr / 2WW
(132)
37

---

Published in Transactions on Machine Learning Research (10/2025)
Algorithm 4: LanPaint, Variance Perserving Notation
Input:
Input image y, mask m, text embeddings e, step size 17, steps N, friction y expected noise a, guidance scale À
Output:
Inpainted image
Initialize:
t Random noise
// Latent variable // Pre-diffused inputs
[yr} + ForwardDiffuso(y)
for each timestep t do
< scheduler.sigmaa()
// noise level (VE notation) from scheduler
0 1)(1+
// Compute alpha bar (VP notation)
// Prepare parameters for and regions
A₂ + 1/(1 - ã, Taa)
<- - A1/(1 -
[3 7~
// Friction coefficient for x
// Friction coefficient for y
D D+v2;
// Diffusion coefficient, assumed equal for and y // Set step sizes based on sigma functions
0x + (1- 04a)
By - (1- dr d; q. CNNe,e, None
// Base step size
Function Ccoef (x):
// Compute score
+ UNet(x,t)
8 - at
// Compute BiG score
8\ + 80 - m) + [1+A)| (1-0;)
As о m
1/ Compute masked C
C (s) A.x) @ (1 m) + (SX + A, ④ m
return C
// FLD dynamics with stochastic harmonic oscillator do
for k = 1
if q None then
// Advance time with FLD 1st order algorithm 2
x.q. - FLD FLD F
A, D, Ccoef)
clse
// Advance time with FLD 2nd order algorithn q,q, C t FLD 2nd(x, q, dr, D, A, C, D, Ccoof)
end end
// After LanPaint steps, use scheduler to step UNet(z,t)
SchedulerStep(2.cc0)
end
<- z ② (1 m)) + m
return z
where s(x) Vx log (x), is also the stationary distribution of the pre-conditioned dynamics
dx Ps(x) dr dWP
(133)
with P a positive definite symmetric matrix. A distribution is stationary it remains unchanged after a small time step AT, i.e., x'(x') xxx).
38

---

Published in Transactions on Machine Learning Research (10/2025)
The transition probability for the pre-conditioned dynamics over small time step is given by Gaussian integral:
n' (xx) / f
dx.
(134)
where Nix'; m, Σ) denotes multivariate Gaussian with mean m x Ps())Ar and covariance Σ = 2PAr. Since the time step is small, the Gaussian is sharply peaked near x', allowing us to simplify the integral.
To evaluate this, we approximate the score function near x', assuming s(x) = s(x') for x close to x', as the dynamics involve small steps. We introduce change of variables, defining y = Ps(x)Ar, which we approximate
y Ps(')A
(135)
The inverse transformation is:
x y Ps(pss(')An
(136)
The Jacobian determinant of this transformation, to first order, is approximately 1 1 PV s(x')Ar, so the volume element transforms as:
dx (1- s(x)Arr)
(137)
Using the symmetry of the Gaussian, N(x':y,, 2PAT) = Nyyx'' 2PAT). the integral becomes:
x' x'('' = (1- PV -())( ((x)) /
T(y - Ps( (r)(x)Arrraa (y; 2PAT) dy.
(138)
Define the deviation Ax = y- Ps(x') (A, 80 that y (s(x') A = x' + Ax. Since y follows a Gaussian distribution centered at with covariance 2PAT, we compute the moments:
B[Ax] = -Ps(=)A E[AxAx"] = 2PAr.
(139)
We approximate the density at the shifted point using Taylor expansion:
T 7(x + Ax) z (xx' + AX Vx'Vx(x) 1 Ax 2x (V
(140)
Taking the expectation over the Gaussian, the integral evaluates to:
/ T(x' Ax) dy (x') Ars(x)) ArP VVT(x').
(141)
Multiplying by the Jacobian factor and collecting terms up to order AT, we obtain:
n' x'(x) (x)))T((')) - Ar (Ps(x))(x')) - V (PVN()))) Fx(x')
(142)
Since the score function satisfies s(x') V log lxg
m(x)) we have:
Ps(x')T(x') = (x)(x').
(143)
Substituting this into the expression, the divergence terms cancel. Thus, the updated distribution simplifies to:
x(x)=<(x')+ ( (x)=))))))))))
(144)
As the time step approaches zero, the higher-order terms vanish, yiclding x'(x') = x(x'). Therefore, (x) is the stationary distribution of the pre-conditioned dynamies. QED.
The FLD dynamics Eq 101 can also be preconditioned by positive definite symmetric matrix P, yielding:
dx = Pqdr,
(145)
dq r(- Pqdr Psdr V2P
When P is a diagonal matrix, its diagonal elements Pa: act scaling factors for cach dimension of the system. This elfectively assigns a distinct lime step AT; = PAAT to the dynamics of each dimension, allowing independent control over the rate of evolution along each coordinate, For example, a larger Pa accelerates the dynamics in the i-th dimension, equivalent to a larger time step, while smaller P,, slows it down. This flexibility enables tailored convergence speed for each dimension without altering the system's stationary distribution.
39

---

Published in Transactions on Machine Learning Research (10/2025)
H A General Form of Langevin Dynamics and Its Stationary Distribution
In this section, we present a unified proof demonstrating that ULD, FLD, pre-conditioned, and HFHR dynamics all share the same stationary distribution as the original Langevin dynamics.
1. General Relation Between SDEs and the Fokker-Planck Equation
The Fokker-Planne equation describes the time evolution of the probability density p(z, 1) associated with stochastic process governed by stochastic differential equation (SDE). For a general SDE of the form:
dz; = (z) di + (z) j.
(146)
the corresponding Fokker-Planck equation is:
Öp(z, a [1((z)((2))) 0z,0zz (z) (4) O]
0²
(147)
ØL Oz,
where (z) is the drift term, Vi (z) is the diffusion matrix, and dW3 are independent Wiener processes.
2. Fokker-Planck Equation and Stationary Distribution of the Langevin Dynamics Consider the SDE:
dz Vz log dt + /2dW..
(148)
The drift term is h(z) logg((z), and the diffusion matrix is constant with Ys Fokker-Planck equation becomes:
V20gg.
The
Op(z,t) t)
0
[(
(0)gp(())
2 log p(z)
8 p
+
(149)
01
Oz,
Ozi
Oz
At stationarity, Oe 0, leading to:
0 (lgg
[
82p
0 0z,
+
(150)
0zi
Oz?
Solving this equation shows that the stationary distribution is:
plz) = p(z).
(151)
where p(z) is the target probability distribution.
3. Fokker-Planck Equation and Stationary Distribution of Fast Langevin Dynamics Now consider the SDE system:
1 dz Pv dl aVV, logr(z) V2aP dW.. m
(152)
dv -I + PV, log + PnWdW. m
where P a symmetric positive semidefinite matrix. This system is the general form of underdamped Langevin dynamics, with preconditioning and the HFHR technique introduced in Appendix G The Fokker Planck equation for this system is:
Öplz, v,t) Øt
Olog
0p
P.j
+ a
p
a
0z,
m
dz,
0z
(153)
P.j
7
Vi +
0 Ølog((z)
8p
m
02,
013
40

---

Published in Transactions on Machine Learning Research (10/2025)
To determine the stationary distribution, assume:
plz. v) = p(=)=)
(154)
where p(z) is the marginal distribution of 2, and (Vv ml) is Gaussian distribution with zero mean and covariance mI. Substituting into the Fokker-Plande equation, we find:
Öp(z, v,t)
Öp(z) M(v]
Ps
vyp()))(vvO,,
mI] Púj
(155)
0t
Dz,
Dc,
dzj
Note that Ov,:V(v(O, = W NV([O, mI), therefore these terms cancel, confirming:
p(z. v) pvv)
(156)
is stationary solution. This implics: 1. follows the target distribution p(z), 2. v is independent of z and thermalized around zero with variance proportional to m..
Thus, the stationary distribution is a decoupled joint distribution where z governs the spatial distribution, and v represents a Gaussian thermal velocity.
The Fast Langevin Dynamics (FLD) The FLD reparametrizes Eq 152 through the transformations: L m L, and P = I, resulting in the following system:
q 1 = r==
dz qdr
dq ] dq= s())
(()) dr + V2dW.)
(157)
where s(z) Va log))
Transforming to q, we have the stationary distribution:
p(z.q) p(z))((q(O.1)
(158)
This proves Theorem
4.2
More Production-Leve Model Evaluations Across Architectures
This section offers a qualitative analysis LanPaint's 's performance across diverse models, in comparison to Co'fyUl's built-in inpainting functionality (Comfy UI Wiki 2025). which is variant of the Replace method. The evaluation demonstrates LanPaint's strong generalization capabilities, effectively handling various mask types and models from different communities and companics, across range of architectures.
41

---

Published in Transactions on Machine Learning Research (10/2025)
Original
ComfyUl Build-in Inpainting
LanPaint
Masked
Figure 10: Model: animagineXL400 v40pt, Prompt: "basketball, masterpiece, high score, great score, ab-
surdres', Steps: 30, CFG Scale: 5.0, Sampler: Euler, Scheduler: Karras, LanPaint Iteration Steps: 2, Seed:
0, Batch Size: 4
Original
ComfyUl Build-in Inpainting
LanPaint
Masked
Figure 11: Model: amimagineXI40._ v4Opt, Prompt: 'Igirl, blue shirt, masterpiece, high score, great score, absurdres", Steps: 30, CFG Scale: 5.0, Sampler: Euler, Scheduler: Karras, LanPaint. Iteration Steps: 5. Seed: 0, Batch Size: 4
42

---

Published in Transactions on Machine Learning Research (10/2025)
Original
ComfyUl Build-in Inpainting
LanPaint
Masked
Figure 12: Model: juggernautXL. jaagelijuugBBBBBX BangXIiyRundifussioo Prompt: 'Igirl, sad, beautiful girl, night, master-
piece", Steps: 30, CFG Scale: 5.0, Sampler: Euler, Scheduler: Karras, LanPaint Iteration Steps: 5, Seed: 0,
Batch Size:
Original
ComfyUl Build-in Inpainting
LanPaint
Masked
Figure 13: Model: juggernautXL Rannddfuinnniiiisusiio Prompt: "Igirl, yoga, beautiful, masterpiece',
Steps: 30, CFG Scale: 5.0, Sampler: Euler, Scheduler: Karras, LanPaint Iteration Steps: 5, Soed: 0, Batch
Size:
43

---

Published in Transactions on Machine Learning Research (10/2025)
Original
ComfyUI Build-in Inpainting
LanPaint
Masked
Figure 14: Model: animagineXL40 v40pt, Prompt: 'Igirl, multiple views, multiple angles, clone, turnaround, from side, masterpicce, high score, great score, absurdres', Steps: 30, CFG Scale: 5.0, Sampler: Euler, Scheduler: Karras, LanPaint Iteration Steps: 5, Seed: 0, Batch Size: 4
Original
ComfyUl Build-in Inpainting
LanPaint
Masked
Figure 15: Model: fluxl-dev-fp8, Prompt: 'cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open placing a fancy black forest cake with candles on top of a dinner table of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere there are paintings on the walls', Steps: 30, CFG Scale: 1.0, Sampler: Euler, Scheduler: Simple, LanPaint Iteration Steps: 5, Seed: 0, Batch Size: 4
44

---

Published in Transactions on Machine Learning Research (10/2025)
Original
ComfyUI Build-in Inpainting
LanPaint
Masked
Figure 16: Model: hidream dev dev__de_..__________ Prompt: "An animo-style girl intensely playing basketball, mid- dribble with sweat glistening under the court lights. The scoreboard shows 98-95, highlighting the close match. She wears sleek jersey and shorts, sneakers gripping the polished floor. Dynamic motion, vibrant colors, ultra-detailed (absurdres), with dramatic lighting and glowing energy like high-stakes anime sports moment.', : Steps: 28, CFG Scale: 1.0, Sampler: Euler, Scheduler: Normal, LanPaint Iteration Steps: 5, Seed: 0, Batch Size:
ComfyUl Build-in Inpainting
LanPaint
Original
Masked
Figure 17: Model: sd3.5 large, Prompt: "a bottle with a rainbow galaxy inside it on top of wooden table snowy mountain top with the ocean and clouds in the background', Steps: 30, CFG Scale: 5.5, Sampler: Éuler, Scheduler: sgm uniform, LanPaint Iteration Steps: 5, Seed: 0, Batch Size: 4
45


Reviews:
[{"review_id": "3hBQqJ1bEa", "reviewer": "Reviewer_TfeF", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This paper proposes a training-free algorithm to inpaint/outpaint an image with diffusion. The method (coined LanPaint) extends the Langevin dynamics Monte Carlo approaches, introducing two innovations: the BiG score and the fast Langevin dynamics (FLD). The BiG score is designed to prevent the Langevin dynamics from falling in local minima by introducing a mechanism to incorporate the feedback of inpainted pixels to correct the posterior for the seen pixels. The FLD is a variant of underdamped LD that can use a larger step size.", "claims_and_evidence_yn": "Yes", "claims_explanation": "The claims are mostly backed up by empirical results, except for the theoretical claim on the asymptotic exactness of the conditional sampler (Thm 3.1) and the stationarity (Thm 3.2).\n\nThe empirical claims are backed-up well through both experiments on both synthetic and realistic data, with a concrete ablation study. While I believe that some of the claims should be narrowed down and backed up slightly more rigorously, I find that the submission to contain mostly satisfactory evidences.", "audience_yn": "Yes", "audience_explanation": "The problem this paper addresses---inpainting with diffusion models---is practically important. I am not sure if the Langevin dynamics approach will be the dominant in the near future, but it is definitely relevant and many people will be interested in improving and refining the approach.", "requested_changes": "- One thing that is not very clear to me is whether the authors claim the FLD to be a generally better variant of LD (or ULD). From what is stated in section 3.2, it seems like that FLD indeed is a better version, as none of the arguments seem to pertain to the task of diffusion-based inpainting. If this is what authors intend to argue (which is a bold claim), please be a little bit more straightforward and empirically prove this point more rigorously. If not, please explain why this is a specialized solution for the task at hand.\n- Related to the prior point, the effectiveness of the FLD has been somewhat under-validated in the ablation studies. In particular, the table 3 shows that FLD works as intended for ImageNet, but not for CelebA. If a method works on only one dataset out of two, I am not really sure if it is indeed working. I request the authors to add back up this point, perhaps by adding a new dataset or testing with a finer grid of step sizes.\n- Also, I wonder how the hyperparameters have been tuned for both the proposed LanPaint and the baselines (esp. the step sizes). LanPaint has additional hyperparameters, so this point should be clarified to ensure the fairness of the comparison. \n- Authors say that eq.11 is a \"relaxation\" of eq.7, but I fail to see why it is technically a relaxation. Relaxation (as I know it) usually refers to a looser lower or upper bound which is usually easier to handle. However, as both equations are written with a hand-wavy \\approx, I am not should which one is looser.\n- As a minor comment, the manuscript was quite difficult to read for a person who reads on a laptop, because the locations where the figures are mentioned and where the figures actually appear at was quite far away from each other. For instance, Figure 3 has been referred in page 4, but appears in page 7. I recommend changing the orders and locations accordingly.\n- As another minor suggestion, the experiments sections will be easier to read if the authors could give a brief overview of the baselines they consider, and how they match to the categories of inpainting methods described in the introduction.\n- Finally, there are some typos and mistakes. Please see \"additional comments.\"", "broader_impact_concerns": "I do not have any concerns.", "additional_comments": "- Please also fix the grammatical error (if I am correct): In the second paragraph of the introduction, there is a phrase \"as iteratively denoise and renoise\" which I believe should be \"as iteratively denoising and renoising.\"\n- Also, please fix many \\citet which should be \\citep instead.\n- In table 5, the order of Repaint-Euler-10 and Repaint-Euler-5 should be the opposite?", "extra_scores": {}, "extra_text": {}}, {"review_id": "BKz4z48nv4", "reviewer": "Reviewer_bWWV", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The authors present an inpainting method for ODE-based diffusion that is training-free and asymptotically exact. They focus on partial conditioning sampling to preserve the exact values of known pixels. It consists of two main contributions: (1) The bi-directional guided score (\"BiG\") which \"loosens\" the constraint by exchanging information between both the known and inpainted pixels during generation, in order to make generation asymptotically exact and have the final result match the true posterior distribution given $y_0$. It also helps the generation escape local likelihood maximas; (2) Fast Langevin dynamics, a \"stabilized\" version of underdamped Langevin dynamics that allows for faster generation with less inner and diffusion steps. They demonstrate these advantages, i.e., asymptotically exact conditioning, reduced cost, general applicability, and local maxima escape, on diverse experiments, which include synthetic Gaussian data, masked versions of popular image datasets, and usage on large well-known models such as StableDiffusion-XL.\n\n### Strengths\n- The methodology is clear, theoretically grounded and well-motivated.\n- The authors say they have implemented their method into the popular ComfyUI software, which displays great reproducibility efforts. \n- The targeted problems are quite important and have wide applications.\n- The method can be used with a wide variety of models, which further strengthens its use case as a training-free conditioning technique.\n- I appreciate the range of experiments, both synthetic data for demonstrating their theoretical claims as well as more concrete use cases on real large-scale models. The ablation study also highlights well the method.\n### Weaknesses\n\n- I think presentation could be strengthened. \n\t- There are some typos and inconsistencies in the paper. I think it requires better proofreading before publishing.\n\t- The structure lacks a bit of connection and coherence. Maybe Sections 2 and 5 could be merged, and 5 could better highlight summary results, paths for future work, more detailed limitations, parallel lines of work, etc.\n\t- Table and figure placement could be improved.\n- The limitation section is too short in my opinion, as stated above. Do the authors have recommendations for future work to adapt this method for distilled models, as reduced cost is part of the targeted issues?\n- Although the claim for asymptotically exact generation is well-supported theoretically, I think more recent methods that adopt a different approach could be good benchmark candidates. For example, moment-matching posterior [1] sampling can be used in a training-free manner to produce high-quality posterior samples. I understand your discussion that those methods do not exactly preserve the known parts, but as far as I understand it, especially in a discrete real setting, the BiG score kind of relaxes this constraint and allows $y$ to change during generation. Also, contrary to these methods, LanPaint and similar methods consider no uncertainty on the known parts, which can be an issue in some posterior sampling settings, and could maybe be discussed.\n- Therefore, the claim for asymptotical exactness might be a bit too strong considering the possible drifts in practice? Did you observe that, especially on real-world images? Do you expect your method to be used in more diverse domains?\n\n[1] : Rozet, F., Andry, G., Lanusse, F., & Louppe, G. (2024). Learning diffusion priors from observations by expectation maximization. _Advances in Neural Information Processing Systems_", "claims_and_evidence_yn": "Yes", "claims_explanation": "The major claims of the paper are in my opinion well-supported by the experiments and evidence. The synthetic Gaussian experiments demonstrate the sampling method can reach good results, both qualitatively and quantitatively in a few iterations and escape local maximas. Qualitative and quantitative results on CelebA and ImageNet support the claims for more complex datasets, providing consistent and plausible samples as well as low FID and LPIPS scores. Finally, I think the examples on large-scale pre-trained models truly strengthens the claims by showing that it can be applied on top of any popular large-scale model as a real-world use case. Overall, the method outperforms the inpainting baselines on these different benchmarks, and also reduces computational cost compared to most candidates. The ablation study also supports the importance of both components, the BiG score and Fast Langevin Dynamics.", "audience_yn": "Yes", "audience_explanation": "Generative modeling, inpainting, and overall conditioning on masked areas are extremely important topics of clear interest to the community, both for image generation as highlighted by the experiments here, but also in areas like scientific generative modeling. I think training-free methods are a particularly important topic for diffusion models, considering the numerous use cases, such as building upon large foundation models. The targeted issues, efficiency, exactly matching (asymptotically) the distribution, and local minima, are also quite important to tackle. The method is well theoretically grounded, has public implementation in ComfyUI as mentioned by the authors in the paper, and its advantages are well demonstrated throughout the experiments.", "requested_changes": "Beside answering the questions above, here are a few more precise changes. In my opinion, most presentation changes are required for acceptance.\n### Presentation\nI think a better presentation would strengthen the paper and its reading. \n- Please proofread thoroughly the paper. There are many typos and inconsistencies. I noted some I found below in the additional comments.\n- As mentioned in the weaknesses, the structure is a bit hard-to-follow in my opinion, and the end feels like it lacks something:\n\t- Related works at the end is nice, but feels quite disconnected. I think it should be, and limitations too, part of a Discussion section.\n\t- A discussion section with a summary, future work recommendations, deeper discussions around limitations, use cases, and more would be very much appreciated to end the paper.\n\t- Is 5.1 really needed in the main text?\n- Pay attention to references to figures in the text. For example, in Section 4.1, second paragraph, \"the image\" is a bit confusing. Also, be consistent between the use of \"Equation ...\" vs \"Eq. ...\", same for Figure vs Fig.\n- Maybe the position of the figures could be improved a bit, but this is more minor.\n### Other\n- I think the discussion and opposition with \"inexact\" methods could be a bit different, as mentioned in the weaknesses above. I appreciate you still included it as \"supplementary reference\" but I think it can truly serve as a true benchmark and more recent comparisons could strengthen the paper.\n- Could your method effectively consider uncertainty over known regions? If not, please include it in your limitations, even if you consider it to be a basic assumption considering the exact match requirement. If yes, please also discuss it.\n- If possible, but this is not required at all, as mentioned above, comparisons with methods such as MMPS would be interesting. This also concerns quantitative results, which might also be interesting with higher numbers of steps for methods that require it.", "broader_impact_concerns": "Like all generative modeling, especially inpainting applied to real images like in this case with popular tools, there are large societal impacts, both negative and positive. I think it is important to at least mention the impact and refer to ethical resources, such as [2] and [3]. Especially as this method is targeted toward efficient generation, which poses more risks for spreading misinformation, deepfakes, etc. I think for example the last figure of the appendix might already be borderline, especially to include in a paper, and clearly highlights some risks of such methods. If not removed, it should maybe be part of a small discussion about this. \n\n[2] Emily Denton. Ethical considerations of generative ai. AI for Content Creation Workshop, CVPR, 2021. 9\n\n[3] Franks, Mary Anne, and Ari Ezra Waldman. \"Sex, lies, and videotape: Deep fakes and free speech delusions.\" Md. L. Rev. 78 (2018): 892.", "additional_comments": "Here are some of the typos I found during my readings:\n- Abstract: exact partial conditional sampling methods **(with s)** for ODE-based\n- End of introduction, 5th line before the end: you write in-painting while you do not use a hyphen in the rest of the work.\n- End intro: missing \"and\" in last paragraph \n- 2.1: \"is a sampling technique\", no s.\n- End of 2.2 : \"also fall\" instead of fail. \n- Title of 2.3: \"InPainting\", why is P uppercase?\n- End of page 3: \"The only problem **that** remains\" (missing that)\n- end of page 3: approximately sample (with no s)\n- First line of page 4: \"but fails to ensure\" fails with s.\n- End of page 4, \"at t = 0\" twice\n- Page 5, right before \"Theorem 3.1\": duplicate \"the\".\n- BiG sometimes written BIG? End of page 4\n\t- 4.4 : \"bidirectional generative\" instead of guided for BiG also.\n\t- Please be consistent with your acronyms.\n- Beginning page 5: \"then discard**ing**\"\n- Many occurrences of \"equation\" without uppercase E and without a reference to the equation. Please be consistent.\n- Page 9, first paragraph: \"qualitative\" instead of \"quanlititive\"\n- Table 3 caption: \"share similar trends\" → should be \"shares similar trends\".\n- 4.5: \"build in ComfyUI\" -> \"built in ComfyUI\"\n- Title of section 5.1: \"Recitified Flow\" -> \"Rectified Flow\"\n- Other inconsistent hyphenation: training free, training-free, in-painting vs inpainting, etc.\n\nI definitely could not write all of them, so please proofread carefully.", "extra_scores": {}, "extra_text": {}}, {"review_id": "mSE1pofumo", "reviewer": "Reviewer_mmMZ", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This paper presents LanPaint, a novel training-free framework for partial conditional sampling in diffusion models, specifically targeting the inpainting problem. The key contributions lie in two innovations: the Bidirectional Guided (BiG) Score, which introduces a mutual feedback mechanism between the known and inpainted regions to effectively avoid local maxima trapping issues common in fast ODE-based samplers; and the Fast Langevin Dynamics (FLD), an accelerated Langevin sampling method with momentum that converges quickly within just a few inner iterations while rigorously preserving the stationary distribution of the original Langevin dynamics. The authors provide theoretical guarantees and verify them on synthetic Gaussian benchmarks. Extensive experiments on standard datasets like CelebA-HQ and ImageNet demonstrate that LanPaint outperforms existing training-free methods in perceptual and distributional metrics while being more memory efficient. Moreover, LanPaint generalizes seamlessly to modern production-scale diffusion architectures, including Stable Diffusion XL and rectified flow models, proving its practical usability and broad applicability without requiring retraining.", "claims_and_evidence_yn": "Yes", "claims_explanation": "The paper supports its claims with solid theoretical proofs, which are backed by empirical validation on both synthetic benchmarks—where exact KL divergence to the target distribution is computed—and real-world datasets. Quantitative results on CelebA-HQ and ImageNet using standard metrics such as LPIPS and FID consistently show improvements over strong baselines. Qualitative examples on large-scale diffusion models further illustrate the practical effectiveness of the approach. Overall, the evidence presented is thorough, convincing, and clearly tied to the main contributions.", "audience_yn": "Yes", "audience_explanation": "The work addresses a longstanding challenge of training-free conditional sampling in diffusion models with a theoretically principled and computationally efficient solution. Its broad applicability across various diffusion architectures and the potential for immediate use in real-world systems further increases its appeal.", "requested_changes": "- Include high-resolution experiments at 512×512 and 1024×1024 resolutions, testing various mask types (box, free-form, outpainting), and report both perceptual quality metrics (LPIPS/FID) and computational costs to demonstrate scalability.\n- Evaluate the method using diverse ODE solvers beyond Euler under comparable step budgets to assess solver-agnostic robustness and efficiency.\n- Provide a comprehensive sensitivity analysis of critical hyperparameters, including the guidance scale λ, friction coefficient Γ, inner iteration count, and step size, with clear recommendations for practical settings.\n- Conduct a user study with a sufficient number of participants (e.g., 30) performing blind A/B comparisons on challenging mask types to assess subjective perceptual quality and preference.\n- It would also be beneficial to provide empirical analysis validating assumptions made in the BiG score approximation, such as measuring the magnitude of the discarded gradient terms during sampling.", "broader_impact_concerns": "LanPaint makes high-quality image inpainting easier and more accessible, which raises concerns about potential misuse for creating deepfakes or misleading content. The paper should briefly address these risks and suggest mitigation measures like watermarking or provenance tracking.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Decision: Accept (poster)