Abstract
SODiff is a novel, one-step diffusion model designed to remove harsh JPEG compression artifacts while restoring realistic textures. By aligning image-based features with a pre-trained text-embedding space and adaptively predicting the optimal denoising timestep based on compression quality, it achieves state-of-the-art restoration performance with significantly higher efficiency than traditional multi-step diffusion models.
Introduction
JPEG compression is the backbone of digital imagery, but at high compression ratios (low Quality Factors), it introduces significant artifacts: blocky edges, ringing around sharp lines, and a total loss of fine texture. Existing solutions generally fall into two camps: CNN/Transformer-based methods, which often produce over-smoothed results, and standard diffusion-based methods, which are capable of generating realistic details but are computationally expensive and struggle to balance creative generation with faithful reconstruction.
SODiff addresses these gaps by providing a pre-trained generative model with enough "semantic" context to reconstruct an image without the overhead of a multi-step process or the information loss that occurs when converting an image into a simple text prompt.
Methodology
SODiff introduces two primary innovations to the one-step diffusion (OSD) pipeline:
- Semantic-Aligned Image Prompt Extractor (SAIPE): Instead of relying on a Vision-Language Model (VLM) to describe an image in words—which is slow and discards visual nuance—SAIPE uses a Swin Transformer to extract features directly from the low-quality image. These features are trained to align with the embedding space of a text encoder (like CLIP), allowing the model to communicate with the pre-trained Stable Diffusion UNet using rich, high-dimensional visual "prompts."
- Quality Factor (QF)-Aware Time Predictor: JPEG degradation is non-uniform. In a one-step diffusion process, choosing the right "starting noise level" (the timestep) is critical. SODiff includes a module that implicitly learns the image's QF and uses a differentiable Gumbel-Softmax approach to select the most effective denoising timestep for that specific level of damage.
The model is built on a Stable Diffusion 2.1 base, utilizing LoRA (Low-Rank Adaptation) for efficient fine-tuning and a Discriminator Network to ensure outputs look perceptually sharp and realistic.
Experiments and Results
The model was trained on the DF2K and LSDIR datasets and evaluated on standard benchmarks: LIVE-1, Urban100, and DIV2K-val. Images were synthetically degraded using JPEG compression with Quality Factors ranging from 5 to 95.
SODiff consistently outperformed leading methods like DiffBIR, SUPIR, and PromptCIR across multiple metrics. On the LIVE-1 dataset (at QF=5), SODiff achieved an LPIPS score of 0.2229, significantly better than the second-best method (DiffBIR at 0.3509). It also scored higher on "blind" quality assessments (MUSIQ, MANIQA), indicating that the results look more natural to both algorithms and human eyes.
Key Insights
- The "Distilled Semantic" Advantage: By training SAIPE to mimic a VLM's semantic output while retaining raw image features, the model gains the generative power of a text-to-image model alongside the fidelity of an image-to-image model.
- Timestep as a Proxy for Damage: In OSD, the "timestep" represents the amount of noise the model expects to clear. By making this a learnable parameter tied to the JPEG Quality Factor, the model dynamically adjusts its restoration strength.
- Alignment is Key: Visualizations show that without the alignment loss, image features drift away from the semantic space the diffusion model was trained on. Aligning them "re-anchors" the guidance, leading to much more coherent reconstructions.
Limitations and Future Work
Under extreme chroma subsampling, the model can still suffer from color shifts even if the texture is perfectly restored. Additionally, the current pipeline requires a two-stage training process which can be prone to convergence instability. Future directions include improving the efficiency of the training pipeline and addressing color consistency in extreme compression scenarios.
Summary updated