SONIC: Spectral Optimization of Noise for Inpainting with Consistency
About
We propose a novel training-free method for inpainting with off-the-shelf text-to-image models. While guidance-based methods in theory allow generic models to be used for inverse problems such as inpainting -- in practice their effectiveness is limited, leading to the necessity of specialized inpainting-specific models. In this work, we argue the missing ingredient for training-free generic model usage is proper optimization of the initial noise sample. We optimize the initial noise to approximately reproduce the unmasked image, in as few as tens of optimization steps, then use it with a conventional training-free inpainting method. Critically, we propose two core ideas that make this possible: (i) we perform linear approximation that avoids the costly and often impractical unrolling required to relate the initial noise sample to model output -- which potentially is why this relationship was previously overlooked; and (ii) perform spectral preconditioning by optimizing the initial noise sample in the spectral domain with Adam, which stabilizes the optimization. We demonstrate our method on various inpainting tasks, outperforming the state of the art. Project website: https://ubc-vision.github.io/sonic/
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Image Inpainting | FFHQ (test) | LPIPS0.121 | 97 | |
| Inpainting | BrushBench | AS6.061 | 17 | |
| Inpainting | FFHQ, DIV2K, and BrushBench | Win Rate99.1 | 5 | |
| Image Inpainting | FFHQ 1024x1024 | PSNR22.562 | 2 |