Abstract
MoE-DiffIR introduces a task-customized diffusion prior framework designed for universal compressed image restoration (CIR). While image compression is essential for efficient data transmission, it often introduces diverse artifacts that vary significantly across different codecs. Traditional restoration methods typically struggle with universality and the reconstruction of lost textures. MoE-DiffIR addresses these challenges by employing a Mixture-of-Experts (MoE) prompt system and a visual-to-text adapter to adaptively restore images. By leveraging the generative power of Stable Diffusion and a two-stage training strategy with a decoder compensator, the model achieves state-of-the-art performance in both perceptual quality and structural fidelity across a wide range of compression standards.
Introduction
Image compression is a fundamental technology for the modern web, yet it remains a double-edged sword. At low bitrates, compression introduces significant visual artifacts, ranging from the "blocking" seen in traditional JPEG files to the heavy blurring characteristic of modern AI-based codecs.
Existing Compressed Image Restoration (CIR) methods face two primary hurdles. First is the lack of universality: most models are specialists, trained for a specific codec, and fail when applied to others due to differing distortion patterns. Second is the texture gap: at high compression levels, original texture information is often permanently lost. While generative models like Stable Diffusion can "hallucinate" these textures back, they frequently struggle to maintain structural consistency with the original image.
Methodology
MoE-DiffIR treats restoration as a task-customized generative process. The architecture is built upon three technical pillars designed to bridge the gap between generic generation and high-fidelity restoration.
Mixture-of-Experts (MoE) Prompt Module
Rather than using a single static prompt, MoE-DiffIR maintains a pool of "expert" prompts. A Degradation-Aware Router, powered by a pre-trained CLIP encoder, analyzes the input image and selects the top-$K$ most relevant experts for the specific distortion type. This avoids the "mean feature" trap where averaging multiple prompts leads to generic, blurry results, instead forcing the model to utilize specialized knowledge for each codec.
Visual-to-Text Adapter
To fully utilize the generative priors of Stable Diffusion, MoE-DiffIR maps visual features from the low-quality input into the textual embedding space. This cross-modality reuse allows the model to leverage Stable Diffusion's semantic understanding (e.g., recognizing faces or foliage) to generate more contextually accurate textures than purely visual models.
Two-Stage Fine-Tuning and Decoder Compensation
The training is divided into two distinct stages to balance generation and fidelity:
- Stage I: Focuses on training the MoE-Prompt module to modulate Stable Diffusion’s internal features via SPADE layers.
- Stage II: Fine-tunes a Decoder Compensator. Recognizing that the standard VAE decoder in Stable Diffusion is optimized for generation rather than restoration, this module injects low-quality image features back into the decoding process to ensure the final output remains faithful to the original image structure.
Universal CIR Benchmark
To evaluate the model's robustness, the authors established a new Universal CIR Benchmark. This comprehensive testing ground covers 21 types of degradation across 4 traditional codecs (JPEG, VVC, HEVC, WebP) and 3 learned codecs ($C_{PSNR}$, $C_{SSIM}$, and HiFiC). Testing was conducted across standard datasets including LIVE1, BSDS500, and DIV2K.
Results and Discussion
MoE-DiffIR sets a new benchmark for universal restoration performance:
- Perceptual Quality: The model achieved a 10.9% reduction in LPIPS compared to SUPIR, indicating significantly higher human-perceived visual similarity to the ground truth.
- Fidelity: It outperformed StableSR by 0.41dB in PSNR, demonstrating that the model improves accuracy alongside visual appeal.
- Robustness: Qualitative analysis shows the model successfully restoring fine details, such as legible text and skin textures, where competing models like PromptIR or DiffBIR produced artifacts or "mushy" results.
Conclusion
MoE-DiffIR represents a significant advancement in "all-in-one" image restoration. By combining task-customized MoE prompts with the generative power of diffusion models, it effectively bridges the gap between texture hallucination and structural fidelity. While challenges remain at extreme bitrates where data loss is near-total, MoE-DiffIR provides a robust framework for universal image repair in the age of diverse compression standards.
Summary updated