UniLDiff: Unlocking the Power of Diffusion Priors for All-in-One Image Restoration

Zihan Cheng, Liangtai Zhou, Dian Chen, Ni Tang, Xiaotong Luo, Yuan Xie, Yanyun Qu

TL;DR

UniLDiff is a novel Latent Diffusion Model (LDM) framework for All-in-One Image Restoration that handles multiple, complex degradations without requiring explicit task labels. By introducing a step-wise feature fusion mechanism and a detail-aware Mixture-of-Experts decoder, it effectively overcomes the spatial limitations and detail loss common in prior diffusion-based restoration models, achieving state-of-the-art perceptual quality.

What Problem Does This Paper Address?

Traditional image restoration models are single-purpose, trained specifically to handle one type of degradation like blurring, rain, or noise. This lacks scalability for real-world applications where an image might suffer from multiple, spatially varying, or unknown corruptions.

All-in-One Image Restoration (AiOIR) aims to solve this with a unified framework. Recently, Latent Diffusion Models (LDMs) have shown promise here due to their strong generative priors. However, current diffusion-based AiOIR methods suffer from two major flaws:

  1. Rigid, Global Conditioning: They rely on global text or visual prompts, which assume uniform degradation across the image and lack the spatial specificity needed for localized corruptions (e.g., a patch of rain or shadow).
  2. Information Loss: Heavy compression within VAE encoders and the iterative nature of diffusion sampling inherently blur fine textures and structures.

UniLDiff addresses these gaps by explicitly embedding degradation-aware and detail-preserving mechanisms directly into the diffusion process.

Figure 2. Overall architecture of the proposed UniLDiff framework.

Methods

UniLDiff builds upon Stable Diffusion XL (SDXL) and introduces two primary architectural components:

  • Degradation-Aware Feature Fusion (DAFF): Instead of naively concatenating low-quality (LQ) features—which can introduce interference in later denoising stages—DAFF uses a cascaded double-stream and single-stream block architecture. It dynamically aligns LQ features with the evolving latent variables at every denoising timestep $t$, providing spatially adaptive guidance.
  • Detail-Aware Expert Module (DAEM): Integrated into the VAE decoder, DAEM uses a Mixture-of-Experts (MoE) architecture. It leverages skip-connected encoder features (retaining high-frequency details lost during VAE compression) to dynamically route local patches to specialized experts with varied receptive fields. A shared global branch with transposed self-attention ensures global semantic coherence.

The framework is trained in a unified two-stage strategy: first, optimizing degradation modeling via DAFF, followed by exclusive training of the DAEM decoder using reconstruction, structural similarity (SSIM), and load-balancing losses.

Datasets

The authors evaluated UniLDiff across several multi-task, composite, and real-world benchmarks:

  • Single-Degradation Datasets: BSD400 and WED (with synthetic Gaussian noise) for denoising; Rain100L for deraining; RESIDE-SOTS for dehazing; GoPro for deblurring; and LOL-v1 for low-light enhancement. Testing for denoising was performed on BSD68.
  • Composite Degradations: CDD11, which features 11 complex degradation combinations (e.g., Low-light + Haze, Low-light + Snow).
  • Zero-Shot Real-World Restoration: P-OLED and T-OLED datasets for under-display camera (UDC) restoration.

Key Insights and Ideas

  • The Danger of Static Conditioning: In diffusion restoration, keeping the conditioning feature static throughout the generation trajectory hurts performance. As the latent variable approaches a clean state, static low-quality features act as noise. Timestep-aware modulation (via DAFF) is essential to gracefully adjust the conditioning influence.
  • Latent Space Separation: t-SNE visualizations reveal that without DAFF, different degradation types remain highly intermixed in the latent space. Incorporating DAFF allows the model to implicitly cluster and distinctly separate degradation types, explaining its robust multi-task performance without explicit labels.
  • MoE for Localized Textures: High-frequency details like text and facial contours require different receptive fields than uniform regions. Utilizing an MoE architecture in the decoder allows the network to dynamically adapt its processing structure based on local degradation contexts.

Key Results

  • Perceptual Superiority: On three-task (dehazing, deraining, denoising) and five-task benchmarks, UniLDiff consistently outperformed competing diffusion and non-diffusion methods on perceptual metrics like LPIPS, DISTS, MUSIQ, and MANIQA.
  • Composite Robustness: On the challenging CDD11 dataset, UniLDiff achieved state-of-the-art results on multi-fold degradations, averaging 29.35 dB PSNR and 0.886 SSIM across all 11 tasks.
  • Zero-Shot Generalization: Without any fine-tuning or task prompts, UniLDiff achieved the best overall performance on real-world under-display camera datasets (T-OLED/P-OLED), demonstrating strong out-of-distribution robustness.
  • Efficiency: By tightly integrating its modules into the LDM backbone, UniLDiff eliminates the need for external adapters (like ControlNet). It processes a $512\times512$ image in 2.05 seconds using 20 inference steps on an A800 GPU—significantly faster than older diffusion baselines like WeatherDiff (128.3s) and AutoDIR (15.4s).
Figure 5. Visual results. In dehazing, our method restores more balanced colors and clearer scene structures compared with competing approaches, producing visually natural results. For low-light enhancement, it better preserves structural edges and surface textures while avoiding over-smoothing. In deraining, our method reconstructs continuous grid structures that other methods fail to recover, demonstrating superior fidelity and generalization across diverse degradations.

Limitations and Future Work

While UniLDiff drastically cuts down inference times compared to traditional diffusion baselines, its 2.05-second generation time is still slower than feed-forward, non-diffusion networks (such as pure CNN or Transformer architectures) and ultra-low-step diffusion models like DiffUIR (which runs in 0.3s using only 3 steps). The authors note that future work will focus on further reducing the number of required diffusion steps to enable real-time inference.

Summary updated

BibTeX
@inproceedings{cheng2026unildiff,
  author = {Zihan Cheng and Liangtai Zhou and Dian Chen and Ni Tang and Xiaotong Luo and Yuan Xie and Yanyun Qu},
  title = {{UniLDiff: Unlocking the Power of Diffusion Priors for All-in-One Image Restoration}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=MKibEriMs9},
}
Figure