-
Hi! 👋 I'm in the very beginning stages of building a web library / sdk to make it super easy to run super resolution in the browser. I'm not here to share the project (yet), it's still very much in construction. As a starting point / proof of concept, I'd like to port a few Anime4K shaders to WebGPU, especially the upscaler CNN networks, since they are conceptually very easy to write shaders for. I implemented the Anime4K_Upscale_CNN_x2_S.glsl network here and I think it works (see output below)? I just wanted to confirm I'm understanding the depth to space layer correctly, since while I'm familiar with WebGL, I've never used MPV's hooks and am not where what some of these variable values are at runtime. I understand that you have a By trial and error, I found out that the residual is constructed by organizing the The actual WGSL langauge (which is similar enough to OpenGL) I used is:
Where I suspect one issue might be the fact that in WebGPU you need to flip the Y direction before rendering to canvas, but in either case, the order of the pixel shuffle seems weird, and this line Which is what I would have expected, but doing so seems to result in a residual map that seems just wrong? For the time being I'll just stick with the order that seems to be outputting the correct residual map, but this did seem confusing so I figured I'd ask to clarify if anyone has a clue as to if I'm doing something fundamentally wrong. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
That's a really cool concept! Would love to see upscaling for web content... |
Beta Was this translation helpful? Give feedback.
That would be a good start, training on a subset of the synla dataset using the provided demo notebook takes only a few minutes for the smallest network. (Even if the final networks were not trained exclusively on the synla dataset, for testing purposes it is enough)