File size: 4,048 Bytes
7596cc4 9cd66d3 7596cc4 9cd66d3 7596cc4 9cd66d3 7596cc4 9cd66d3 7596cc4 ba138a9 9cd66d3 7596cc4 9cd66d3 7596cc4 9cd66d3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | ---
license: bsd-3-clause
library_name: executorch
pipeline_tag: image-to-image
inference: false
tags:
- executorch
- webgpu
- on-device
- browser
---
# Real-ESRGAN general x4v3 for ExecuTorch WebGPU
This repository contains an [ExecuTorch](https://github.com/pytorch/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](https://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.
- **Developed by:** Xintao Wang et al. (Tencent ARC)
- **Paper:** [Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data](https://arxiv.org/abs/2107.10833)
- 1.2M parameters
- 4x upscaling
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](https://github.com/pytorch/executorch/tree/main/backends/webgpu)) and validated with the
WebAssembly runtime build used by the ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://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:
```bibtex
@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.
|