Develop every raw through the AI denoise by default, with a strength, cached

The learned demosaic was an option under Detail, off by default. It is
now how a Bayer raw is developed: on by default at full strength on
every device — which hardware runs it is the inference engine's choice
— and first in the Adjust panel, since it decides what every control
below is applied to.

Strength (0-100, default 100) replaces Keep grain: grain = 100 -
strength, the same luminance-only blend, so moving it is one GPU pass
and never a re-run. 0.21.0's sidecars stored grain; it is still read,
as the inverse, and never written.

With it on for every photograph, the result is now kept on disk
(denoise.md §7.1, §12): the network's output as half floats, keyed on
a SHA-256 of the file's bytes and the model, oldest first past a 5 GB
budget, beside the inference engine's cache. A reopened photograph and
an export of one already developed read it back instead of running the
network again; a damaged entry is a miss.
This commit is contained in:
2026-10-03 22:16:36 -04:00
parent ff0effbfe1
commit 2e7f14dafe
10 changed files with 397 additions and 51 deletions
+26 -1
View File
@@ -418,6 +418,31 @@ measured while the GPU sat power-capped at an 810 MHz memory clock; uncapped is
about four times faster. The Rust path reproduces the training repository's output to 2.5e-4 at
worst; TensorRT fp16 is 75 dB from f32.
**Not yet:** the result is not cached across sessions (§7.1) — reopening recomputes; the tripod real
**Not yet:** ~~the result is not cached across sessions (§7.1) — reopening recomputes;~~ done after
0.21.0, §12; the tripod real
pairs of §6.1; X-Trans (§9); the hand-written WGSL path, for which `export.py` already writes the
weights blob and a manifest a shader can follow.
## 12. On by default, with a strength, and cached (after 0.21.0)
The photographer asked for the learned demosaic to be how a raw is developed, not an option found
under Detail. So:
- **On by default, at full strength, on every device.** The switch is `switch_on`, so an untouched
photograph writes nothing and is developed from the network everywhere; turning it off is the
edit. Which hardware runs it is the inference engine's choice (inference.md), not this setting's:
the default does not depend on what a device is believed to manage.
- **Strength replaces Keep grain.** 0–100, default 100, and grain = 100 − strength, so it is the
same luminance-only blend of §7.2 and moving it is one GPU pass, never a re-run. An edit saved by
0.21.0 stored `grain`; it is still read, as its inverse, and never written.
- **First in the panel**, above the lens corrections: it decides what every control below is
applied to. Its attribute is still Detail, so it also stays where the Detail tab shows it.
- **Cached on disk** (§7.1): the network's output for a file, as half floats (about 120 MB for
20 MP — no compressor to link on Android), keyed on a SHA-256 of the file's bytes and the model
file's name and size, oldest first past a 5 GB budget, beside the inference engine's cache under
the data root. The strength is applied afterwards and is not in the key. A reopened photograph,
and an export of one already developed, read it back instead of recomputing.
What it costs: every raw opened runs the network once, with the classical demosaic shown until the
result lands, and a first export of an unopened raw runs it too. Every raw renders differently from
0.21.0 unless switched off.