Models · Image restoration

RealPLKSR

RealPLKSR (neosr, after PLKSR by Lee et al., 2024): a large-kernel CNN upscaler; `realplksr-nomoswebphoto-x4` is Philip Hofmann's x4 model for noisy, blurred and JPEG / WebP-compressed photos; also loads other RealPLKSR checkpoints. Apache-2.0 code, CC-BY-4.0 weights.

experimental Fork of neosr-project/neosr@31c7022 · backends: portable, kernels

Checkpoint realplksr-nomoswebphoto-x4

Paper 2024 Added in 0.2.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 130 ms 512x512, fp16
vs the faster original 2.1× original fp16: 267 ms
Peak memory 179 MiB original: 244 MiB
Accuracy vs original fp32 ±0.00 kernels psnr, DIV2K validation (every 2nd: 50 images) (26.99 original)

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import restoration

model = restoration.load("realplksr-nomoswebphoto-x4")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.image
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench realplksr-nomoswebphoto-x4

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

Input: synthetic, 512x512 (the task’s standard size)

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32fp32not measured ––––
Original fp16.half() on 1 modules, fp16 inputs; neosr realplksr eval mode, float32, net(lq) clampedfp16 267–244 MiB/320 MiB0.10.27
Portable fp32fp32not measured ––––
Portablefp16 1821.5×179 MiB/216 MiB0.20.41
Kernelsfp16 1302.1×179 MiB/216 MiB0.60.25
Portable + torch.compile 1541.7×179 MiB/196 MiB15 (build)–
TensorRT fp16fp16 2471.1×290 MiBenginenot comparable26 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-14. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14Originalfp321555 1,407 MiB process–512x512
Portablefp161092 1,368 MiB processmatches512x512
Portablefp321527 1,384 MiB processmatches512x512
Kernelsfp16not implemented–512x512

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use allowed

Code
Apache-2.0 LICENSE
Weights
CC-BY-4.0 source
Training data

Our reading of the licences, not legal advice.

Weights

4xNomosWebPhoto_RealPLKSR.safetensors 29.6 MB· hosted on GitHub

fastforks downloads and checks these files on first use (fastforks download realplksr-nomoswebphoto-x4).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

DIV2K validation (every 2nd: 50 images)

bicubic x4 LR -> HR, PSNR / SSIM (Y)

Rundtypepsnr ↑ssim ↑Δ psnr vs fp32 originalimagesms / image
Original fp32fp3226.990.7481 reference 50 –
Original fp16not measured
Portable fp32fp3226.990.7481 ±0.00 50 –
Portablefp1626.990.7481 ±0.00 50 –
Kernelsfp1626.990.7481 ±0.00 50 –

