r/GraphicsProgramming • • 16h ago

Saw a paper about one-pass generation, got curious, trained a small G-buffer upscaler on my 3060. Here's what came out

No goal here beyond curiosity — I saw the Jeveration paper, wondered whether that "one pass instead of iteration" idea makes sense for upscaling, and decided to make a small Proof of concept.

What it is: a 2.15M-param U-Net. Input is a deliberately bad frame — 320×180 at 2 samples per pixel with sub-pixel jitter — plus depth, view-space normals, albedo and motion vectors. Output is 640×360 in one forward pass. No diffusion, no history buffer, no sampling, deterministic.

Numbers on six clips it never saw (48 frames each, 640×360 output):

bicubic model
PSNR ↑ 31.50 37.62
SSIM ↑ 0.868 0.955
LPIPS ↓ 0.185 0.036
temporal err ↓ 0.0371 0.0323

Two things I noticed while training:

Numbers on 6 clips it never saw: PSNR 37.62 vs 31.50 for bicubic, LPIPS 0.036 vs 0.185, temporal error 0.0323 vs 0.0371.

Two things that cost me a day each:

  1. Blender 5.3 motion vectors are in full-resolution pixels, not UV, and they point backwards — sample(t, x − v) matches t−1. Available with motion blur off. I verified the convention by warping: mean error drops 0.023 → 0.0058.
  2. The renderer gives linear HDR (highlights up to ~7.0) while my output head clamps to [0,1]. About 10% of pixels became unreachable and the loss just… plateaued. No error, no warning. I burned an entire 30k-step run before I figured out why. Fix is 1 − exp(−x) when loading.

https://reddit.com/link/1ycpr2o/video/wjjsf2xt0k5i1/player

Where it falls apart: 145 ms at 1080p on a 3060, so 7 fps — not real-time and I'm not pretending otherwise. No history means no disocclusion recovery. Trained on 16–34 primitive scenes, so dense geometry and packed UVs are outside what it's seen.

The part that might outlive the experiment is the data generator: 60 clips × 48 frames with exact G-buffers in ~16 minutes, no external assets. If you ever need sequences with correct motion vectors, that bit works on its own.

Code, weights, generator: https://github.com/Zixelbrew/one-pass-neural-upscaler

Disclosure: I wrote this together with an AI coding assistant — I set the direction, chose the architecture and the losses, ran everything on my own card and checked every number. It also helped me write this post; most of the lines of code came from the assistant. If that changes how you weigh the post, fair enough, but the repo and the sha256 in the README are real either way.

5 Upvotes

8 comments sorted by

•

u/AutoModerator 16h ago

Recently updated rules. Please check that your post is in compliance with Rules 1, 4, 5, and 6 on the sidebar. TL;DR:

  • No showcases.
  • Disclose AI usage in post or project.
  • Present a topic to talk about, e.g. how something works.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

15

u/S48GS 16h ago

Not real time at 1080p on this GPU — 7 fps. Most of the time is spent at full resolution, where the model is memory-bound rather than compute-bound.

compress your model - it is first basic optimization in NN

I assume you run 32-bit values - no reason - collapse to 8-bit range numbers - multiple times performance gain

no need retrain - you can compress just numbers of exist model

2

u/TrickyChen 15h ago

Thank you very much for this! It's my first project like this and I am pretty new to many parts of work in this field. I really appreciate this feedback.

9

u/S48GS 15h ago edited 15h ago

Thank you very much for this! It's my first project like this

and you let AI to do all the job... bruteforce learning is not effective - invest time in NN/ML basics

"model" is just numbers in some range

basic optimisation - if numbers in 0-1 float range you can just use 8-bit with almost no quality loss because model accumulate multiple layers to produce result

slowest part in gpu - is memory reading - less memory to read - faster

if range is more random like most in 0-1 float but some is 3+ or 100+ - this is where you compressing by finding most common region - etc - basic compression

to optimize like that - it primitive basic - but you need to understand how it actually work to know where what to apply

better understand yourself how it all work - it very simple - all those "python frameworks" is just common template to make it work

0

u/TrickyChen 15h ago

Thank you again. I made this as a proof of concept and some data and metrics that could be used by those who's interested. I understand how quantisation works. It's not a complete product. It needs optimization and has a long way ahead of possible development. Either by me, or somebody who's got stronger machines gonna like the ideas and create something new. Just a building block. Ai is just a tool, to be fair. Could have I done the same without it? Probably, but it would take comparably more time. I came up with this specific way of solving a problem and that's what matters imo.

12

u/sebamestre 12h ago

Pls write your own post. Ai written text sucks and it feels awful to read.

It is not written for anybody that hasn't heard of your project to read. It's missing key facts.

It doesn't communicate what you found cool or interesting about it. It goes into detail about random stuff and does not really have a point.

Please if you are want to participate in an online community, just do so. What is the point if the ai is going to interact for you?

Idk your reasons to have ai write the text. If it's for example a low levels of English I recommend that you either write in your native language and then have ai translate it so there is some of your voice going through, or just write whatever rough English you can. People usually like posts that have something cool and show some excitement from the poster, even if the writing is basic.

If you think it makes you look better because it's all polished, it doesn't. It looks like all the slop that's saturating the internet lately

‐------

More specific points

"Input is a deliberately bad frame -- 320x180 at 2 samples per pixel" 2 samples of what? Why do you train on deliberately bad frames? What is the use case here? Better to train realistically bad frames, no?

"Numbers on six clips it never saw" why make this sound like it's cool? Obviously you're not a moron so you wouldn't show the loss on a sample that is part of the training set right?

"PSNR, SSIM, LPIPS, temporal err" What are these metrics? Is lower better in all of them?

"Two things that cost me a day" who the fuck cares? Who cares that blenders motion is backwards? Who cares that your specific scenes ended up with "highlights up to ~7"? It depends on the particular scene. And what does it even mean? Is 7 somehow significant? Do we know in what units it is? Glad that you learned about tonemapping tho

"Not real time and I'm not pretending otherwise" bruhhhh who said anything about pretending?

And really? Do you think that the data generator might outlive the experiment? What makes you think that? You said nothing wrt what's good about it, besides that it does the thing it says it does.

1

u/TrickyChen 11h ago edited 11h ago

I appreciate you being blunt and honest. English is not my native language, but I can speak it somewhat fine.

I will try to go through points one by one.

1.I trained it on deliberately bad frames to just test out the idea of doing a deterministic one pass upscaler and seeing if it works. It's way easier to assemble the data set and control training. There's no real use case yet as it's just a test I did overnight, but hopefully it can find its use case somewhere, where you would need cheap upscale without hallucinations that come from multiple steps.

2. Mostly ai being ai when writing the article, but it's just basic validation that it works on new data.

3. Psnr is peak signal to noise ratio. more - better Ssim is structural similarity. More - better Lpips is learned perpetual image patch similarity. less - better Temporal error is how unstable the image is in motion. Less - better Static flicker is flickering on static objects. Less - better.

4. That stuff got copied from progress md and it's meaningless without context.

5. There is definitely over exaggeration, but basically it's a dependency free procedural generator that makes g buffers. A good reusable tool if somebody ever stumbles on it.

Edit: I will rewrite the post by hand when I get home in a day or two. I lack knowledge in some specifics, which was the reason for using ai as I wanted the post to be accurate. It slopped parts that didn't need to be slop. All feedback is really appreciated as it's really a great way to learn new skills and knowledge.

1

u/TrickyChen 11h ago

I find it cool, because the basic premise of jeveration worked on upscaling and it might work in other fields beyond gaming if gets properly optimized, retrained for a specific field and compressed.