Run Real-ESRGAN in Your Local Browser on Any Device. Powered by TensorFlow.js. Support computing with WebGL and WebGPU.
Run Real-ESRGAN in the browser with tensorflow.js
Drag in or select an image, then choose a model and WebGPU/WebGL to upscale the image.
Sure, PNG with alpha channel is supported.
chrome://flags/#enable-unsafe-webgpu
flag or other browsers with WebGPU support. Much faster than WebGL.npm install
npm run dev
I've converted 4 models to tensorflow.js format, you can find the original pytorch models in xinntao/Real-ESRGAN
RealESRGAN-animevideov3
RealESRGAN_x4plus_anime_6B
RealESRGAN-general-x4v3
RealESRGAN_x4plus
The first run will download the models and cache them in the browser indexedDB. No need to download them again.
Pytorch model -> ONNX -> Tensorflow saved model -> Tensorflow.js