Restores and super-resolves an Image with OSEDiff, a LoRA-finetuned Stable Diffusion 2.1 that maps a degraded input to a clean result in a SINGLE denoising step, emitting the enlarged Image at the requested factor.
Typical backends
Restore and enlarge compressed or noisy photos and publish them: a file source feeds frames, this component runs single-step diffusion restoration, and the result is streamed over HTTP.
Restore low-quality document captures before OCR so the recognizer reads a cleaner image, then publish the recognized text as JSON.
Caveats
- FallbackAn empty, undecodable, or out-of-memory frame is passed through unchanged and logged rather than throwing, so a failing call yields the original image and the deployment keeps serving.
- Parameter interactionThe network runs at a native four-times factor and the result is then resampled to the requested output factor, while a pre-network cap on the longest input side plus latent and VAE tiling bound VRAM at a small quality cost.
- Parameter interactionAn optional tag-style prompt steers semantics and runs unconditioned when empty; a color-alignment step matches the output back to the input via adaptive instance norm, wavelet reconstruction, or none.
- Parameter interactionThe minimum-width and minimum-height floors gate the skip TOGETHER: upscaling is skipped only when every non-zero floor is already satisfied, so an image that already meets the targets is passed through untouched.
- LatencyDespite the single denoising step, the diffusion VAE and UNet are heavy, so a GPU is effectively required and CPU inference is impractical; the first run downloads the base model and adapter unless pre-seeded.