IS-Diff: Improving Diffusion-Based Inpainting with Better Initial Seed
Organizations: School of Computer Science, Wuhan University, Wuhan 430072, China
Abstract
Diffusion models have shown promising results in free-form inpainting. Recent studies based on refined diffusion samplers or novel architectural designs led to realistic results and high data consistency. However, random initialization seed (noise) adopted in vanilla diffusion process may introduce mismatched semantic information in masked regions, leading to biased inpainting results, e.g., low consistency and low coherence with the other unmasked area. To address this issue, we propose the Initial Seed refined Diffusion Model (IS-Diff), a completely training-free approach incorporating distributional harmonious seeds to produce harmonious results. Specifically, IS-Diff employs initial seeds sampled from unmasked areas to imitate the masked data distribution, thereby setting a promising direction for the diffusion procedure. Moreover, a dynamic selective refinement mechanism is proposed to detect severe unharmonious inpaintings in intermediate latent and adjust the strength of our initialization prior dynamically. We validate our method on both standard and large-mask inpainting tasks using the CelebA-HQ, ImageNet, and Places2 datasets, demonstrating its effectiveness across all metrics compared to state-of-the-art inpainting methods.
Figures & tables
| Methods | Wide | Half | Expand | Time Cost (s/image)↓ | |||
| LPIPS↓ | FID↓ | LPIPS↓ | FID↓ | LPIPS↓ | FID↓ | ||
| SI [CVPR 22] [ Rombach_Blattmann_Lorenz_Esser_Ommer_2022 ] | 0.273 | 70.44 | 0.385 | 66.66 | 0.763 | 139.76 | 5 |
| SI + HP [ICLR 25] [ manukyan2023hd ] | 0.249 | 64.82 | 0.463 | 92.17 | 0.781 | 170.18 | 15 |
| SI + Ours | 0.238 | 54.91 | 0.381 | 61.32 | 0.676 | 123.36 | 3 |
| PP [ECCV 24] [ zhuang2023task ] | 0.263 | 63.83 | 0.397 | 91.62 | 0.779 | 178.45 | 3 |
| PP + Ours | 0.254 | 53.85 | 0.373 | 68.69 | 0.707 | 160.62 | 3 |
| Methods | Wide | Half | Expand | Time Cost (s/image)↓ | |||
|---|---|---|---|---|---|---|---|
| LPIPS↓ | FID↓ | LPIPS↓ | FID↓ | LPIPS↓ | FID↓ | ||
| SI [CVPR 22] [ Rombach_Blattmann_Lorenz_Esser_Ommer_2022 ] | 0.237 | 107.07 | 0.323 | 91.08 | 0.617 | 165.18 | 5 |
| SI + HP [ICLR 25] [ manukyan2023hd ] | 0.207 | 66.30 | 0.458 | 164.69 | 0.686 | 230.50 | 15 |
| SI + Ours | 0.191 | 63.22 | 0.303 | 52.88 | 0.609 | 132.64 | 3 |
| PP [ECCV 24] [ zhuang2023task ] | 0.223 | 101.90 | 0.267 | 53.32 | 0.691 | 276.22 | 3 |
| PP + Ours | 0.207 | 74.96 | 0.254 | 42.84 | 0.667 | 262.46 | 3 |
| Methods | CelebA-HQ | ImageNet | ||||
|---|---|---|---|---|---|---|
| Wide | Half | Expand | Wide | Half | Expand | |
| DDNM [ Wang_Yu_Zhang_2022 ] | 34.4% | 16.9% | 24.9% | 21.3% | 25% | 22.6% |
| RePaint [ Lugmayr_Danelljan_Romero_Yu_Timofte_Van_Gool_2022 ] | 16.8% | 23.5% | 36.3% | 21.8% | 19.9% | 25.1% |
| Ours | 48.8% | 59.6% | 38.8% | 56.9% | 55.1 % | 52.3 % |
| Methods | Wide | Half | Expand | Time Cost (s/image)↓ | |||
|---|---|---|---|---|---|---|---|
| LPIPS↓ | FID↓ | LPIPS↓ | FID↓ | LPIPS↓ | FID↓ | ||
| SI’ [CVPR 22] [ Rombach_Blattmann_Lorenz_Esser_Ommer_2022 ] | 0.212 | 8.23 | 0.363 | 13.81 | 0.689 | 45.13 | 5 |
| SI + HP’ [ICLR 25] [ manukyan2023hd ] | 0.234 | 12.43 | 0.469 | 74.57 | 0.779 | 105.46 | 15 |
| SI + PP’ [ECCV 24] [ zhuang2023task ] | 0.267 | 25.09 | 0.423 | 64.14 | 0.711 | 87.64 | 3 |
| SI + Ours | 0.181 | 6.82 | 0.350 | 12.01 | 0.678 | 31.31 | 3 |
| Method | CLIP Score | SSIM |
|---|---|---|
| Stable Diffusion Inpainting | 30.1 | 0.708 |
| Stable Diffusion Inpainting + Ours | 30.7 | 0.726 |
| Methods | Wide | Half | Expand | |||
|---|---|---|---|---|---|---|
| LPIPS↓ | FID↓ | LPIPS↓ | FID↓ | LPIPS↓ | FID↓ | |
| Baseline (w/o resample) | 0.160 | 31.68 | 0.351 | 55.58 | 0.780 | 127.69 |
| Ours (w/o DSR) | 0.155 | 30.02 | 0.340 | 50.47 | 0.777 | 122.63 |
| Ours | 0.128 | 22.01 | 0.328 | 39.94 | 0.721 | 121.17 |
| Methods | L2 Distance of two runs |
|---|---|
| Baseline (DDNM) | 0.2273 |
| Ours | 0.3073 |
| Methods | Expand | Inference time | |
| LPIPS↓ | FID↓ | (s/image)↓ | |
| RePaint | 0.564 | 99.21 | 21 |
| RePaint ( =250) | 0.564 | 86.22 | 50 |
| RePaint ( =15) | 0.563 | 102.51 | 27 |
| Ours ( =3) | 0.547 | 60.86 | 4 |
| Ours ( =4) | 0.539 | 57.82 | 5 |
| LPIPS | FID | |
|---|---|---|
| 1 | 0.352 | 63.41 |
| 3 | 0.340 | 58.79 |
| 5 | 0.328 | 39.94 |
| 7 | 0.329 | 39.47 |
| 0.4T | 0.6T | 0.8T | |
|---|---|---|---|
| LPIPS | 0.342 | 0.328 | 0.343 |
| FID | 43.89 | 39.94 | 45.43 |
| LPIPS | FID | |
|---|---|---|
| 1.0 | 0.327 | 39.73 |
| 1.5 | 0.327 | 39.79 |
| 2.0 | 0.328 | 39.85 |
| 2.5 | 0.328 | 39.94 |
| 3.0 | 0.334 | 41.04 |
| LPIPS | FID | |
|---|---|---|
| LPIPS | 0.342 | 54.70 |
| DCE | 0.328 | 39.94 |
Image Inpainting
Image inpainting reconstructs missing or corrupted image regions using surrounding context, learned visual priors, and optional structural or reference guidance.
See all 92 papers