From c2cfacd7d3bad560ccbc0509e33d3862439bedf1 Mon Sep 17 00:00:00 2001
From: Duncan Tourolle
Date: Wed, 7 Oct 2026 07:14:52 -0400
Subject: [PATCH] Record the new Best in the spec and the manual
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
denoise.md §15: why Best became one network, how it compares with the
mixture and Medium on real photographs and the chart, the candidates that
fell short, the file names, the saved-edit numbering, and the timings on
the 3050 -- 0.51-0.54 s whole-frame, 0.95 s in tiles, against 2.60 s for
the mixture in tiles. The manual lists Bilinear, Fast and Best, says an
edit made with Medium opens with Best, and gives the new time; Medium's
close-up goes.
---
docs/dev/denoise.md | 56 ++++++++++++++++++++
docs/manual/README.md | 28 +++++-----
docs/manual/index.html | 27 +++++-----
docs/manual/media/develop-denoise-medium.png | 3 --
4 files changed, 83 insertions(+), 31 deletions(-)
delete mode 100644 docs/manual/media/develop-denoise-medium.png
diff --git a/docs/dev/denoise.md b/docs/dev/denoise.md
index 4cb0985..88992e4 100644
--- a/docs/dev/denoise.md
+++ b/docs/dev/denoise.md
@@ -571,3 +571,59 @@ In PyTorch fp16 the same network over the whole 20 MP frame in one call took 3.5
tiles, so a card that holds a whole frame gains more than the 6 GB one does; `WHOLE_FRAME_MAX` is a
constant sized for 6 GB until the limit follows the card's memory.
+## 15. Best becomes one network (0.24)
+
+The photographer's goal for 0.24 was Best's quality in under a second on the laptop. Whole frames
+(§14) took the mixture from 2.60 s to 1.37 s and no further on a 6 GB card, so the other half was
+a single network that holds the mixture's quality at a third of its work. Methods are now
+`Bilinear`, `Fast` and `Best`; Medium and the mixture are retired.
+
+**The network** is `fb-combo` (darkroom-denoise, 2026-10-07): §11's shape (32-64-128-192, blocks
+1-1-2-2, 3.2 M parameters, 48 GMAC/MP, halo 192), 20 000 steps from `fb-edges2` ← `student-m`,
+taught by the mixture at a half share, with 10 % drawn scenes and 25 % crops from the edge-rich
+cells of the training frames (branch `edge-sampling`). Scored on real photographs — the chart
+overstated the mixture's lead (a chart-sharp network was softer than Medium on real edges) — on the
+validation crops in the top quarter for sharp detail:
+
+| | Edge PSNR, ISO 1600 / 6400 / 25600 | Sharpness kept | Smooth areas | Held-out PSNR, ISO 400 / 1600 / 6400 / 25600 | Chart edge |
+|---|---|---|---|---|---|
+| Mixture (Best to 0.23) | 30.71 / 29.93 / 28.55 | 0.899 / 0.868 / 0.782 | 42.61 / 41.71 / 40.12 | 40.69 / 39.84 / 38.47 / 36.71 | 0.82 |
+| `fb-combo` (Best from 0.24) | 30.67 / 29.87 / 28.49 | 0.902 / 0.874 / 0.792 | 42.54 / 41.57 / 39.85 | 40.64 / 39.78 / 38.38 / 36.54 | 0.89 |
+| Medium (to 0.23) | 30.43 / 29.68 / 28.38 | 0.896 / 0.862 / 0.776 | 42.59 / 41.69 / 40.08 | 40.59 / 39.75 / 38.40 / 36.65 | 1.30 |
+
+Edges within 0.04–0.06 dB and more sharpness kept at every ISO; the known shortfall is smooth areas
+at ISO 25600, 0.27 dB. The photographer took it as it stood at 20 000 of a planned 30 000 steps.
+Others tried on the way, each short of the mixture on real photographs: `fb-sharp` (drawn scenes,
+chart-sharp but Medium's real edges), `fb-edges` (half edge-rich crops: edges close, ISO 25600
+flats −0.24 dB), `fb-edges2` (a quarter: 0.03–0.14 dB short everywhere, chart 1.33–1.47), and a
+from-scratch 24-48-96-128 between Fast and Medium.
+
+**Files.** `mosaic-hq-1408.onnx`, `mosaic-hq.onnx` (any size) and `mosaic-hq-1408.a16w16.onnx` for
+the Hexagon. A new name, not Medium's or Best's: the result cache keys a model by name and size,
+and this one is byte for byte Medium's size. The tablet form lost 0.00 dB in simulated QDQ at every
+ISO and at most 0.09 dB across the ×0.5–×4 noise bracket (A16W8 0.08 / 0.26 dB; int8 −10.6 dB);
+not yet confirmed on the tablet itself.
+
+**Saved edits** keep their numbers: 2, which was Medium, is now Best; 3, which was Best, is past the
+end and reads as the default, Best. Both land on the new network with no migration.
+
+**Measured** 2026-10-07, `_MG_8862`, RTX 3050 Laptop, TensorRT fp16, P3 / 5001 MHz, nothing else on
+the card:
+
+| Best | Network time | Peak GPU memory |
+|---|---|---|
+| mixture, 1408² tiles (0.23) | 2.60 s | — |
+| mixture, whole frame (§14) | 1.37 s | — |
+| `fb-combo`, 1408² tiles | 0.95 s | 0.55 GB |
+| `fb-combo`, whole frame (two 4160 × 3248) | **0.51–0.54 s** | 1.75 GB |
+
+Decode and the hot-pixel pass add 0.4–0.5 s, so a photograph is about a second end to end. Whole
+frame against tiles: max |Δ| 0.0029, 90 dB apart — fp16's spread. The whole-frame engine's first
+build took 12 minutes (the mixture's 28); from the cache it loads in about a second, so the session
+keeps the engine's ordinary 30 s idle decay rather than unloading after each photograph: at 1.75 GB
+it fits beside the develop view on a 6 GB card, and an unload would cost the next photograph a
+second.
+
+The manual's close-up for Best is still the mixture's render, which this network matches to within
+the table above; it is re-recorded with the next pass of `tools/manual/record.sh`.
+
diff --git a/docs/manual/README.md b/docs/manual/README.md
index f406b87..ab19b74 100644
--- a/docs/manual/README.md
+++ b/docs/manual/README.md
@@ -215,22 +215,22 @@ colour that come with it, while keeping the fine detail. Look at it at
`Method` chooses how:
-- `Best`, the default: two networks, one for smooth areas and one for
- edges, blended where each is better. The cleanest skies and the sharpest
- lettering, and the slowest.
-- `Medium`: one network taught by `Best`. Nearly as clean in smooth areas,
- a little softer on hard edges, in about a third of the time.
-- `Fast`: a smaller one, taught the same way. Visibly noisier at very high
- ISO than the other two, but still far cleaner than none, and quick.
+- `Best`, the default: clean skies and sharp lettering, edges kept as
+ crisp as the camera recorded them.
+- `Fast`: a smaller network, taught the same way. Visibly noisier at very
+ high ISO than `Best`, but still far cleaner than none, and quicker.
- `Bilinear`: the camera's ordinary conversion, noise and all.
+A photograph last edited with `Medium`, which earlier versions offered,
+opens with `Best`.
+
The photograph shows the camera's ordinary conversion while the network
works, with its progress in the bar at the top, and changes when it is
-done — on a laptop's graphics card, about two and a half seconds for a
-20-megapixel photograph with `Best` and under one with the other two;
-longer on a processor alone or on the tablet. The first photograph after
-installing waits a few minutes more while the graphics card prepares each
-network, once. The result is kept, so a photograph opened again,
+done — on a laptop's graphics card, about a second for a 20-megapixel
+photograph with `Best`, reading the file included; longer on a processor
+alone or on the tablet. After installing, the graphics card spends up to a
+quarter of an hour preparing each network, once, in the background; the
+photographs developed meanwhile take a little longer. The result is kept, so a photograph opened again,
or exported, does not wait a second time, and switching back to a method
already used is quick.
`Strength` eases it off: below 100 % it puts back some of what was removed,
@@ -241,8 +241,8 @@ The lamp and railing of a night frame at ISO 8000, at 1:1, by each method:
| Bilinear | Fast |
|---|---|
|  |  |
-| **Medium** | **Best** |
-|  |  |
+| **Best** | |
+|  | |
It works on raw files from any camera with the usual colour pattern of
red, green and blue squares — not on JPEGs, and not yet on Fujifilm's
diff --git a/docs/manual/index.html b/docs/manual/index.html
index 2aeec12..6f89d4d 100644
--- a/docs/manual/index.html
+++ b/docs/manual/index.html
@@ -296,22 +296,21 @@ colour that come with it, while keeping the fine detail. Look at it at
1:1, where noise lives.
Method chooses how:
-Best, the default: two networks, one for smooth areas and one for
-edges, blended where each is better. The cleanest skies and the sharpest
-lettering, and the slowest.
-Medium: one network taught by Best. Nearly as clean in smooth areas,
-a little softer on hard edges, in about a third of the time.
-Fast: a smaller one, taught the same way. Visibly noisier at very high
-ISO than the other two, but still far cleaner than none, and quick.
+Best, the default: clean skies and sharp lettering, edges kept as
+crisp as the camera recorded them.
+Fast: a smaller network, taught the same way. Visibly noisier at very
+high ISO than Best, but still far cleaner than none, and quicker.
Bilinear: the camera's ordinary conversion, noise and all.
+A photograph last edited with Medium, which earlier versions offered,
+opens with Best.
The photograph shows the camera's ordinary conversion while the network
works, with its progress in the bar at the top, and changes when it is
-done — on a laptop's graphics card, about two and a half seconds for a
-20-megapixel photograph with Best and under one with the other two;
-longer on a processor alone or on the tablet. The first photograph after
-installing waits a few minutes more while the graphics card prepares each
-network, once. The result is kept, so a photograph opened again,
+done — on a laptop's graphics card, about a second for a 20-megapixel
+photograph with Best, reading the file included; longer on a processor
+alone or on the tablet. After installing, the graphics card spends up to a
+quarter of an hour preparing each network, once, in the background; the
+photographs developed meanwhile take a little longer. The result is kept, so a photograph opened again,
or exported, does not wait a second time, and switching back to a method
already used is quick.
Strength eases it off: below 100 % it puts back some of what was removed,
@@ -319,8 +318,8 @@ as grain without colour, for a picture that does not look too smooth.
The lamp and railing of a night frame at ISO 8000, at 1:1, by each method:
| Bilinear | Fast |
 |  |
-| Medium | Best |
- |  |
+| Best | |
+ | |
It works on raw files from any camera with the usual colour pattern of
red, green and blue squares — not on JPEGs, and not yet on Fujifilm's
diff --git a/docs/manual/media/develop-denoise-medium.png b/docs/manual/media/develop-denoise-medium.png
deleted file mode 100644
index bae7a69..0000000
--- a/docs/manual/media/develop-denoise-medium.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1dc3a44ddfb440704d749e96495908fc7834c940e18067efdbbf8123a3f96c77
-size 251267