$ show kmittle/RepLDM
RepLDM is a research codebase accompanying a NeurIPS 2025 paper that introduces a training-free method for generating high-resolution images (up to 8K) using pretrained latent diffusion models (SDXL). The core innovation is an Attention Guidance module that enhances detail and color richness by applying a lightweight self-attention transformation to latent representations during denoising. The code provides custom diffusers pipelines (RepLDMSDXLPipeline, RepLDMSDXLControlNetPipeline, FreeScaleSDXLPipeline) that implement a progressive upsampling strategy: initial denoising at base resolution, then iterative VAE encode/decode with additional denoising steps to increase resolution. It supports text-to-image generation and ControlNet-conditioned generation. The repository includes Jupyter notebooks for interactive use and a batch inference script. While primarily a research artifact, the Attention Guidance module is a clean, self-contained component that could be reused in other diffusion pipelines. The code is tightly coupled to specific versions of diffusers and PyTorch, and some internal APIs are used, indicating potential drift with newer library versions.
The LLM identified 1 files worth highlighting for reuse:
A self-contained PyTorch module that implements a training-free self-attention mechanism to enhance latent representations during diffusion sampling. It provides configurable guidance scale, density scheduling, decay strategies, frequency-domain filtering, and power calibration. The class is well-documented, has input validation, and can be easily integrated into any diffusion pipeline by calling it with the current timestep index and latents. This is the core novel contribution of the paper and is reusable across different diffusion models.