Harnessing Diffusion-Yielded Score Priors for Image Restoration

Xinqi Lin, Fanghua Yu, Jinfan Hu, Zhiyuan You, Wu Shi, Jimmy S. Ren, Jinjin Gu, Chao Dong

TL;DR

This paper introduces HYPIR, a novel image restoration method that leverages pretrained diffusion models as powerful generative priors. By initializing an adversarial network with diffusion model weights and then fine-tuning it, HYPIR achieves state-of-the-art restoration quality with significantly faster training and inference speeds compared to existing diffusion-based methods, while also offering enhanced user control.

What Problem Does This Paper Address?

Image restoration, the process of recovering high-quality images from degraded versions, faces several challenges: effectively removing degradations, generating realistic details that align with natural image distributions, and ensuring pixel-level consistency. Traditional methods like MSE-based approaches often produce overly smooth images, while GAN-based methods can suffer from mode collapse and unstable training. Diffusion models have shown promise in generating highly realistic images but are notoriously slow due to their iterative sampling process. This paper aims to bridge this gap by combining the strengths of diffusion models (high realism) and GANs (fast inference) to achieve both high quality and efficiency in image restoration.

Methods

HYPIR's core innovation lies in its initialization strategy. Instead of training a restoration model from scratch or using standard pretraining methods, it initializes a generative adversarial network (GAN) with the weights of a pre-trained diffusion model. This diffusion model acts as a strong "score prior," guiding the GAN towards the natural image distribution.

The process involves:

  1. Diffusion Model Initialization: A pre-trained diffusion model (e.g., Stable Diffusion variants) provides the initial weights for the restoration network.
  2. Adversarial Fine-tuning: The initialized network is then fine-tuned using a GAN objective (generator and discriminator). This fine-tuning is lightweight, often using techniques like LoRA (Low-Rank Adaptation) to reduce trainable parameters and accelerate training.
  3. Degradation Pre-removal Encoder (Optional but beneficial): A VAE encoder is fine-tuned to specifically handle degradation removal before feeding into the main restoration network, further improving robustness.

Crucially, HYPIR does not rely on diffusion sampling, iterative refinement, or additional complex adapters, which are common in other diffusion-based restoration methods. This design choice is key to its speed improvements.

Datasets

The paper mentions using a large dataset comprising:

  • Approximately 20 million high-quality image patches with associated textual descriptions.
  • An additional 70 thousand face images.
  • Degraded inputs are synthesized using a pipeline similar to Real-ESRGAN.
  • Evaluation is performed on datasets like DIV2K and RealPhoto60, as well as a collection of historical photographs.

Key Insights and Ideas

  • Diffusion Models as Near-Optimal Initializers: The paper theoretically and empirically demonstrates that pre-trained diffusion models provide an exceptionally good starting point for image restoration GANs. This initialization places the model close to the natural image distribution, making adversarial training more stable and efficient.
  • Score Priors for Restoration: Diffusion models learn score functions (gradients of log-density), which are directly related to estimating the direction back to the natural image distribution. Harnessing these learned priors is more effective than traditional MSE or even GAN-based pretraining for restoration.
  • GANs Still Reign for Speed: Despite the impressive quality of diffusion models, their iterative nature makes them slow. By using diffusion models for initialization and then a single-pass GAN for restoration, HYPIR achieves GAN-like inference speeds.
  • User Control through Diffusion Capabilities: By leveraging the underlying diffusion model's architecture, HYPIR inherits capabilities like text-guided restoration, adjustable texture richness, and a generativity-fidelity trade-off, offering users fine-grained control over the restoration process.

Key Results

  • Superior Visual Quality: HYPIR consistently outperforms state-of-the-art methods, including diffusion-based and GAN-based approaches, in terms of perceptual quality, as validated by user studies.
  • Significantly Faster Training: HYPIR converges in tens of thousands of training steps, orders of magnitude faster than training GANs from scratch.
  • Rapid Inference: HYPIR achieves single-pass inference, making it comparable in speed to other single-step restoration models, even when using very large diffusion models (e.g., Flux, 12B parameters).
  • Numerical Stability: Diffusion initialization prevents common GAN training issues like mode collapse and gradient explosion, leading to more stable and reliable results.
  • Enhanced User Control: The method allows for flexible control over text prompts, texture richness, and the balance between fidelity and generativity.

Limitations and Future Work

  • Dependence on Diffusion Model Quality: The performance of HYPIR is inherently tied to the quality and capabilities of the chosen pre-trained diffusion model.
  • Computational Cost of Large Diffusion Models: While HYPIR reduces computational overhead compared to full diffusion sampling, initializing with extremely large diffusion models still requires substantial resources.
  • Future Work: The authors suggest exploring larger and more advanced diffusion models for even better performance and continuing to develop intuitive control mechanisms for image restoration. The paper also hints at the potential for further optimization of the adversarial fine-tuning process.

Summary updated

BibTeX
@article{lin2025harnessing,
  author = {Xinqi Lin and Fanghua Yu and Jinfan Hu and Zhiyuan You and Wu Shi and Jimmy S. Ren and Jinjin Gu and Chao Dong},
  title = {{Harnessing Diffusion-Yielded Score Priors for Image Restoration}},
  journal = {ACM Trans. Graphics},
  year = {2025},
  url = {https://openreview.net/forum?id=njOE0gWnug},
}
Figure