← all repositories
IceClear/StableSR

Stable Diffusion moonlights as a super-resolution engine

StableSR repurposes Stable Diffusion’s generative prior to restore and upscale real-world low-res images without building a diffusion model from scratch.

StableSR
Not currently ranked — collecting fresh signals.
star history

What it does StableSR is a real-world image super-resolution system built atop Stable Diffusion 2.1. It finetunes a time-aware encoder that injects a low-resolution image into the diffusion process at selected timesteps, then steers a companion autoencoder it calls CFW back to pixel space with optional wavelet color correction. The result is arbitrary upscaling—demoed up to 4K and beyond—using the generative prior that Stable Diffusion already learned from millions of images.

The interesting bit Instead of treating diffusion models as mere noise-to-image generators, the authors use them as a prior for restoration. The trick is the time-aware encoder: by feeding the LR image into the U-Net at specific diffusion steps, the model hallucinates realistic high-frequency detail while staying anchored to the actual input, rather than drifting toward a text prompt.

Key highlights

  • Supports SD 2.1, SD 2.1-768v, and SD-Turbo for inference in as few as 4 steps
  • Tile-based pipeline handles resolutions like 4096×6144 without loading the full image into VRAM
  • Dedicated FaceSR training and testing scripts for portrait restoration
  • Broad ecosystem support: WebUI, ComfyUI, HuggingFace, Replicate, ModelScope, and Colab
  • Built-in color correction (wavelet or nofix) to counter Stable Diffusion’s chromatic shifts

Caveats

  • Locked to an older dependency stack: PyTorch 1.12.1, CUDA 11.7, and pytorch-lightning 1.4.2
  • Two-stage training is labor-intensive: you must first generate latent codes with the diffusion U-Net to produce training data for the CFW autoencoder
  • 128→512 inference needs at least 10 GB of GPU memory; 4K tiling demands significantly more

Verdict A solid choice for computer-vision researchers and Stable Diffusion tinkerers who want generative-quality upscaling on real-world degradations. Skip it if you need a lightweight, CPU-friendly tool or a modern, low-friction dependency tree.

Frequently asked

What is IceClear/StableSR?
StableSR repurposes Stable Diffusion’s generative prior to restore and upscale real-world low-res images without building a diffusion model from scratch.
Is StableSR open source?
Yes — IceClear/StableSR is an open-source project tracked on heatdrop.
What language is StableSR written in?
IceClear/StableSR is primarily written in Python.
How popular is StableSR?
IceClear/StableSR has 2.7k stars on GitHub.
Where can I find StableSR?
IceClear/StableSR is on GitHub at https://github.com/IceClear/StableSR.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.