Prompt-tuning latent diffusion models for inverse problems

Hyungjin Chung, Jong Chul Ye, Peyman Milanfar, Mauricio Delbracio · DOI

Introduction

Solving imaging inverse problems—such as super-resolution, deblurring, and inpainting—requires a robust "prior" to recover clean images from degraded measurements. While pixel-based diffusion models have set a high bar for generative priors, their computational cost remains a significant barrier. Latent Diffusion Models (LDMs), like Stable Diffusion, offer a faster alternative by operating in a compressed latent space. However, LDMs face two primary challenges in inverse problems: the "Prompt Gap," where the lack of an accurate text description limits generative power, and "Latent Drift," where small latent errors manifest as significant visual artifacts upon decoding.

The P2L Framework

To address these challenges, we present P2L (Prompt-tuning Projected Latent diffusion). P2L transforms Stable Diffusion into a high-performance engine for inverse problems through two key innovations:

On-the-fly Prompt Tuning

Rather than relying on a generic or "null" prompt, P2L treats the text embedding as a continuous, optimizable variable. During the restoration process, the algorithm iteratively updates this embedding to ensure the generated image aligns with the degraded measurement. This allows the model to "learn" an optimal description of the scene as it reconstructs it, unlocking the full generative potential of the LDM.

Range Space Projection

To prevent latent variables from drifting into unrealistic regions of the latent space, P2L incorporates a projection step. By periodically solving a proximal optimization problem, the method forces latent variables back into the "range space" of the VAE encoder. This mathematical "tethering" ensures that the latents remain consistent with the data distribution the model was trained on, effectively suppressing the grid-like artifacts common in other LDM-based solvers.

Experimental Evaluation

P2L was evaluated on standard benchmarks including FFHQ (1,000 face images) and ImageNet (1,000 diverse images) at 512x512 resolution, as well as DIV2K for high-resolution (768x768) testing. The method was compared against state-of-the-art LDM solvers such as LDPS, PSLD, and LDIR.

Results and Discussion

Quantitative Performance

P2L demonstrates consistent superiority across various tasks, including 8x super-resolution, motion/Gaussian deblurring, and inpainting. As shown in the quantitative summary, P2L frequently achieves the best FID and LPIPS scores, indicating higher visual realism and better perceptual alignment with ground truth images.

Quantitative comparison of P2L against state-of-the-art methods across multiple inverse tasks.

Visual Clarity

Qualitatively, P2L reconstructions are noticeably sharper and more faithful to the original content. While competing methods often introduce "checkerboard" artifacts or fail to reconstruct fine details (like the texture of a bird's feathers or the clarity of an eye), P2L maintains high fidelity.

Qualitative comparison showing P2L's ability to reconstruct sharp details without the artifacts seen in competing LDM solvers.

Key Insights

Our findings highlight that prompts matter significantly; even an automatically tuned prompt can bridge the performance gap between "blind" solvers and those with ground-truth information. Furthermore, the Range Space Projection acts as a crucial anchor, allowing P2L to handle high-resolution images as a whole without the quadratic complexity of patch-based methods.

Limitations and Future Work

While P2L sets a new state-of-the-art, it introduces computational overhead due to the additional forward and backward passes required for prompt optimization. Additionally, the resulting continuous CLIP embeddings are not human-readable, limiting interpretability. Future work may explore integrating Classifier-Free Guidance (CFG) to further enhance image sharpness and exploring more efficient optimization strategies.

Summary updated

BibTeX
@inproceedings{chung2024prompt,
  author = {Hyungjin Chung and Jong Chul Ye and Peyman Milanfar and Mauricio Delbracio},
  title = {{Prompt-tuning latent diffusion models for inverse problems}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=hrwIndai8e},
}
Figure