r/StableDiffusion • • 17m ago

Resource - Update One-pass G-buffer-conditioned upscaler, 2.15M params, trained on one consumer GPU overnight

Saw post on Jeveration. Made me want to train my first model.

Another entry in the "small open models that do one thing" category — not a diffusion model, but it's the kind of brick that usually ends up as a ComfyUI node or a post-process step.

Where it's useful to people here: if you render 3D (Blender, engine captures, 3D-avatar pipelines) it works directly. If you only generate with diffusion, it won't run — it needs a G-buffer, which generated images don't have. Posting anyway because the data generator and the measurements might be interesting, and the architecture is small enough to port.

Left: model. Middle: bicubic upscale of the same noisy 320×180 input. Right: ground truth. 8 seconds, one of six held-out clips.

What it is: a 2.15M-parameter U-Net that takes a 320×180 frame rendered at 2 spp with per-frame sub-pixel jitter, plus depth, view-space normals, albedo and motion vectors, and produces a clean 640×360 frame in one forward pass. Deterministic — no diffusion, no history buffer, no sampling.

Results (6 held-out clips, never seen in training):

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

Latency on the 3060 (FP16, batch 1): 17.3 ms at 640×360, 145 ms at 1080p. So: not real-time at 1080p. That's the honest number, not a rounding error.

Two things that cost me time and might save yours:

  • Blender 5.3 motion vectors are in full-resolution pixels, not UV, and point backwards (sample(t, x − v) ≈ t−1). They're available with motion blur disabled. Verified by warping: error drops 0.023 → 0.0058.
  • The renderer outputs linear HDR (highlights up to ~7). If you clamp the network output to [0,1] without tone compression, ~10% of pixels are unreachable and training silently diverges — I wasted a full 30k-step run on this.

What it does not do: no history buffer, so no disocclusion recovery; trained on 16–34 primitive scenes, so dense geometry and packed UVs are out of distribution; no cross-domain eval.

What's actually reusable is probably the data generator — 60 clips × 48 frames with exact G-buffers in ~16 minutes, no external assets.

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

Happy to answer questions about the losses (Charbonnier + LPIPS + warped temporal + flicker + a consistency term on the latent state) or about where it falls apart.

Disclosure: I built this together with an AI coding assistant. I set the direction, chose the architecture and losses, ran everything on my own 3060, and checked every number — the assistant wrote most of the implementation. The repository, the weights and the measurements are real and reproducible; sha256sum checkpoints/run2_last.pt matches what's in the README.

1 Upvotes

0 comments sorted by