From efc8e5b3c8d84fb226f1ec9f206af712b5eaa96d Mon Sep 17 00:00:00 2001 From: xororz Date: Fri, 1 Nov 2024 21:40:45 +0800 Subject: [PATCH] Update README.md --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d712a07..5a7f44c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # web-realesrgan -Run Real-ESRGAN in the browser with tensorflow.js +Run Real-ESRGAN/Real-CUGAN in the browser with tensorflow.js ## Usage @@ -21,6 +21,16 @@ Sure, PNG with alpha channel is supported. All models are quantized to FP16, which reduces the size of the model download and has no noticeable difference in performance compared to FP32 models. However, currently, the computation speed of FP16 is the same as FP32. Future updates from the TensorFlow.js team are expected to improve FP16 computation performance on WebGPU. +### 🚀️ ️Advantages + +**Accessible Anywhere**: The tool can be conveniently run on any device, such as a mobile phone📱️, without needing to download or install any software. This makes it possible to upscale images anytime, anywhere, directly in your browser. + +### ⚠️️ Limitations + +**Performance Gap**: Even with WebGPU enabled, the performance of running models in the browser is slower than running them locally. WebGPU’s speed is approximately half of the speed you’d achieve with local execution. On local devices, FP16 computation provides significant acceleration, whereas in tfjs-webgpu for now, FP16 and FP32 run at the same speed. + +If you need to upscale a lot of images, it is recommended to download and use the official Real-ESRGAN and Real-CUGAN repositories for local execution. + ### Development ```bash @@ -28,6 +38,10 @@ npm install npm run dev ``` +WebGPU cannot be used over HTTP. If you're developing this project locally, you can use OpenSSL to self-sign a certificate. + +See https://developer.chrome.com/docs/web-platform/webgpu/troubleshooting-tips + ## Models The first run will download the models and cache them in the browser indexedDB. No need to download them again.