SwinIR-L real-world Γ4 for Core AI
The default upscaler of upscale and
imagine --upscale: faithful 4Γ super-resolution β it recovers detail without inventing it.
swinir-l-real-x4-128-float16.aimodel: inputx[1,3,128,128]float16 in[0,1](RGB), outputoutput[1,3,512,512]in[0,1]. Tile any picture with ~16 px overlap and feather the seams (swift-upscale does).
Why this one
Chosen in a bake-off of seven upscalers (Γ4 shrink-and-back on 5 generated and 5 stock photos, LPIPS lower is better): SwinIR-L scored 0.185 / 0.208 (generated / real) and 0.213 / 0.282 with blur, noise and JPEG damage, beating Real-ESRGAN x4plus (0.195 / 0.236) in every cell, with the best PSNR (28.05 / 24.45 dB). It keeps hair and foliage natural where Real-ESRGAN smooths them.
Measured (M3 Max, macOS 27, GPU)
- Parity with the PyTorch float32 model, per 128-px tile: 66β68 dB PSNR (float16; float32 export 124β125 dB). Float16 is shipped: half the size, slightly faster, no visible difference.
- Tile size: 128 px had the lowest cost per new pixel β 24.9 Β΅s, against 26.9 at 256 px and 29.0 at 192 px.
- Seams: a 256-px picture upscaled as overlapping tiles against PyTorch on the whole picture in one run: 41.6 dB overall, and the seam bands match as well as everywhere else (41.8 dB) β no seams.
- Speed: 1024Γ1024 β 4096Γ4096 in 25β29 s (three runs on a quiet machine; first load 0.2 s once compiled) β about 0.25 s per 128-px tile, so time grows with the number of tiles.
Provenance
- Weights: SwinIR
v0.0release,003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR-L_x4_GAN.pth, byte-identical to the release asset (SHA-25699adfa91β¦328c0a). - Export:
export_swinir.py(this repository) β spandrel 0.4.1 loads the checkpoint; the attention masks are precomputed for the 128-px tile (SwinIR rebuilds them per call at other sizes, which crashed the converter);coreai-torch 0.4.3,coreai-core 1.0.0b3, float16 under autocast. - Licence: Apache-2.0 (
LICENSE), withNOTICE.