RepLDM: Reprogramming Pretrained Latent Diffusion Models for High-Quality, High-Efficiency, High-Resolution Image Generation

Boyuan Cao, Jiaxin Ye, Yujie Wei, Hongming Shan

TL;DR

RepLDM is a novel, training-free framework that "reprograms" pretrained models like Stable Diffusion XL to generate high-quality, 4K-resolution images with 5x the efficiency of current state-of-the-art methods. By combining a unique attention-guidance mechanism with progressive upsampling in pixel space, it eliminates the structural distortions and artifacts that typically plague high-resolution AI generation.

High-resolution images generated by RepLDM

The Challenge of High-Resolution Generation

Latent Diffusion Models (LDMs) are typically trained on fixed, lower resolutions (e.g., 1024x1024). When tasked with generating images at much higher resolutions, they often suffer from "structural disarray." This manifests as bizarre anatomical errors—like a cat with six legs—or repeated patterns, such as multiple suns in a single sky.

While researchers have attempted to resolve this without expensive retraining, existing "training-free" solutions have significant drawbacks:

  • Sliding window methods lack global communication, leading to repetitive and disjointed content.
  • Parameter rectification often washes out fine textures, resulting in a blurry or overly smooth appearance.
  • Progressive upscaling methods (like DemoFusion) are incredibly slow. They can take upwards of 25 minutes for a single 4K image and often introduce artifacts because they upsample in the "latent space" (the model's compressed mathematical representation) rather than the actual pixel space.

The RepLDM Solution

To overcome these hurdles, RepLDM introduces a two-stage "reprogramming" pipeline that requires zero additional training. It works by intelligently modifying how the existing math inside a pretrained U-Net is executed during inference.

1. Attention Guidance Stage

To ensure the image has a logical layout from the start, the authors developed Training-Free Self-Attention (TFSA). This mechanism clusters semantically related "tokens" in the latent representation early in the denoising process. It essentially helps the model "decide" where the sky, trees, and subjects should be before it starts adding detail. A "statistical anchor" is then used to mix this guidance with the original latent to keep the image looking realistic.

2. Progressive Upsampling Stage

Instead of upsampling in the messy latent space, RepLDM decodes the image into pixel space, performs a high-quality bicubic upsample, and then encodes it back into latents for refinement. The authors' pilot study revealed a crucial insight: upsampling in latent space causes a significant drop in image quality metrics (PSNR and SSIM) compared to pixel space, explaining why previous methods produced "grainy" artifacts.

The Efficiency Trick: Because the first stage provides such a strong structural "initialization," the subsequent higher-resolution stages require significantly fewer denoising steps. Instead of 50 steps, the model might only need 5–10 steps to reach high quality, drastically reducing compute time.

Key Results and Performance

Comparison of RepLDM against state-of-the-art methods

RepLDM demonstrates significant improvements over existing state-of-the-art methods in both speed and visual fidelity:

  • Massive Speedup: On a consumer-grade NVIDIA RTX 3090 GPU, RepLDM generates a 4096×4096 image in roughly 5.7 minutes, compared to the 25–26 minutes required by DemoFusion or AccDiffusion.
  • Quantitative Superiority: RepLDM achieved the best (lowest) FID scores across multiple resolutions (2K and 4K), indicating higher image realism and diversity when evaluated on datasets like SAM and LAION-5B.
  • Human Preference: In a double-blind user study, RepLDM was rated significantly higher than competitors in structural consistency, color abundance, and detail richness.

Limitations and Future Work

While highly effective, RepLDM has a few limitations. It still struggles with rendering text accurately, though the authors note this is a flaw inherited from the base model (SDXL) rather than the RepLDM framework itself. Additionally, while efficient at 4K, scaling to "ultra-high" resolutions (e.g., 12K or 16K) requires more sub-stages, which eventually drives inference times back up.

Looking forward, the authors suggest that applying this attention-guidance logic to video generation could be a promising avenue for improving temporal consistency in AI-generated films.

Summary updated

BibTeX
@inproceedings{cao2025repldm,
  author = {Boyuan Cao and Jiaxin Ye and Yujie Wei and Hongming Shan},
  title = {{RepLDM: Reprogramming Pretrained Latent Diffusion Models for High-Quality, High-Efficiency, High-Resolution Image Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=QwXpn5IPKk},
}
Figure