Adapting Text-to-Image Generation with Feature Difference Instruction for Generic Image Restoration

Chao Wang, Hehe Fan, Huichen Yang, Sarvnaz Karimi, Lina Yao, Yi YangCVPR 2025 · DOI

Abstract

Image restoration (IR) aims to recover high-quality images from corrupted versions. While Diffusion-based Text-to-Image (T2I) models offer significant generative potential, their application to IR is hindered by the difficulty of describing complex degradations via text and the interference between image content and degradation signals. We present DiffRes, a framework that utilizes "Feature Difference Instructions" (FDI) to guide pre-trained diffusion models. By isolating degradation signals in the feature space of vision-language models, DiffRes achieves state-of-the-art performance across ten restoration tasks, including complex mixed degradations, without requiring extensive retraining of the base model.

What Problem Does This Paper Address?

Image restoration—removing rain, haze, noise, or blur—is a classic computer vision challenge. While recent Diffusion-based Text-to-Image (T2I) models like Stable Diffusion have incredible generative powers, using them for restoration is tricky. Existing methods often struggle with prompt design, as it is difficult to describe complex degradations using just text. Furthermore, when a model tries to learn degradation from a corrupted image, the image's actual content often "pollutes" the guidance signal, leading to artifacts. Finally, creating an "all-in-one" model that handles multiple or mixed degradations remains a significant hurdle.

An example of mixed degradation, where multiple types of corruption like haze and blur overlap.

The DiffRes Framework

The authors introduce DiffRes, which treats restoration as a guided generation process. The key components are:

  • Feature Difference Instruction (FDI): The researchers found that in vision-language models like BLIP-2, features for image content and degradation are roughly linearly separable. By taking a reference pair (a clean image and its degraded version) and subtracting their features, they isolate a "pure" degradation signal. During inference, they can use an average FDI from a specific category to guide the model.
  • Inversion-based Reconstruction: Instead of starting from random noise, they use DDIM inversion to project the degraded image into the latent space of Stable Diffusion. This ensures the restored image keeps the original structure and content.
  • FDI Adapter: A lightweight, multi-scale module that injects the FDI into the frozen Stable Diffusion U-Net. It uses cross-attention to refine the FDI based on the image's features, ensuring the "restoration instructions" are applied to the right places.
  • Visual Modulator: Located in the U-Net's decoder, this module uses the refined FDI to modulate features (using techniques like AdaIN), encouraging the model to align the output with the distribution of clean, high-quality images.

Key Results

DiffRes achieved state-of-the-art (SOTA) performance across almost all tested categories, outperforming specialized models and other recent all-in-one frameworks like DA-CLIP and PromptIR.

Qualitative comparison across various restoration tasks, showing degraded images (top) and restored results (bottom).

Visually, the model produces much sharper textures and more realistic details compared to previous methods, which often leave "ghosting" artifacts or over-smooth the image. On the Rain100H benchmark, DiffRes achieved a PSNR of 34.55 dB, significantly higher than DA-CLIP (33.91 dB). In all-in-one settings, it maintained the highest average PSNR (29.78 dB) across five major tasks.

Conclusion

DiffRes demonstrates that pre-trained T2I models can be effectively repurposed for generic image restoration through modular adapter-tuning and feature-space instructions. By bypassing the limitations of text prompts and leveraging the linear separability of vision-language features, the framework provides a scalable, high-performance solution for a wide range of visual corruptions. Future work may explore extending this "feature difference" approach to broader image-to-image translation tasks, such as style transfer or localized editing.

Summary updated

BibTeX
@inproceedings{wang2025adapting,
  author = {Chao Wang and Hehe Fan and Huichen Yang and Sarvnaz Karimi and Lina Yao and Yi Yang},
  title = {{Adapting Text-to-Image Generation with Feature Difference Instruction for Generic Image Restoration}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02192},
}
Figure