LanPaint: Training-Free Diffusion Inpainting with Asymptotically Exact and Fast Conditional Sampling

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.

Cite

Text

Zheng et al. "LanPaint: Training-Free Diffusion Inpainting with Asymptotically Exact and Fast Conditional Sampling." Transactions on Machine Learning Research, 2025.

Markdown

[Zheng et al. "LanPaint: Training-Free Diffusion Inpainting with Asymptotically Exact and Fast Conditional Sampling." Transactions on Machine Learning Research, 2025.](https://mlanthology.org/tmlr/2025/zheng2025tmlr-lanpaint/)

BibTeX

@article{zheng2025tmlr-lanpaint,
  title     = {{LanPaint: Training-Free Diffusion Inpainting with Asymptotically Exact and Fast Conditional Sampling}},
  author    = {Zheng, Candi and Lan, Yuan and Wang, Yang},
  journal   = {Transactions on Machine Learning Research},
  year      = {2025},
  url       = {https://mlanthology.org/tmlr/2025/zheng2025tmlr-lanpaint/}
}