DIV2K validation HR images and the official bicubic LR images (x4 or x2, the model's scale), one pass without tiles; PSNR and SSIM (Gaussian 11 x 11, sigma 1.5) on the Y channel (BT.601) of the output rounded to uint8, `scale` px border cropped, averaged over the images. Real-ESRGAN is trained for real-world degradations, not bicubic, so its PSNR is low: the numbers compare our modes with the original, not with PSNR-oriented upscalers. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-14; portable fp32, portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 60534e1d, 2026-11-14.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 1.4e-06 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.00047 and p99 <= 0.0018 (absolute error of the output image).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.0000014 not recorded
GPU default dtypes, mean |diff|≤ 0.00047 0.00031
GPU default dtypes, p99 |diff|≤ 0.0018 0.00118

Recorded for realplksr-nomoswebphoto-x4 on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-14, with these kernels: cudnn_hacc

Details

RealPLKSR (neosr; after PLKSR, Lee et al., 2024): a real-world super-resolution CNN of partial large-kernel blocks (3 x 3 channel mixer, a 17 x 17 conv on a quarter of the channels, element-wise attention, GroupNorm) and a pixel-shuffle upsampler. `realplksr-nomoswebphoto-x4` is Philip Hofmann's 4xNomosWebPhoto_RealPLKSR, an x4 model for photos with noise, lens blur and JPEG / WebP compression. `load(path)` reads other RealPLKSR checkpoints with the pixel-shuffle upsampler (any scale, width and depth).

Input / output
Input: one RGB image. Output: the restored (upscaled) image, model.scale x the input size, RGB in [0, 1].
What the numbers mean, and which models need the camera focal length

tile= runs large images in overlapping tiles (as ComfyUI).

Input size
any H x W >= 1, resized or padded inside the model; tested up to 512x512 (179 MiB allocated)
Outputs
image
CUDA kernels
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
Apple (MPS)
fp32, fp16
Full reference, generated from the repository

RealPLKSR (neosr, after PLKSR by Lee et al., 2024): a large-kernel CNN upscaler; realplksr-nomoswebphoto-x4 is Philip Hofmann's x4 model for noisy, blurred and JPEG / WebP-compressed photos; also loads other RealPLKSR checkpoints. Apache-2.0 code, CC-BY-4.0 weights.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
realplksr-nomoswebphoto-x4synthetic (512x512)original
portable
kernels
portable + torch.compile
TensorRT fp16
267
182
130
154
247
244 / 320
179 / 216
179 / 216
179 / 196
358 / 366
Details
  • Original code: https://github.com/neosr-project/neosr at 31c7022620c6
  • Code licence: Apache-2.0 (permissive); files: LICENSE
  • Weights licence: CC-BY-4.0
  • Licence evidence: https://github.com/neosr-project/neosr/blob/31c7022620c682cf0961c8634d60787179145c5b/license.txt ; https://github.com/Phhofm/models/releases/tag/4xNomosWebPhoto_RealPLKSR
  • Training data: Nomos-v2 (neosr's 6000-image multipurpose super-resolution set) (Release notes: Nomos-v2 (6000 photos, neosr's dataset) with realistic noise, lens blur, JPEG and WebP degradations; pretrained from neosr's 4x_realplksr_gan_pretrain.)
  • Kernel libraries: cudnn_hacc
  • Variants: realplksr-nomoswebphoto-x4
  • Outputs: image
  • Input size: any H x W >= 1, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): realplksr-nomoswebphoto-x4 512x512 (0.2 GiB peak allocated, 0.3 reserved)
  • realplksr-nomoswebphoto-x4 512x512, first call: portable + torch.compile 15 s (cold Inductor cache), TensorRT fp16 26 s (ONNX + engine).
  • realplksr-nomoswebphoto-x4 original 512x512: .half() on 1 modules, fp16 inputs; neosr realplksr eval mode, float32, net(lq) clamped
  • realplksr-nomoswebphoto-x4 load / first call: original 0.21 s / 0.759 s, portable 0.18 s / 0.414 s, kernels 0.56 s / 0.253 s
  • Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5

Measured

DIV2K validation HR images and the official bicubic LR images (x4 or x2, the model's scale), one pass without tiles; PSNR and SSIM (Gaussian 11 x 11, sigma 1.5) on the Y channel (BT.601) of the output rounded to uint8, scale px border cropped, averaged over the images. Real-ESRGAN is trained for real-world degradations, not bicubic, so its PSNR is low: the numbers compare our modes with the original, not with PSNR-oriented upscalers. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32portableportable fp32kernelsnote
realplksr-nomoswebphoto-x4DIV2K validation (every 2nd: 50 images), bicubic x4 LR -> HR, PSNR / SSIM (Y)26.99 / 0.748126.99 / 0.748126.99 / 0.748126.99 / 0.7481

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 60534e1d, 2026-11-14.

Parity

CPU, float32: max |diff| <= 1.4e-06 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.00047 and p99 <= 0.0018 (absolute error of the output image).

variantkernels error vs original, mean / p99GPU, torchkernels used
realplksr-nomoswebphoto-x40.00031 / 0.00118RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400

Example output

No example rendered for this checkpoint yet.