realesr-general-x4v3 β ONNX export (NCHW, opset 17)
Clean ONNX export of realesr-general-x4v3 (SRVGGNetCompact, 4Γ general image super-resolution) from the official Real-ESRGAN weights, re-hosted for AllPrivate β where every model runs in the visitor's browser and nothing is uploaded.
Provenance
- Source weights:
realesr-general-x4v3.pthfrom the official Real-ESRGAN v0.2.5.0 release- sha256:
8dc7edb9ac80ccdc30c3a5dca6616509367f05fbc184ad95b731f05bece96292
- sha256:
- Exported with
torch.onnx.export(PyTorch 2.8.0, TorchScript exporter), opset 17, fp32, constant folding on β seeexport_realesr.pyin this repo for the exact reproducible script - I/O:
input[1, 3, height, width](NCHW, RGB, float32 in [0,1]) βoutput[1, 3, 4*height, 4*width]; height/width are dynamic - Graph ops:
Add, Constant, Conv, DepthToSpace, PRelu, Resizeβ noClip, no layout transposes, so it runs on both the wasm and WebGPU execution providers of ONNX Runtime Web - Validated against the PyTorch reference: max abs deviation β€ 5.5e-6 across 64Γ64, 256Γ256 and 100Γ37 inputs
Unlike the original network's common community exports, the output is not clipped to [0,1] inside the graph; clamp at the consumer (u8 conversion clamps naturally).
License
BSD 3-Clause, inherited from Real-ESRGAN (Β© Xintao Wang). This repo only re-packages the officially released weights in ONNX form.