An open source video upscaler that runs in your browser
The AI engine behind ToHD’s free tool is open source. webgpu-video-upscaler is an MIT-licensed video upscaler that runs entirely in a browser tab: it decodes your video, upscales every frame with Real-ESRGAN on your graphics card through WebGPU, and writes an MP4 with the original audio. There is nothing to install and the video is never uploaded. You can try it on your own clip or read the code first.
How a local AI video upscaler works in a browser tab
Each frame goes through five steps, all inside the tab:
- Mediabunny decodes the frame and it is drawn to a canvas, which also applies the video’s rotation.
- The pixels become a tensor for the model.
- ONNX Runtime Web runs Real-ESRGAN realesr-general-x4v3 on the whole frame with the WebGPU backend. There is no tiling: the compact model takes the whole frame in one pass.
- The 4x result is scaled to the output size, for example 1080p.
- Mediabunny encodes the frames to H.264 and writes an MP4, copying the audio track as it is. Long videos stream to the browser’s private file storage, so the result is not held in memory.
Because decoding and encoding add almost nothing on top of the model, the speed measured on a few frames predicts the whole video. The free tool uses this to show how long your clip will take before you start.
Measured speed
On one machine, an Apple M2 Max in a Chromium-based browser on 8 Nov 2026, the model took:
| Input | Output | fp16 | fp32 |
|---|---|---|---|
| 360p | 720p | 206 ms per frame | 1,067–1,765 ms per frame |
| 360p | 1080p | 200 ms per frame | not measured |
| 480p | 1080p | 360 ms per frame | not measured |
| 720p | 1080p | 830–870 ms per frame | not measured |
From 360p that is about 3 minutes for a 30-second clip at 30 frames per second. fp16 gave the same picture as fp32 in our tests. No other devices have been measured yet; a laptop with integrated graphics can be several times slower.
What it fixes and what it doesn’t
Tested on four free stock clips that we scaled down or blurred and then upscaled:
- Low resolution (360p or 480p to 720p or 1080p): visibly sharper. Text, whiskers and eyelashes come back as clean lines.
- Slightly out of focus: better on all four clips.
- 720p to 1080p: a small gain.
- Heavy compression: blocks are smoothed, but lost detail does not come back.
- Motion blur: not fixed. The streaks stay.
Fine skin texture such as freckles can be smoothed out. You can download two test clips and their results to judge for yourself.
What ToHD adds on top
The open source repository is the AI pipeline on its own. The ToHD website adds a Fast mode for phones and slower computers, an automatic before and after preview of frames from across your clip, an Anime setting that uses realesr-animevideov3, free 4K on a computer, and paid cloud processing that is faster and takes batches and phone videos. Its Video setting uses general-x4v3 with the model’s denoise strength at 0.75, a slightly gentler version of the model in the repository. The full list of components and licenses is on the credits page.
Frequently asked questions
Is ToHD open source?
The AI engine is. The in-browser pipeline that reads, upscales and writes your video is on GitHub as webgpu-video-upscaler under the MIT license. The ToHD website, its Fast mode and the paid cloud service are not open source.
Is it a local video upscaler if it runs in a browser?
Yes. The model runs on your own graphics card through WebGPU and the video is read and written inside the browser tab. Nothing is uploaded, so it works like a local AI video upscaler without installing anything. The code is public, so you can check this yourself.
How does it compare with Video2X or Real-ESRGAN on the desktop?
It uses the same family of Real-ESRGAN models, with nothing to install and no Python or drivers to set up. The trade-off is speed and size. A desktop app can use larger models; this engine keeps to a compact model so it stays fast in a browser tab. The repository's pipeline outputs up to 1080p, and the ToHD website builds on it to make 4K for free on a computer.
Which browsers does it need?
A browser with WebGPU, such as recent Chrome or Edge on a computer. With the shader-f16 feature it runs the fp16 model; without it, the fp32 model, which was 5 to 8 times slower in our test. Phones and integrated laptop graphics have not been measured with this engine and are expected to be much slower.
Where is the code on GitHub, and can I use it in my own project?
The code is at github.com/flreey/webgpu-video-upscaler, and yes, you can use it under the MIT license. The code is three TypeScript files with two dependencies, Mediabunny and ONNX Runtime Web. The model weights keep their own BSD 3-Clause license from the Real-ESRGAN project.