Real-ESRGAN general x4v3 for ExecuTorch WebGPU

This repository contains an ExecuTorch conversion of https://github.com/xinntao/Real-ESRGAN (realesr-general-x4v3) for the ExecuTorch WebGPU backend, so the model runs entirely in a web browser on the visitor's GPU. It powers the corresponding demo in the ExecuTorch WebGPU Playground (launching soon on executorch.ai).

  • Base model: https://github.com/xinntao/Real-ESRGAN (realesr-general-x4v3)
  • Format: ExecuTorch .pte programs delegated to the WebGPU backend
  • Quantization: fp32 (as exported)
  • Total size: 4.7 MB

About the original model

realesr-general-x4v3, a compact Real-ESRGAN model that upscales real-world images 4x while removing common degradations.

For training data, evaluation results and full details, see the original model card: https://github.com/xinntao/Real-ESRGAN (realesr-general-x4v3).

Intended use and limitations

Upscaling small or degraded images.

Super-resolution invents plausible detail; it does not recover the real scene. Do not use it where fidelity matters (for example evidence or medical images). Faces and text can come out distorted.

What changed in this conversion

  • Fixed 64x64 input tiles (256x256 output); larger images are processed tile by tile outside the program

Inputs and outputs

  • Input [1, 3, 64, 64] float32 RGB in [0, 1]
  • Output [1, 3, 256, 256] float32 RGB, not clamped (clamp to [0, 1])

Files

File Size SHA-256
realesr_x4v3_webgpu.pte 4.7 MB a4c40616767829cf…

Full checksums are in manifest.json. The playground verifies them after download.

Running it

These programs were exported with the ExecuTorch WebGPU backend (backends/webgpu) and validated with the WebAssembly runtime build used by the ExecuTorch WebGPU Playground (launching soon on executorch.ai). That runtime build is not published yet; until it is, the playground is the supported way to run them. It downloads these files once, caches them in the browser, and runs everything locally.

Requirements: a browser with WebGPU enabled.

Provenance

  • Weights: clavidk/realesr-general-x4v3 @ 6aecc46ba1fc8cfdfe8643f090782e2e62c044cd, file realesr-general-x4v3.pth, sha256 8dc7edb9ac80ccdc30c3a5dca6616509367f05fbc184ad95b731f05bece96292 (from a community mirror of the official release)
  • Checked against the official checkpoint: realesr-general-x4v3.pth is byte-identical to the official release asset (github.com/xinntao/Real-ESRGAN, release v0.2.5.0), sha256 8dc7edb9ac80ccdc30c3a5dca6616509367f05fbc184ad95b731f05bece96292, checked by the project owner on 2026-10-16
  • Exported with: executorch 1.5.1+cpu, torch 2.14.1+cpu, torchao 0.18.0+cpu, transformers 5.19.0 (executorch git 3b6068392324)
  • Reproduce: python recipes/real-esrgan.py --out out/real-esrgan (recipe in export/)
  • Re-running the recipe produces byte-identical files.

Citation

If you use this model, please cite the original work:

@inproceedings{wang2021realesrgan,
  title={Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data},
  author={Wang, Xintao and Xie, Liangbin and Dong, Chao and Shan, Ying},
  booktitle={International Conference on Computer Vision Workshops (ICCVW)},
  year={2021}
}

License

This is a derivative of the upstream model and is distributed under the same terms (bsd-3-clause); see LICENSE. Modifications (conversion to the ExecuTorch format) by Meta Platforms, Inc.

Downloads last month
24
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including executorch-community/Real-ESRGAN-General-x4v3-ExecuTorch-WebGPU

Paper for executorch-community/Real-ESRGAN-General-x4v3-ExecuTorch-WebGPU