Residual-diffusion document restoration on a degraded page Image. A coarse pass plus a short residual diffusion sharpen blurred or noised glyphs while keeping layout intact, emitting a restored Image at the input resolution. Failures pass the input through.
Typical backends
Deblur a scanned page before recognition.
Restore a captured page and serve the cleaned image over HTTP.
Caveats
- AccuracyThe restoration-task setting selects the checkpoint pair: the deblur weights target blurred or noised pages and the seal weights target overlaid seals or watermarks; applying one to the other degradation gives weaker restoration.
- I/O contractThe restored page is returned at the input resolution and in the input colour space, so it drops cleanly into a pipeline expecting the original image shape.
- LatencyEach page runs a coarse pass plus a multi-step residual diffusion over 128 pixel tiles, so cost grows with page area and tile count. A GPU is strongly preferred; CPU inference is impractically slow for live use.
- LimitationThe longest side is capped before tiling to bound GPU memory; an oversized page is downscaled for inference and the restored result is resized back to the original resolution, so very fine detail on huge pages is limited by that cap.
- FallbackA zero-sized image is returned unchanged, and any inference failure for one page is logged and the original image is passed through rather than crashing the container.
- CompatibilityThe deblur and seal checkpoints are baked into the worker image at build time and copied from the image into the node weight cache on startup, so a cold container needs no outbound network before the first page.
- State lifetimeThe compute device and the restoration task are captured once at startup; the model is loaded once and reused, and changing either requires a redeploy.