Real-ESRGAN (ONNX)
official weights exported for the browser
2 min readupdated
This repository provides ready-to-use ONNX versions of the official Real-ESRGAN weights, adapted to run in the browser via ONNX Runtime Web or Transformers.js (a library for running models in web environments). The pack includes models for general photos (including denoising), maximum quality, and anime illustrations. It is aimed at web developers and hobbyists building client-side image upscaling apps.
Key features
- Exported to ONNX format (Opset 17) based on the SRVGGNetCompact and RRDBNet architectures.
- Four weight variants: general photos, denoised (wdn), maximum quality (x4plus), and anime.
- Half-precision (_fp16) versions available for optimized performance.
- Fully compatible with Transformers.js and ONNX Runtime Web.
What you can do
- Integrate a high-quality image upscaler into a web app or browser extension.
- Upscale anime illustrations and artwork directly on the client device.
- Quickly process standard photos with optional denoising without sending data to a server.
Example
The model takes a [1, 3, H, W] input tensor with RGB values normalized between 0 and 1, and outputs a 4x upscaled image of shape [1, 3, 4H, 4W]. Files with the _fp16 suffix run internal computations in half precision while keeping the input and output formats in float32.
Read more
DetailsFormat: ONNX (Opset 17)
License: BSD-3-Clause
Available variants: realesr-general-x4v3, realesr-general-wdn-x4v3, RealESRGAN_x4plus, RealESRGAN_x4plus_anime_6B
Accuracy: verified against PyTorch, with a maximum absolute difference of 3.3e-5 for fp32 and 7.8e-3 for fp16










Comments