ltomes commited on
Commit
0e2cfff
·
verified ·
1 Parent(s): aa80143

userdevice-rtus-0.1.0 — first public weights release (stage-D2, best-by-DISTS iter50000)

Browse files
README.md ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ library_name: onnx
4
+ pipeline_tag: image-to-image
5
+ # No base_model tag: this is a DISTILLATION. HF base_model_relation
6
+ # accepts finetune/adapter/merge/quantized and none of those is true --
7
+ # the student trains from scratch against teacher targets. A wrong
8
+ # relation would be a false provenance claim on a public page, so the
9
+ # teacher is credited in the prose and in LICENSE/NOTICE instead.
10
+ tags:
11
+ - super-resolution
12
+ - video-upscaling
13
+ - real-time
14
+ - onnx
15
+ - tensorrt
16
+ - jetson
17
+ ---
18
+
19
+ # Model card — userDevice RTUS
20
+
21
+ This is the card that ships with a weights release. It is kept in the code
22
+ repository so it is versioned alongside the model that produced it, and is
23
+ uploaded as the `README.md` of the Hugging Face model repository under
24
+ [huggingface.co/ltomes](https://huggingface.co/ltomes).
25
+
26
+ Per-file digests are not reproduced here; they ship as `SHA256SUMS` beside
27
+ the weights, generated at upload from the artefacts themselves.
28
+
29
+ ---
30
+
31
+ ## What this is
32
+
33
+ **RTUS** (Real Time Upscale) is a 2x super-resolution model for video,
34
+ trained under a hard per-frame deadline: **38 ms** inside the 41.7 ms of a
35
+ 24 fps frame, on **NVIDIA Jetson Thor** with TensorRT FP16.
36
+
37
+ Most super-resolution models optimise a quality metric and never report a
38
+ frame time. This one treats the frame budget as the constraint and spends
39
+ quality inside it. A quality gain that missed the budget was a rejected
40
+ training arm, not a gain.
41
+
42
+ - **Release** — `0.1.0`, the **stage-D2** checkpoint, iteration 50000,
43
+ selected best-by-DISTS across all eleven D2 checkpoints (0.141940).
44
+ - **Tier** — d48, architecture `rtmosr_ea_film`, 9,722,409 parameters.
45
+ - **Scale** — 2x.
46
+ - **Source code** — https://github.com/ltomes/userdevice-rtus, commit
47
+ `78aa727`.
48
+
49
+ A second tier exists in the code (d64, `rtmosr_ea_film_sd`, 33,886,420
50
+ parameters, for inputs at or below 720p). **It is not part of this release
51
+ and has no published timings.**
52
+
53
+ ## Files in this release
54
+
55
+ | File | What it is |
56
+ |---|---|
57
+ | `userdevice-rtus-0.1.0-540p.onnx` | fixed-shape ONNX, 540p input |
58
+ | `userdevice-rtus-0.1.0-720p.onnx` | fixed-shape ONNX, 720p input |
59
+ | `userdevice-rtus-0.1.0-1080p.onnx` | fixed-shape ONNX, 1080p input |
60
+ | `userdevice-rtus-0.1.0-parity.npz` | a fixed real input and the torch fp32 output for it |
61
+ | `userdevice-rtus-0.1.0.safetensors` | the training checkpoint, for re-export and fine-tuning |
62
+ | `userdevice-rtus-0.1.0-sweep.json` | the sweep this selection was made from |
63
+ | `SHA256SUMS` | digests for every file above |
64
+
65
+ The shapes are fixed rather than dynamic because the deployment target
66
+ builds one engine per working point.
67
+
68
+ **Use the parity file.** It exists so you can confirm your own TensorRT
69
+ engine matches the reference implementation instead of trusting that it
70
+ does. Run the fixed input through your engine and compare against the
71
+ stored fp32 output; the project's own acceptance threshold is **>40 dB**.
72
+
73
+ ## Measured throughput
74
+
75
+ Measured on the stage-D2 checkpoint — the weights in this release, not a
76
+ projection from a different checkpoint.
77
+
78
+ Jetson Thor, TensorRT 10.13.3, FP16, `builderOptimizationLevel=5`, CUDA
79
+ graph enabled, median `enqueueV3` GPU time, compute-only:
80
+
81
+ | Input | Output | Latency (median) | Throughput |
82
+ |---|---|---|---|
83
+ | 540p | 1080p | 6.335 ms | 158 fps |
84
+ | 720p | 1440p | 12.350 ms | 81 fps |
85
+ | 1080p | 4K | 28.742 ms | 35 fps |
86
+
87
+ p95 and p99 sat within 0.2 ms of the median at every shape. Steadiness is
88
+ the point: a model that averages 30 fps but stalls once a second drops
89
+ frames. TensorRT parity for this checkpoint was **75.51 dB** against the
90
+ torch fp32 reference.
91
+
92
+ These numbers are compute-only on one named device. They are not a promise
93
+ about your pipeline, your hardware, or end-to-end playback.
94
+
95
+ ## How it was trained
96
+
97
+ A distilled student, trained from scratch with
98
+ [traiNNer-redux](https://github.com/the-database/traiNNer-redux). Stage A
99
+ initialises from nothing and every later stage initialises from the
100
+ project's own stage-A checkpoint, so **no third-party weights are in the
101
+ lineage**.
102
+
103
+ The student is an [RTMoSR](https://github.com/rewaifu/RTMoSR)-style
104
+ small-kernel backbone with a per-pixel EA gate on the residual branch of
105
+ every backbone block. Ablating the teacher showed its quality lives in EA
106
+ gating and collective depth rather than in its 17px large kernels, so the
107
+ student keeps the cheap backbone and buys depth over width.
108
+
109
+ ### Training data
110
+
111
+ No images are redistributed with this model.
112
+
113
+ - **HR** — the public NomosRealWeb release (6000 × 512² Nomos-v2 HR images).
114
+ - **LR** — derived from those HRs: synthesised sub-pixel motion on the HR
115
+ path, downscale 1/2, then real libx264 encoding (CRF 18–34, GOP 24/48),
116
+ harvesting P and B frames. There is no synthetic noise stage — grain is
117
+ signal in the target domain, and only the codec degrades the LR.
118
+ - **Distillation targets** — the teacher run over the LR and downscaled 2x.
119
+
120
+ The `_film` in the architecture and config names denotes the **latency
121
+ tier**, not the content. The model was not trained on film or television.
122
+
123
+ Corpus lineage, recorded as lineage and not as a restriction: the
124
+ NomosRealWeb HRs are Nomos-v2, itself distilled from 14 upstream datasets.
125
+ Those terms bind the dataset; this release distributes a model and
126
+ redistributes no images. Full record in
127
+ [`docs/PROVENANCE.md`](https://github.com/ltomes/userdevice-rtus/blob/main/docs/PROVENANCE.md).
128
+
129
+ ## How it was evaluated
130
+
131
+ A checkpoint is accepted by passing four legs on identical frames, not
132
+ because a number went up:
133
+
134
+ 1. **Sweep** — PSNR/SSIM/DISTS/LPIPS across every checkpoint against
135
+ bicubic and the teacher, selecting **best-by-DISTS** rather than the last
136
+ iteration.
137
+ 2. **Face gate** — blocking, zero tolerance. Faces are where invented detail
138
+ is most visible and least forgivable.
139
+ 3. **Invention probe** — how much high-frequency detail the student invented
140
+ rather than recovered. Inventing more than the teacher (8.50%) kills the
141
+ arm.
142
+ 4. **Temporal** — flicker across adjacent frames of a clip. A per-frame
143
+ model can shimmer on video while scoring well on every still-frame
144
+ metric.
145
+
146
+ ## Limitations — read before comparing this to anything
147
+
148
+ - **The quality numbers are not comparable to the super-resolution
149
+ literature.** Every internal figure is computed on the project's own
150
+ validation split. That split is reproducible, but it is not Set5/Set14/
151
+ BSD100/Urban100/Manga109, and it is not Y-channel PSNR. Published
152
+ comparisons against this model are not meaningful until those sets are
153
+ run.
154
+ - **Standard SR benchmark sets are out of distribution for this model.**
155
+ They are bicubic-degraded; this model was trained on codec-degraded input,
156
+ which is what video actually is. Expect it to under-perform on them
157
+ relative to models tuned for bicubic degradation, and treat that as a
158
+ domain mismatch rather than a quality verdict.
159
+ - **The timings cannot be reproduced from the source repository** — it
160
+ contains no timing harness. They were measured on the target hardware with
161
+ the tooling named above.
162
+ - **The d64 tier has no published timings** and is not in this release.
163
+ - **Fixed input shapes.** Anything other than 540p, 720p or 1080p input
164
+ needs a re-export from the checkpoint.
165
+
166
+ ## Licence and attribution
167
+
168
+ **These weights are licensed [CC BY-SA
169
+ 4.0](https://creativecommons.org/licenses/by-sa/4.0/)** — Creative Commons
170
+ Attribution-ShareAlike 4.0 International. You may use, modify and
171
+ redistribute them, including commercially, provided you give attribution and
172
+ license redistributed derivatives of the weights under the same terms.
173
+
174
+ The source code is MIT and is licensed separately; see the repository.
175
+
176
+ **This model is distilled from
177
+ [`4xNomosWebPhoto_RealPLKSR`](https://huggingface.co/Phips/4xNomosWebPhoto_RealPLKSR)
178
+ by Philip Hofmann**, licensed CC BY 4.0. That attribution is required by the
179
+ teacher's licence and travels with these weights. It is not discharged by a
180
+ footnote, and it is additional to the CC BY-SA 4.0 terms above.
181
+
182
+ Third-party components of the code that produced this model: RTMoSR (MIT),
183
+ neosr (Apache-2.0), traiNNer-redux (Apache-2.0). Full notices in
184
+ [`NOTICE`](https://github.com/ltomes/userdevice-rtus/blob/main/NOTICE).
SHA256SUMS ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ cda73933e89138ca243685b3812316adf23ea10ff4dc8def416b11a96d128513 ./userdevice-rtus-0.1.0-1080p.onnx
2
+ e0f6423ba8c0cdd26d950d38de3136a70eb661696a5e70d748174b9dd88ad35a ./userdevice-rtus-0.1.0-540p.onnx
3
+ 66c20ecc1ab290cf2c50a095c8cc03393c2e6bb66ad7d1a4bedbec831d93978a ./userdevice-rtus-0.1.0-720p.onnx
4
+ 6f6ef08965905c1a14b3ae173f9f3df015c393764fdb5966e774191b5e7ab8ed ./userdevice-rtus-0.1.0-parity.npz
5
+ 05bd9b0d76318f759a3a2b6af04d682801242a7854ef6cf55577bee9fcf97e61 ./userdevice-rtus-0.1.0-sweep.json
6
+ b13c380e91337aceb05ea35a3cb2aae6ec208d1e5fe8455d4400ec330434311f ./userdevice-rtus-0.1.0.safetensors
userdevice-rtus-0.1.0-1080p.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cda73933e89138ca243685b3812316adf23ea10ff4dc8def416b11a96d128513
3
+ size 3389801
userdevice-rtus-0.1.0-540p.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0f6423ba8c0cdd26d950d38de3136a70eb661696a5e70d748174b9dd88ad35a
3
+ size 3389801
userdevice-rtus-0.1.0-720p.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66c20ecc1ab290cf2c50a095c8cc03393c2e6bb66ad7d1a4bedbec831d93978a
3
+ size 3389801
userdevice-rtus-0.1.0-parity.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f6ef08965905c1a14b3ae173f9f3df015c393764fdb5966e774191b5e7ab8ed
3
+ size 23512086
userdevice-rtus-0.1.0-sweep.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bicubic": {
3
+ "psnr": 27.151017813515832,
4
+ "ssim": 0.7568755996253133,
5
+ "dists": 0.20788434644540152,
6
+ "lpips": 0.30935694302121797,
7
+ "n": 120
8
+ },
9
+ "teacher_web": {
10
+ "psnr": 26.81392487303996,
11
+ "ssim": 0.7702789026752171,
12
+ "dists": 0.1553540716568629,
13
+ "lpips": 0.16223125805457433,
14
+ "n": 120
15
+ },
16
+ "iter005000": {
17
+ "psnr": 28.198935408879574,
18
+ "ssim": 0.795789146620585,
19
+ "dists": 0.15110823164383572,
20
+ "lpips": 0.17694652232651908,
21
+ "n": 120
22
+ },
23
+ "iter010000": {
24
+ "psnr": 28.183519813293643,
25
+ "ssim": 0.7949602432581881,
26
+ "dists": 0.14867937664190928,
27
+ "lpips": 0.1736627215053886,
28
+ "n": 120
29
+ },
30
+ "iter015000": {
31
+ "psnr": 28.11213779731637,
32
+ "ssim": 0.7935711018371319,
33
+ "dists": 0.1467716008424759,
34
+ "lpips": 0.1672540293385585,
35
+ "n": 120
36
+ },
37
+ "iter020000": {
38
+ "psnr": 28.0671546855675,
39
+ "ssim": 0.791871199880063,
40
+ "dists": 0.14631718397140503,
41
+ "lpips": 0.1638831621967256,
42
+ "n": 120
43
+ },
44
+ "iter025000": {
45
+ "psnr": 28.02427439542601,
46
+ "ssim": 0.7903197143637822,
47
+ "dists": 0.1452482322851817,
48
+ "lpips": 0.16257562902756034,
49
+ "n": 120
50
+ },
51
+ "iter030000": {
52
+ "psnr": 28.018808391525457,
53
+ "ssim": 0.789680246351159,
54
+ "dists": 0.14471360743045808,
55
+ "lpips": 0.16148834638297557,
56
+ "n": 120
57
+ },
58
+ "iter035000": {
59
+ "psnr": 27.977784760053204,
60
+ "ssim": 0.788375637751494,
61
+ "dists": 0.1434735710422198,
62
+ "lpips": 0.1589543136457602,
63
+ "n": 120
64
+ },
65
+ "iter040000": {
66
+ "psnr": 27.919386524237474,
67
+ "ssim": 0.7861326257354799,
68
+ "dists": 0.14233870754639308,
69
+ "lpips": 0.15611661525132756,
70
+ "n": 120
71
+ },
72
+ "iter045000": {
73
+ "psnr": 27.91008665557869,
74
+ "ssim": 0.785849444727853,
75
+ "dists": 0.14203598350286484,
76
+ "lpips": 0.15484573661039272,
77
+ "n": 120
78
+ },
79
+ "iter050000": {
80
+ "psnr": 27.90717999711638,
81
+ "ssim": 0.785655157221129,
82
+ "dists": 0.14193963011105856,
83
+ "lpips": 0.15463767222439248,
84
+ "n": 120
85
+ }
86
+ }
userdevice-rtus-0.1.0.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b13c380e91337aceb05ea35a3cb2aae6ec208d1e5fe8455d4400ec330434311f
3
+ size 38915940