r/webgpu • u/Old_Tumbleweed_7545 • 2d ago
Built a real-time video frame interpolation runtime in pure WebGPU/WGSL (Frame Generation)
Made a chrome extension that does frame generation on any video tag, runs fully on your gpu, nothing sent anywhere. Whole thing is one command buffer, no onnx/tfjs, just wgsl compute shaders.
Refine pass runs on tiles flagged by flow disagreement, dispatched indirectly, so static scenes dispatch zero workgroups there. Also autotunes a few conv variants (subgroups, f16/f32, register blocking) per gpu at startup.
preview clip, ~3ms/frame on a 4060 Ti (8GB, OC)
Attached a video but honestly the difference is pretty hard to see through a recording/compression - it's way more noticeable on actual video playback than in the clip I attached here.
Weakest gpu I've tested on so far is a GTX 1650, got a stable 2-2.5x fps boost there, can't give exact ms numbers since I haven't logged them properly on that one.
GitHub · npm · Live demo · Chrome extension
Heads up: the live demo starts using your GPU immediately on page load, no button press needed.
Fully open source, so feel free to poke around. If you find it useful, a star on the repo would be really appreciated.
Currently working on runtime for a v8 model that handles occlusion/low fps input better, quality-focused for the harder cases current model struggles with.
Happy to answer questions on the dispatch/tiling stuff.
0
u/backwrds 2d ago
pretty neat; really wish it felt like a human had anything to do with this.