Super-resolves an Image with the Swin2SR transformer at the factor inferred from the chosen checkpoint and emits the enlarged Image; the default variant targets real-world noisy or compressed photos.
Typical backends
Enhance a low-resolution feed and publish the result: a file source feeds frames, this component upsamples them with the transformer, and the output is streamed over HTTP.
Boost small text crops before OCR so the recognizer sees larger glyphs, then publish the recognized text as JSON.
Caveats
- Hard constraintEach checkpoint has a fixed upscale factor, which is read from the model name, so the output size is determined by the chosen variant rather than a separate setting.
- AccuracyThe default real-world variant handles noisy, compressed, or blurry photos; for cleanly bicubic-downsampled input a classical variant is sharper, so the checkpoint should match the input degradation.
- CostThere is no internal tiling, so very large inputs can exhaust memory on small GPUs; cap the input size upstream when feeding high-resolution frames.
- 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 already at the target size is passed through untouched, and the output can be clamped to maximum dimensions afterwards.
- LatencyA CUDA device is preferred and falls back to CPU when no GPU is available; the first run downloads the checkpoint unless the cache is pre-seeded.