Abstract
Flow-based super-resolution (SR) models provide a powerful framework for high-quality image reconstruction, allowing for a controllable trade-off between fidelity and perceptual quality. However, these models often suffer from numerical instabilities, such as "exploding inverses," and visual artifacts like grid seams. This paper proposes a lightweight Latent Module designed to predict a conditional learned prior from low-resolution (LR) images. By integrating this module into the inference phase of frozen, pre-trained flow models, we effectively stabilize the generation process and eliminate artifacts. Experimental results on standard benchmarks demonstrate that our method significantly improves both PSNR and perceptual metrics while achieving a 0% failure rate in numerical stability.
1. Introduction
Super-resolution (SR) aims to recover high-resolution (HR) details from low-resolution (LR) observations. While flow-based models have emerged as a promising solution due to their invertibility and sampling flexibility, they face three critical challenges:
- Grid Artifacts: Patch-based processing often leads to visible discontinuities at boundaries.
- Numerical Instability: The inference process can produce infinite values, resulting in corrupted image patches (exploding inverses).
- Global Temperature Constraints: Using a uniform sampling temperature across an entire image often fails to account for varying local complexities, such as flat backgrounds versus high-frequency textures.
2. Methodology
The core of our approach is the Latent Module, which replaces the standard practice of sampling latent codes from a generic Gaussian distribution. Instead, the module predicts an optimized latent code $\hat{z}$ conditioned on the LR input.
2.1 Architecture
The framework utilizes a Dual Encoder system: one for extracting features from the LR image and another for processing an "initial prior" derived from a simple upsampling of the LR input. These features are fused by a Latent Generator (typically a UNet) to produce the learned prior. Crucially, the underlying flow-based SR model remains frozen during this process, making the Latent Module a plug-and-play enhancement for existing models like SRFlow or LINF.
2.2 Training Objectives
We employ a hybrid loss function that combines Perceptual Loss for visual realism and Latent Space Loss. The latter ensures that the predicted latent codes remain within the distribution expected by the flow model, thereby preventing the "out-of-distribution" sampling that causes numerical explosions.
3. Experimental Results
We evaluated our method (LP versions of SRFlow and LINF) on standard datasets including DIV2K, Set5, and Urban100.
3.1 Fidelity and Stability
As shown in the figure above, the standard LINF model exhibits clear grid artifacts, while SRFlow suffers from localized noise due to exploding inverses. Our LP-enhanced models successfully mitigate these issues. Quantitatively, SRFlow-LP achieved a PSNR improvement of 0.42 dB on the DIV2K dataset and improved LPIPS by 0.012. More importantly, the failure rate due to numerical instability dropped from 6.7% to 0% at a sampling temperature of $\tau=1.0$.
3.2 Generalization
The proposed method also demonstrates robustness in arbitrary scaling tasks. When trained on 4x scale and tested on 8x, the LP-enhanced models outperformed state-of-the-art arbitrary-scale models like LIIF, proving the generalizability of the learned prior approach.
4. Conclusion
By introducing a learned prior via a lightweight Latent Module, we address the primary weaknesses of flow-based SR models without the need for expensive retraining of the base models. This approach not only improves visual quality and stability but also provides implicit local temperature tuning. Future work will explore the application of this framework to other generative tasks such as image denoising and colorization.
Summary updated