When Test-Time Guidance Is Enough: Fast Image and Video Editing with Diffusion Guidance

Ghorbel, Ahmed, Moufad, Badr, Shouraki, Navid Bagheri, Durmus, Alain Oliviero, Hirtz, Thomas, Moulines, Eric, Olsson, Jimmy, Janati, Yazid

–arXiv.org Artificial Intelligence 

In the era of text-driven generative models, editing tasks can be naturally formalized as inpainting problems, where regions of interest to be modified are masked and subsequently refilled with the desired content by manipulating a text prompt. Inpainting is a classical problem in computer vision that has motivated extensive research, with particularly prominent advances arising from recent large-scale generative models based on diffusion and flow matching models (Esser et al., 2024; Batifol et al., 2025; Wu et al., 2025). A direct approach to address inpainting problems is to train or fine-tune conditional diffusion models to explicitly incorporate additional inputs, such as masks and observed regions, to approximate the corresponding conditional distribution. While effective, these approaches incur non-negligible computational and data costs, which may be prohibitive in many practical scenarios. An appealing alternative is test-time guidance, which formulates inpainting as a Bayesian inverse problem: a pre-trained text-conditional diffusion model defines the prior, while a likelihood enforces consistency with observed regions.