Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

Merge the faces stack (#172/#173/#174, integrate-batch-14) into AI RAW denoise (#384)

Brandon Thomasc65065de2f6a
diff --cc Cargo.lock
index d082de8aa,3fc4e7213..397094eda
--- a/Cargo.lock
+++ b/Cargo.lock
@@@ -3101,9 -2891,8 +3111,10 @@@ dependencies =
"lightcraft-catalog",
"lightcraft-codecs",
"lightcraft-color",
+ "lightcraft-denoise",
+ "lightcraft-denoise-core",
"lightcraft-develop",
+ "lightcraft-faces",
"lightcraft-fetch",
"lightcraft-geom",
"lightcraft-gpu",
@@@ -3306,9 -3118,9 +3341,10 @@@ dependencies =
"lightcraft-catalog",
"lightcraft-codecs",
"lightcraft-color",
+ "lightcraft-denoise",
"lightcraft-develop",
"lightcraft-engine",
+ "lightcraft-faces",
"lightcraft-geom",
"lightcraft-meta",
"lightcraft-pipeline",
@@@ -3399,12 -3211,16 +3435,22 @@@ dependencies =
"libc",
]
+[[package]]
+name = "matrixcompare-core"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0bdabb30db18805d5290b3da7ceaccbddba795620b86c02145d688e04900a73"
+
+ [[package]]
+ name = "matrixmultiply"
+ version = "0.3.11"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7"
+ dependencies = [
+ "autocfg",
+ "rawpointer",
+ ]
+
[[package]]
name = "maybe-rayon"
version = "0.1.1"
diff --cc Cargo.toml
index daff58405,058da8f92..5f7c85db6
--- a/Cargo.toml
+++ b/Cargo.toml
@@@ -11,9 -11,8 +11,10 @@@ repository = "https://github.com/storyt
[workspace.dependencies]
# internal
+lightcraft-denoise-core = { path = "crates/denoise-core" }
+lightcraft-denoise = { path = "crates/denoise", default-features = false }
lightcraft-geom = { path = "crates/geom" }
+ lightcraft-faces = { path = "crates/faces" }
lightcraft-sysmem = { path = "crates/sysmem" }
lightcraft-color = { path = "crates/color" }
lightcraft-raster = { path = "crates/raster" }
diff --cc ROADMAP.md
index 18d4dae10,f816f7d13..4a6b101a5
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@@ -25,7 -25,7 +25,7 @@@ duplicate Local entries #22, black GPU
| **Feature checklist** | 79.7% | P0 core and P1 nearly complete: import (Add / Copy / Move, templates, devices), library, grid/loupe/compare/survey, every Edit slider, curves, colour grading, masking tools, crop/Upright, heal/clone, presets/profiles, versions/history, sync, export, menus, shortcuts | P0: full-resolution zoom detail; P1: lens-profile database, content-aware fill (patch synthesis), video playback/trim |
| **RAW coverage** (formats people shoot) | ~55% | DNG (all kinds), CR2, CR3 lossless Bayer and version 0x100/0x200 C-RAW (M50/R100/R8 pixel-exact corpus), ARW, NEF (uncompressed + Huffman lossless/lossy), RAF (uncompressed, lossless/lossy compressed Bayer and X-Trans), uncompressed ORF, RW2 / RWL / Panasonic RAW (every raw format, checked on 178 files from 118 Panasonic and Leica bodies), PEF; every container's embedded preview (incl. CR3) | **CR3** (every Canon since ~2018), compressed ORF, Nikon lossy-after-split, Canon sRAW, HEIC/AVIF. NEFs labelled compressed but stored uncompressed (Z 6 packed 14-bit, D850 12-bit uncompressed). Per-model verification is thin (~55 corpus files vs >1,000 models) |
| **Colour & image quality** | ~55–65% | Pipeline is complete and fast; GPU path CPU-exact within 1/255 | **No measured camera calibration database**: ARW, NEF, RW2, RAF, CR3, CR2 and PEF have guarded camera-JPEG colour estimates, with bundled ILCE-7M4, X-H2S and X-T4 profiles (docs/camera-preview-colour.md); other non-DNG raws and rejected estimates use a neutral matrix. Colour fidelity remains incomplete. No lens-profile database. No measured fidelity against Lightroom (tone, highlights, texture/clarity, NR, sharpening are tuned by eye) |
- | **AI & computational** | ~15–20% | Assisted culling (focus, bursts), auto tone, HDR/panorama merge; subject/sky/background masks as classical heuristics; non-destructive Bayer RAW denoise with opt-in weights on pure-Rust CPU/GPU | Real segmentation masks (subject, sky, people, objects, landscape, depth), denoise model policy / linear RGB / quality verification, super resolution, lens blur, generative remove, faces/people, natural-language search. **Blocked on a model strategy** (licensable weights or our own training; pure-Rust inference is feasible) |
-| **AI & computational** | ~15–20% | Assisted culling (focus, bursts), auto tone, HDR/panorama merge; subject/sky/background masks as classical heuristics, or the photo's own segmentation mattes when it ships them (DNG semantic masks, e.g. iPhone ProRAW's sky matte); **faces (MVP, [docs/faces.md](docs/faces.md))**: a pure-Rust detector (a 232 KB opt-in download), opt-in recognition models (one-click download or add a file; they run on the shared pure-Rust CPU interpreter; pinned SFace/AuraFace embeddings agree with an independent reference runtime on 40 public crops; one-thread medians 34–36 / 233–252 ms (AuraFace remains expensive)), a background scan that finds and embeds faces, name suggestions, a person's page with look-alike faces to confirm, an Unnamed faces section (look-alikes together, select a group and name it at once) | Real segmentation masks (subject, sky, people, objects, landscape, depth), AI denoise, super resolution, lens blur, generative remove, natural-language search; for faces: clusters with separators between groups, small faces in large photos (the detector looks at 640 px), thresholds calibrated on live faces, writing face regions back to XMP. **Blocked on a model strategy** (licensable weights or our own training; pure-Rust inference is feasible) |
++| **AI & computational** | ~15–20% | Assisted culling (focus, bursts), auto tone, HDR/panorama merge; subject/sky/background masks as classical heuristics, or the photo's own segmentation mattes when it ships them (DNG semantic masks, e.g. iPhone ProRAW's sky matte); non-destructive Bayer RAW denoise with opt-in weights on pure-Rust CPU/GPU; **faces (MVP, [docs/faces.md](docs/faces.md))**: a pure-Rust detector (a 232 KB opt-in download), opt-in recognition models (one-click download or add a file; they run on the shared pure-Rust CPU interpreter; pinned SFace/AuraFace embeddings agree with an independent reference runtime on 40 public crops; one-thread medians 34–36 / 233–252 ms (AuraFace remains expensive)), a background scan that finds and embeds faces, name suggestions, a person's page with look-alike faces to confirm, an Unnamed faces section (look-alikes together, select a group and name it at once) | Real segmentation masks (subject, sky, people, objects, landscape, depth), denoise model policy / linear RGB / quality verification, super resolution, lens blur, generative remove, natural-language search; for faces: clusters with separators between groups, small faces in large photos (the detector looks at 640 px), thresholds calibrated on live faces, writing face regions back to XMP. **Blocked on a model strategy** (licensable weights or our own training; pure-Rust inference is feasible) |
| **Workflow & library** | ~85% (single machine) | Robust catalog (journal + snapshots, background compaction, crash-tested), 85k-photo libraries stay responsive, Local browsing with automatic cleanup, XMP interop, keywords, smart albums, Move import | Opening an 85k library takes 1.7–4.7 s; no cloud sync (out of scope), no tablet companion (#74, roadmap), shared albums, publish services, tethering |
| **Classic modules** | ~30% | Geotagging from GPX track logs, soft proofing (partial), slideshow (basic) | **Map view, Book, Print, Slideshow module, Web, publish services**: ~40 tracker rows ⬜ |
| **HDR & video** | 0% | | HDR edit/display/export; video play/trim/edit/export |
@@@ -59,9 -59,9 +59,9 @@@ Priorities, in order. Each points at tr
(references stay in the local `plan/`), then tune against the numbers.
5. **Lens profiles of our own** (LR-EDIT-OPTICS-PROFILE, P1).
6. **AI model strategy** (maintainer decision): which permissively licensed models (or our own training) for
- segmentation masks and denoise. Bayer denoise inference is implemented in pure Rust with an opt-in GPL model; release policy and independently licensed weights remain open. Unblocks M12 and Enhance. Object / Describe masks now
- segmentation masks and denoise; then pure-Rust inference. Unblocks M12 and Enhance. Face detection and recognition run on our own checked Rust engine. Object / Describe masks now
++ segmentation masks and denoise. Bayer denoise inference is implemented in pure Rust with an opt-in GPL model; release policy and independently licensed weights remain open. Unblocks M12 and Enhance. Face detection and recognition run on our own checked Rust engine. Object / Describe masks now
run Meta's SAM 3 in pure Rust (optional, user-consented download under the non-OSI SAM License; CDN mirrors still
- to be set up, docs/ai-masks.md); Subject / Sky / People and Enhance are still open.
+ to be set up, docs/ai-masks.md); Subject / Sky / People, Raw Details and Super Resolution are still open.
7. **Then:** HDR (Q), the Classic output modules (Print first, then Map view, Book, Slideshow), video (R), localisation
and accessibility.
diff --cc apps/lightcraft-cli/src/main.rs
index c6dfdc2ac,15edac61f..f8ddf550d
--- a/apps/lightcraft-cli/src/main.rs
+++ b/apps/lightcraft-cli/src/main.rs
@@@ -734,13 -732,15 +732,15 @@@ fn snapshot(args: &[String]) -> Result<
let t0 = Instant::now();
let mut session = match &library {
Some(dir) => {
- let mut s = Session::new().with_fs().with_default_denoise_models();
- let mut s = Session::new().with_fs().with_default_face_models();
++ let mut s = Session::new().with_fs().with_default_denoise_models().with_default_face_models();
s.open_library(dir, false).map_err(|e| library_error(dir, e))?;
s
}
- None if files.is_empty() => Session::with_demo().with_fs().with_default_denoise_models(),
- None => Session::new().with_fs().with_default_denoise_models(),
- None if files.is_empty() => Session::with_demo().with_fs().with_default_face_models(),
- None => Session::new().with_fs().with_default_face_models(),
++ None if files.is_empty() => Session::with_demo().with_fs().with_default_denoise_models().with_default_face_models(),
++ None => Session::new().with_fs().with_default_denoise_models().with_default_face_models(),
};
+ // Apply compute policy before imports or the first scripted query can discover an adapter.
+ session.execute("app.gpu", &json!({"enabled": false})).map_err(|e| e.to_string())?;
if !files.is_empty() {
let ti = Instant::now();
let r = session.execute("library.import", &json!({"paths": expand_paths(&files)})).map_err(|e| e.to_string())?;
diff --cc apps/lightcraft/Cargo.toml
index f5fe2763b,f9173c2ab..e4d7f2b3b
--- a/apps/lightcraft/Cargo.toml
+++ b/apps/lightcraft/Cargo.toml
@@@ -10,9 -10,10 +10,12 @@@ default-run = "lightcraft
workspace = true
[features]
-default = []
+default = ["denoise"]
+denoise = ["lightcraft-engine/denoise"]
+rawnind-model = ["denoise", "lightcraft-engine/rawnind-model"]
+ # Open HEIC/HEIF photos (the optional lightcraft-heif crate). Not default so distributors choose
+ # it (HEVC patents); build with `--features heif` to include it.
+ heif = ["lightcraft-codecs/heif"]
[dependencies]
lightcraft-engine = { workspace = true, features = ["sam"] }
diff --cc apps/lightcraft/src/main.rs
index e6629c005,be44cc334..a0394da95
--- a/apps/lightcraft/src/main.rs
+++ b/apps/lightcraft/src/main.rs
@@@ -125,7 -125,7 +125,7 @@@ fn gpu_crash_notice(what: &str) -> Stri
}
fn config_dir() -> Option<std::path::PathBuf> {
-- lightcraft_engine::camera_profiles::config_dir()
++ lightcraft_engine::config::config_dir()
}
/// `<config>/ui.json`, the saved UI state and app settings — `None` when nothing is read or
@@@ -458,11 -466,11 +473,11 @@@ fn open_session(in_memory: bool, dir: O
/// If the library can't be opened the session is empty and in memory — never seeded with the
/// demo photos, never written anywhere — and the problem is returned: the window then says so
/// and offers Try Again / Choose Another Library… / Continue Without Saving / Quit (issue #100).
- fn open_session(in_memory: bool, dir: Option<std::path::PathBuf>, seed_demo: bool) -> (Session, Option<LibraryProblem>) {
+ fn open_library_session(in_memory: bool, dir: Option<std::path::PathBuf>, seed_demo: bool) -> (Session, Option<LibraryProblem>) {
if in_memory {
- return (if seed_demo { Session::with_demo() } else { Session::new() }.with_fs().with_system_clock(), None);
+ return (if seed_demo { Session::with_demo() } else { Session::new() }.with_fs().with_default_denoise_models().with_system_clock(), None);
}
- let unopened = || Session::new().with_fs().with_system_clock();
+ let unopened = || Session::new().with_fs().with_default_denoise_models().with_system_clock();
let Some(dir) = dir else {
log::warn!("no library location (set --library or LIGHTCRAFT_LIBRARY)");
return (unopened(), Some(LibraryProblem::new("", "There is no home folder to keep the library in. Choose a folder for it.")));
diff --cc crates/engine/Cargo.toml
index f11ca4671,7a6ab4394..9bd9845fa
--- a/crates/engine/Cargo.toml
+++ b/crates/engine/Cargo.toml
@@@ -21,9 -21,8 +21,10 @@@ web-time = { workspace = true
lightcraft-preview = { workspace = true }
lightcraft-codecs = { workspace = true }
lightcraft-raw = { workspace = true }
+lightcraft-denoise-core = { workspace = true }
+lightcraft-denoise = { workspace = true, optional = true }
lightcraft-meta = { workspace = true }
+ lightcraft-faces = { workspace = true }
miniz_oxide = { workspace = true }
lightcraft-merge = { workspace = true }
rayon = { workspace = true }
@@@ -40,12 -43,7 +45,9 @@@ lightcraft-fetch = { workspace = true
[features]
# AI masks with SAM 3 (Object / Describe). Off for the web and CLI builds.
sam = ["dep:lightcraft-segment"]
+denoise = ["dep:lightcraft-denoise", "lightcraft-denoise/runtime", "lightcraft-gpu/denoise"]
+rawnind-model = ["denoise", "lightcraft-denoise/rawnind-model", "lightcraft-denoise-core/rawnind-model"]
- [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
- lightcraft-fetch = { workspace = true }
-
[dev-dependencies]
libc = { workspace = true }
lightcraft-tiff = { workspace = true }
diff --cc crates/engine/src/camera_profiles.rs
index 97fb8ef2f,97fb8ef2f..80192cf6e
--- a/crates/engine/src/camera_profiles.rs
+++ b/crates/engine/src/camera_profiles.rs
@@@ -65,19 -65,19 +65,8 @@@ impl CameraProfile
}
}
--/// LightCraft's configuration folder (settings, GPU marker, camera profiles).
--pub fn config_dir() -> Option<PathBuf> {
-- if cfg!(target_os = "macos") {
-- std::env::var_os("HOME").map(|h| PathBuf::from(h).join("Library/Application Support/LightCraft"))
-- } else if cfg!(windows) {
-- std::env::var_os("APPDATA").map(|a| PathBuf::from(a).join("LightCraft"))
-- } else {
-- std::env::var_os("XDG_CONFIG_HOME")
-- .map(PathBuf::from)
-- .or_else(|| std::env::var_os("HOME").map(|h| PathBuf::from(h).join(".config")))
-- .map(|c| c.join("lightcraft"))
-- }
--}
++/// LightCraft's configuration folder (settings, GPU marker, camera profiles); one helper for the app.
++pub use crate::config::config_dir;
/// Where camera profiles are read from and written to.
pub fn dir() -> Option<PathBuf> {
diff --cc crates/engine/src/cmd/mod.rs
index 9f1d255c1,303a92d45..ef838fe02
--- a/crates/engine/src/cmd/mod.rs
+++ b/crates/engine/src/cmd/mod.rs
@@@ -141,7 -143,9 +144,10 @@@ pub fn command_specs() -> &'static [Com
v.extend(missing::specs());
v.extend(metadata::specs());
v.extend(filters::specs());
+ v.extend(denoise::specs());
+ v.extend(face_models::specs());
+ v.extend(face_detect::specs());
+ v.extend(face_recognize::specs());
v
})
}
diff --cc crates/engine/src/config.rs
index 96632f7ac,933dc22dc..7ab9b6531
--- a/crates/engine/src/config.rs
+++ b/crates/engine/src/config.rs
@@@ -1,23 -1,37 +1,58 @@@
- //! Shared, opt-in per-user denoise model storage for native hosts.
-//! Where LightCraft keeps per-user data on this machine: the config folder (app settings, face models).
++//! Where LightCraft keeps per-user data on this machine: the config folder (app settings, camera
++//! profiles, face and denoise models).
+ //!
+ //! Hosts that have a file system (the desktop app, the CLI, the MCP server) share these defaults so a model
+ //! installed from one is there for the others. Nothing here is applied automatically: a [`Session`] has no
-//! face-models folder until a host asks for one ([`Session::with_default_face_models`]), so tests stay
-//! hermetic.
++//! face- or denoise-models folder until a host asks for one ([`Session::with_default_face_models`],
++//! [`Session::with_default_denoise_models`]), so tests stay hermetic.
- use crate::Session;
use std::path::PathBuf;
+ use crate::Session;
+
+ /// LightCraft's per-user config folder (`…/LightCraft`), if the platform tells us where.
+ pub fn config_dir() -> Option<PathBuf> {
+ if cfg!(target_os = "macos") {
+ std::env::var_os("HOME").map(|h| PathBuf::from(h).join("Library/Application Support/LightCraft"))
+ } else if cfg!(windows) {
+ std::env::var_os("APPDATA").map(|a| PathBuf::from(a).join("LightCraft"))
+ } else {
+ std::env::var_os("XDG_CONFIG_HOME")
+ .map(PathBuf::from)
+ .or_else(|| std::env::var_os("HOME").map(|h| PathBuf::from(h).join(".config")))
+ .map(|c| c.join("lightcraft"))
+ }
+ }
+
+ /// Where face models are kept: `$LIGHTCRAFT_FACE_MODELS` if set, else `<config>/models`.
+ pub fn default_face_models_dir() -> Option<PathBuf> {
+ std::env::var_os("LIGHTCRAFT_FACE_MODELS").filter(|v| !v.is_empty()).map(PathBuf::from).or_else(|| config_dir().map(|d| d.join("models")))
+ }
+
++/// Where opt-in denoise models are kept: `$LIGHTCRAFT_DENOISE_MODELS` if set, else `<config>/denoise-models`.
+pub fn default_denoise_models_dir() -> Option<PathBuf> {
+ std::env::var_os("LIGHTCRAFT_DENOISE_MODELS")
+ .filter(|v| !v.is_empty())
+ .map(PathBuf::from)
- .or_else(|| crate::camera_profiles::config_dir().map(|d| d.join("denoise-models")))
++ .or_else(|| config_dir().map(|d| d.join("denoise-models")))
+}
+
impl Session {
+ /// Keep face models in the shared default folder ([`default_face_models_dir`]).
+ pub fn with_default_face_models(mut self) -> Self {
+ self.face_models_dir = default_face_models_dir();
+ self
+ }
++
++ /// Keep denoise models in the shared default folder ([`default_denoise_models_dir`]).
+ pub fn with_default_denoise_models(mut self) -> Self {
+ self.set_denoise_models_dir(default_denoise_models_dir());
+ self
+ }
+
++ /// Point AI denoise at `dir` (or at no folder), dropping what was learned about the old one.
+ pub fn set_denoise_models_dir(&mut self, dir: Option<PathBuf>) {
+ self.denoise.models_dir = dir;
+ self.denoise.touch();
+ }
}
diff --cc crates/engine/src/files.rs
index 2052579d9,01de8a7a2..95481a4ff
--- a/crates/engine/src/files.rs
+++ b/crates/engine/src/files.rs
@@@ -347,20 -305,64 +348,66 @@@ fn load_bytes_now
.collect();
eprintln!("[profile] raw source {}×{} (max {max_edge}, ms after decode): {}", img.width, img.height, parts.join(", "));
}
+ let twin = twin.map(|picture| finish(picture).0);
let (temp, tint) = xy_to_temp_tint(xy);
let relative = crate::camera_preview::file_local_look(raw.format) && t.matrix_is_fallback;
+ // White balance re-evaluates the file's own colour model (when it has one and no
+ // file-local look matrix sits on top of it)
+ let camera_color = (!t.matrix_is_fallback && camera_look.is_none()).then(|| {
+ let tags = lightcraft_raw::ColorData { profile: Default::default(), ..raw.color.clone() };
+ Arc::new(lightcraft_pipeline::CameraColor { tags, developed_for: xy })
+ });
let camera_tone = camera_look.as_ref().map(|p| p.tone).or_else(|| raw.color.profile.tone_curve.as_ref().and_then(dng_tone_curve));
let (temp, tint) = if relative { (6500.0, 0.0) } else { (temp.round(), tint.round()) };
- return Ok((img, twin, SourceInfo { raw: true, as_shot_temp: temp, as_shot_tint: tint, lens, relative_wb: relative, camera_tone }));
+ return Ok((
+ img,
++ twin,
+ SourceInfo { raw: true, as_shot_temp: temp, as_shot_tint: tint, lens, relative_wb: relative, camera_color, camera_tone, mattes },
+ ));
}
let d = lightcraft_codecs::decode(&bytes, fit_box(max_edge)).map_err(|e| e.to_string())?;
drop(bytes);
let img = d.to_working();
let img = if img.width.max(img.height) > max_edge { fit(&img, max_edge, max_edge, Filter::Mitchell) } else { img };
- Ok((img.into_oriented(Orientation::from_exif(d.orientation)), SourceInfo::default()))
+ Ok((img.into_oriented(Orientation::from_exif(d.orientation)), None, SourceInfo::default()))
}
+ /// The semantic masks of a DNG that AI masks understand, over the developed image (default crop,
+ /// oriented like it). Person mattes without a confidently selected pixel are left out (the
+ /// Subject mask then falls back to its heuristic); a sky matte counts even when empty (no sky).
+ fn dng_mattes(bytes: &[u8], raw: &lightcraft_raw::RawImage) -> Option<Arc<lightcraft_pipeline::masks::Mattes>> {
+ use lightcraft_pipeline::masks::{MatteKind, Mattes};
+ if raw.format != lightcraft_raw::RawFormat::Dng {
+ return None;
+ }
+ let mut mattes = Mattes::default();
+ for m in lightcraft_raw::semantic_masks(bytes) {
+ let Some(kind) = matte_kind(&m.name) else { continue };
+ let Some(img) = m.developed(raw.active_area, raw.crop) else { continue };
+ if kind != MatteKind::Sky && !img.data.iter().any(|&v| v >= 128) {
+ continue;
+ }
+ mattes.push(kind, img.into_oriented(raw.orientation));
+ }
+ (!mattes.is_empty()).then(|| Arc::new(mattes))
+ }
+
+ /// What a semantic mask selects, by its `SemanticName`: Apple's (iPhone ProRAW) are named after
+ /// their auxiliary image types, `urn:com:apple:photo:<year>:aux:<type>`. Other names: `None`.
+ fn matte_kind(name: &str) -> Option<lightcraft_pipeline::masks::MatteKind> {
+ use lightcraft_pipeline::masks::MatteKind::*;
+ let kind = name.strip_prefix("urn:com:apple:photo:")?.rsplit(':').next()?;
+ Some(match kind {
+ "semanticskymatte" => Sky,
+ "semanticskinmatte" => Skin,
+ "semantichairmatte" => Hair,
+ "semanticteethmatte" => Teeth,
+ "semanticglassesmatte" => Glasses,
+ "portraiteffectsmatte" => Person,
+ _ => return None,
+ })
+ }
+
/// A DNG `ProfileToneCurve` (linear in, linear out, 1.0 = white after exposure compensation) as the
/// finish stage's camera tone curve: 32 knots, log-spaced over 12 stops below white; above white
/// the camera tone's shoulder continues it.
@@@ -448,25 -450,18 +495,33 @@@ fn fit_box(max_edge: usize) -> lightcra
}
/// Filesystem-backed embedded-preview hook (native).
+ ///
+ /// Reads the whole file to find the preview, so it holds the memory gate for twice the file's size (the file and the
+ /// decoded preview): background work (the face scan) waits for room, interactive work is counted and never waits.
pub fn fs_preview_loader() -> PreviewLoader {
- Arc::new(|path: &str, max_edge: usize| embedded_preview_srgb(&std::fs::read(path).ok()?, max_edge))
+ Arc::new(|path: &str, max_edge: usize| {
+ let len = std::fs::metadata(path).map(|m| usize::try_from(m.len()).unwrap_or(usize::MAX)).unwrap_or(0);
+ let gate = crate::memory::work_gate();
+ let _permit = if crate::memory::is_background() { gate.acquire(len.saturating_mul(2)) } else { gate.acquire_urgent(len.saturating_mul(2)) };
+ embedded_preview_srgb(&std::fs::read(path).ok()?, max_edge)
+ })
}
+/// The filesystem-backed [`PairLoader`]: the file is read and decoded once, and developed as usual and from the photo's
+/// denoised picture. It holds two pictures at once, so it counts for more at the memory gate than a plain load.
+pub fn fs_pair_loader() -> PairLoader {
+ Arc::new(|path: &str, max_edge: usize, spec: &DenoiseSpec| {
+ let len = std::fs::metadata(path).map(|m| m.len() as usize).unwrap_or(0);
+ let weight = len * if max_edge <= crate::media::SourceLevel::Thumb.max_edge() { 4 } else { 10 };
+ let gate = crate::memory::work_gate();
+ let _permit = if crate::memory::is_background() { gate.acquire(weight) } else { gate.acquire_urgent(weight) };
+ let bytes = std::fs::read(path).map_err(|e| format!("{path}: {e}"))?;
+ let r = load_vec_pair(bytes, max_edge, spec);
+ crate::memory::release();
+ r
+ })
+}
+
/// Filesystem-backed hooks (native). On the web the host installs bytes-based hooks instead.
///
/// Their working memory is bounded by [`crate::memory::work_gate`]: background loads (grid
diff --cc crates/engine/src/lib.rs
index 00d8ab402,c3fcdd337..79efb9bb5
--- a/crates/engine/src/lib.rs
+++ b/crates/engine/src/lib.rs
@@@ -22,9 -18,13 +22,14 @@@ pub mod config
pub mod crs;
pub mod crs_masks;
pub mod demo;
+pub mod denoise;
pub mod devices;
pub mod export;
+ pub mod face_download;
+ #[cfg(not(target_arch = "wasm32"))]
+ mod faces_index;
+ #[cfg(not(target_arch = "wasm32"))]
+ mod faces_worker;
pub mod files;
pub mod fonts;
pub mod guard;
@@@ -166,8 -163,15 +171,17 @@@ pub struct Session
/// Set by a command whose change must not rewrite the photo's XMP sidecar even with auto-write on
/// (a catalog-only edit of data the sidecar writer does not emit); consumed when the command ends.
pub(crate) skip_auto_write: bool,
+ /// AI denoise: the model in use, the photos that have their picture and the work in progress.
+ pub(crate) denoise: denoise::State,
+ /// Where the host keeps face models (one folder each); `None` where there is no file system (the web).
+ pub face_models_dir: Option<std::path::PathBuf>,
+ /// Face model downloads started this session (the staged files wait in `<face_models_dir>/.downloads`).
+ pub face_downloads: face_download::Downloads,
+ /// The user's own list of models to download (`catalog.json` in the models folder), as last read.
+ pub(crate) face_catalog: lightcraft_faces::catalog::Catalog,
+ /// The loaded recognition model and the face embeddings made with it.
+ #[cfg(not(target_arch = "wasm32"))]
+ pub(crate) faces: faces_index::FacesState,
/// Copied develop settings (partial JSON) for Paste.
pub clipboard: Option<Value>,
/// The folder on disk the [`LibrarySource::Folder`] view browses.
@@@ -279,7 -278,11 +293,12 @@@ impl Session
redo: Vec::new(),
interaction: None,
skip_auto_write: false,
+ denoise: Default::default(),
+ face_models_dir: None,
+ face_downloads: Default::default(),
+ face_catalog: Default::default(),
+ #[cfg(not(target_arch = "wasm32"))]
+ faces: Default::default(),
clipboard: None,
meta_clipboard: None,
browse: None,
@@@ -800,10 -824,13 +840,15 @@@ mod tests
#[cfg(test)]
mod tests_color;
#[cfg(test)]
+mod tests_denoise;
+#[cfg(test)]
mod tests_export;
#[cfg(test)]
+ mod tests_face_models;
+ #[cfg(test)]
+ #[cfg(not(target_arch = "wasm32"))]
+ mod tests_face_recognize;
+ #[cfg(test)]
mod tests_folders;
#[cfg(test)]
mod tests_forget_local;
diff --cc crates/engine/src/library.rs
index 384d90ea3,d01c1b726..a83dc4a82
--- a/crates/engine/src/library.rs
+++ b/crates/engine/src/library.rs
@@@ -297,9 -297,9 +297,12 @@@ impl Session
{
log::error!("library: {e}");
}
+ // Photo ids belong to one library; denoise work must not carry into the next.
+ self.denoise.library_changed();
+ self.media.denoise.clear();
+ // what was learned about the old library's faces is saved, and none of it carries over (photo ids are per library)
+ #[cfg(not(target_arch = "wasm32"))]
+ self.faces.library_changed();
let (mut journal, mut catalog, report) = Journal::open(catalog)?;
// A loaded catalog counts revisions from 0, like every other one. Caches (sidebar counts,
// keyword tree, the grid's list…) are keyed on the revision, so give each library loaded
diff --cc crates/engine/src/media.rs
index 8130b5ade,e3ed58155..a4d2cdb77
--- a/crates/engine/src/media.rs
+++ b/crates/engine/src/media.rs
@@@ -176,39 -137,7 +176,40 @@@ pub struct DecodedSource
impl DecodedSource {
pub fn new(image: Arc<Rgb32f>, info: Option<SourceInfo>) -> Self {
- DecodedSource { image, info, camera_tone: None }
+ DecodedSource { image, info, camera_tone: None, denoised: None }
+ }
+
+ /// The picture to develop for a Denoise `amount` (0 to 1, see [`DevelopSettings::denoise_amount`]): the plain one,
+ /// the denoised one, or a mix of the two. A mix is made once per amount and kept, so the stages after it are
+ /// reused until the amount changes.
+ pub fn image_for(&self, amount: f32) -> Arc<Rgb32f> {
+ let Some(twin) = &self.denoised else { return self.image.clone() };
+ if amount.is_nan() || amount <= 0.0 || twin.image.width != self.image.width || twin.image.height != self.image.height {
+ return self.image.clone();
+ }
+ if amount >= 1.0 {
+ return twin.image.clone();
+ }
+ let thousandths = (amount * 1000.0).round().clamp(1.0, 999.0) as u32;
+ let mut memo = twin.mix.lock().unwrap_or_else(std::sync::PoisonError::into_inner);
+ if let Some((t, img)) = memo.as_ref()
+ && *t == thousandths
+ {
+ return img.clone();
+ }
+ let mut mixed = (*self.image).clone();
+ if !lightcraft_denoise::product::blend(&mut mixed, &twin.image, thousandths as f32 / 1000.0) {
+ return self.image.clone();
+ }
+ let mixed = Arc::new(mixed);
+ *memo = Some((thousandths, mixed.clone()));
+ mixed
+ }
+
- /// Cache cost: the picture, its denoised twin and room for the lazy mix.
++ /// Cache cost: the picture, its segmentation mattes, its denoised twin and room for the lazy mix.
+ pub fn bytes(&self) -> usize {
- self.image.data.len() * 12 + 64 + std::mem::size_of::<SourceInfo>() + self.denoised.as_ref().map_or(0, |t| t.bytes())
++ let mattes = self.info.as_ref().and_then(|i| i.mattes.as_ref()).map_or(0, |m| m.bytes());
++ self.image.data.len() * 12 + 64 + std::mem::size_of::<SourceInfo>() + mattes + self.denoised.as_ref().map_or(0, |t| t.bytes())
}
/// What to render these pixels against: the decoder's facts, else `header` (the catalog's)
@@@ -1420,10 -1229,9 +1433,10 @@@ mod tests
loader: Some(Arc::new(move |_, _| {
let mut image = Rgb32f::new(64, 64);
image.data.fill([0.1; 3]);
- Ok((image, info))
+ Ok((image, loaded_info.clone()))
})),
fallback: None,
+ denoise: None,
};
job.info = SourceInfo::default(); // Header facts cannot override decoder facts.
job.settings = Arc::new(DevelopSettings::default());
diff --cc crates/mcp/src/headless.rs
index 7d2d929c7,7347d33b4..837302d60
--- a/crates/mcp/src/headless.rs
+++ b/crates/mcp/src/headless.rs
@@@ -31,7 -31,7 +31,7 @@@ impl Drop for Headless
impl Default for Headless {
fn default() -> Self {
- Self::new(Session::new().with_fs().with_default_denoise_models())
- Self::new(Session::new().with_fs().with_default_face_models())
++ Self::new(Session::new().with_fs().with_default_denoise_models().with_default_face_models())
}
}
@@@ -42,7 -42,7 +42,7 @@@ impl Headless
/// A headless session with the procedurally generated demo library.
pub fn demo() -> Self {
- Self::new(Session::with_demo().with_fs().with_default_denoise_models())
- Self::new(Session::with_demo().with_fs().with_default_face_models())
++ Self::new(Session::with_demo().with_fs().with_default_denoise_models().with_default_face_models())
}
fn photo_or_active(&self, p: &Value) -> Result<PhotoId, String> {
diff --cc crates/ui-egui/Cargo.toml
index f36ac02ff,96779e310..d67494b78
--- a/crates/ui-egui/Cargo.toml
+++ b/crates/ui-egui/Cargo.toml
@@@ -25,8 -25,8 +25,9 @@@ serde_json = { workspace = true
log = { workspace = true }
[dev-dependencies]
+lightcraft-denoise = { workspace = true, features = ["runtime"] }
lightcraft-codecs = { workspace = true }
+ lightcraft-faces = { workspace = true }
[build-dependencies]
serde_json = { workspace = true }
diff --cc crates/ui-egui/locales/de.json
index 2465cd8ec,520c73f9f..64a485ed2
--- a/crates/ui-egui/locales/de.json
+++ b/crates/ui-egui/locales/de.json
@@@ -1798,93 -1798,5 +1798,94 @@@
"Install the SAM 3 Model": "SAM-3-Modell installieren",
"This build can't download the model yet. To install it by hand, put model.safetensors, vocab.json and merges.txt from Meta's facebook/sam3 in the folder above: Object and Describe work as soon as they are there.": "Diese Version kann das Modell noch nicht herunterladen. Zum Installieren von Hand lege model.safetensors, vocab.json und merges.txt aus Metas facebook/sam3 in den obigen Ordner: Objekt und Beschreiben funktionieren, sobald sie dort liegen.",
"Open Log Folder": "Protokollordner öffnen",
- "Back to this person": "Back to this person"
++ "Back to this person": "Back to this person",
+ "AI Denoise": "AI Denoise",
+ "AI Denoise Model": "AI Denoise Model",
+ "AI Denoise is off: press Use on a model.": "AI Denoise is off: press Use on a model.",
+ "AI Denoise needs a model. Install one in Settings.": "AI Denoise needs a model. Install one in Settings.",
+ "Accept & Download": "Accept & Download",
+ "Already installed. Remove it before installing a replacement.": "Already installed. Remove it before installing a replacement.",
+ "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.",
+ "Cache": "Cache",
+ "Checking and installing the model…": "Checking and installing the model…",
+ "Checking…": "Checking…",
+ "Clear cache": "Clear cache",
+ "Denoise Models": "Denoise Models",
+ "Denoise Settings": "Denoise Settings",
+ "Denoise all photos with an Amount": "Denoise all photos with an Amount",
+ "Downloaded and checked. Installing…": "Downloaded and checked. Installing…",
+ "Failed its last test": "Failed its last test",
+ "Graphics card": "Graphics card",
+ "I have read these terms and accept them for my own use": "I have read these terms and accept them for my own use",
+ "Inspect Denoise Model": "Inspect Denoise Model",
+ "Install Denoise Model": "Install Denoise Model",
+ "Install from file…": "Install from file…",
+ "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.": "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.",
+ "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).": "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).",
+ "LightCraft does not know this model, so it assumed:": "LightCraft does not know this model, so it assumed:",
+ "Limit": "Limit",
+ "Make it now": "Make it now",
+ "Make the denoised picture of the photos I am looking at": "Make the denoised picture of the photos I am looking at",
+ "Next up for AI Denoise…": "Next up for AI Denoise…",
+ "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.": "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.",
+ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.",
+ "Open page": "Open page",
+ "Open the model's page": "Open the model's page",
+ "Opens the model's own page in your browser, to read about it or get the file yourself.": "Opens the model's own page in your browser, to read about it or get the file yourself.",
+ "Processor": "Processor",
+ "Set up AI Denoise…": "Set up AI Denoise…",
+ "Speed": "Speed",
+ "Starting…": "Starting…",
+ "Tested and works on this computer": "Tested and works on this computer",
+ "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works": "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works",
+ "The graphics card is set up when the next photo is made.": "The graphics card is set up when the next photo is made.",
+ "The model is kept on this computer only. LightCraft never uploads or shares it.": "The model is kept on this computer only. LightCraft never uploads or shares it.",
+ "The processor does the work.": "The processor does the work.",
+ "There is no model file to install": "There is no model file to install",
+ "This build cannot run denoise models.": "This build cannot run denoise models.",
+ "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)": "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)",
+ "This file cannot be used yet": "This file cannot be used yet",
+ "Tick the box to accept the model's terms first": "Tick the box to accept the model's terms first",
+ "Try again": "Try again",
+ "Try the graphics card again": "Try the graphics card again",
+ "Turn off": "Turn off",
+ "Unknown licence": "Unknown licence",
+ "Use": "Use",
+ "Waiting to start…": "Waiting to start…",
+ "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.": "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.",
+ "cached picture": "cached picture",
+ "cached pictures": "cached pictures",
+ "commercial use allowed": "commercial use allowed",
+ "denoiseModel.accept": "denoiseModel.accept",
+ "in use": "in use",
+ "installed": "installed",
+ "makes AI Denoise available": "makes AI Denoise available",
+ "non-commercial use only": "non-commercial use only",
+ "photo has its denoised picture.": "photo has its denoised picture.",
+ "photo waiting": "photo waiting",
+ "photos have their denoised picture.": "photos have their denoised picture.",
+ "photos waiting": "photos waiting",
+ "starts using it for AI Denoise": "starts using it for AI Denoise",
+ "terms unclear": "terms unclear",
+ "the graphics card": "the graphics card",
+ "the graphics card is not used": "the graphics card is not used",
+ "Cancel Denoise": "Cancel Denoise",
+ "Cancel Denoise Model Download": "Cancel Denoise Model Download",
+ "Choose Denoise Model": "Choose Denoise Model",
+ "Clear Denoise Cache": "Clear Denoise Cache",
+ "Denoise Model Downloads": "Denoise Model Downloads",
+ "Denoise Photos": "Denoise Photos",
+ "Denoise Pump": "Denoise Pump",
+ "Denoise Status": "Denoise Status",
+ "Download Denoise Model": "Download Denoise Model",
+ "Remove Denoise Model": "Remove Denoise Model",
+ "Test Denoise Model": "Test Denoise Model",
+ "AI Denoise is enabled on the requesting photo": "AI Denoise is enabled on the requesting photo",
+ "After installation, AI Denoise will turn on for the requesting photo.": "After installation, AI Denoise will turn on for the requesting photo.",
+ "Cancel pending action": "Cancel pending action",
+ "Install a denoise model to enable AI Denoise on this photo": "Install a denoise model to enable AI Denoise on this photo",
+ "Pending photo action cancelled": "Pending photo action cancelled",
+ "Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed",
+ "ONNX model": "ONNX model",
+ "commercial use subject to GPL conditions": "commercial use subject to GPL conditions"
}
diff --cc crates/ui-egui/locales/es.json
index 032412c5a,1c8b00135..461fa2f65
--- a/crates/ui-egui/locales/es.json
+++ b/crates/ui-egui/locales/es.json
@@@ -1643,93 -1643,5 +1643,94 @@@
"Captured until": "Capturadas hasta",
"Only": "Solo",
"Open Log Folder": "Abrir carpeta de registros",
- "Back to this person": "Back to this person"
++ "Back to this person": "Back to this person",
+ "AI Denoise": "AI Denoise",
+ "AI Denoise Model": "AI Denoise Model",
+ "AI Denoise is off: press Use on a model.": "AI Denoise is off: press Use on a model.",
+ "AI Denoise needs a model. Install one in Settings.": "AI Denoise needs a model. Install one in Settings.",
+ "Accept & Download": "Accept & Download",
+ "Already installed. Remove it before installing a replacement.": "Already installed. Remove it before installing a replacement.",
+ "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.",
+ "Cache": "Cache",
+ "Checking and installing the model…": "Checking and installing the model…",
+ "Checking…": "Checking…",
+ "Clear cache": "Clear cache",
+ "Denoise Models": "Denoise Models",
+ "Denoise Settings": "Denoise Settings",
+ "Denoise all photos with an Amount": "Denoise all photos with an Amount",
+ "Downloaded and checked. Installing…": "Downloaded and checked. Installing…",
+ "Failed its last test": "Failed its last test",
+ "Graphics card": "Graphics card",
+ "I have read these terms and accept them for my own use": "I have read these terms and accept them for my own use",
+ "Inspect Denoise Model": "Inspect Denoise Model",
+ "Install Denoise Model": "Install Denoise Model",
+ "Install from file…": "Install from file…",
+ "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.": "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.",
+ "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).": "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).",
+ "LightCraft does not know this model, so it assumed:": "LightCraft does not know this model, so it assumed:",
+ "Limit": "Limit",
+ "Make it now": "Make it now",
+ "Make the denoised picture of the photos I am looking at": "Make the denoised picture of the photos I am looking at",
+ "Next up for AI Denoise…": "Next up for AI Denoise…",
+ "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.": "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.",
+ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.",
+ "Open page": "Open page",
+ "Open the model's page": "Open the model's page",
+ "Opens the model's own page in your browser, to read about it or get the file yourself.": "Opens the model's own page in your browser, to read about it or get the file yourself.",
+ "Processor": "Processor",
+ "Set up AI Denoise…": "Set up AI Denoise…",
+ "Speed": "Speed",
+ "Starting…": "Starting…",
+ "Tested and works on this computer": "Tested and works on this computer",
+ "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works": "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works",
+ "The graphics card is set up when the next photo is made.": "The graphics card is set up when the next photo is made.",
+ "The model is kept on this computer only. LightCraft never uploads or shares it.": "The model is kept on this computer only. LightCraft never uploads or shares it.",
+ "The processor does the work.": "The processor does the work.",
+ "There is no model file to install": "There is no model file to install",
+ "This build cannot run denoise models.": "This build cannot run denoise models.",
+ "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)": "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)",
+ "This file cannot be used yet": "This file cannot be used yet",
+ "Tick the box to accept the model's terms first": "Tick the box to accept the model's terms first",
+ "Try again": "Try again",
+ "Try the graphics card again": "Try the graphics card again",
+ "Turn off": "Turn off",
+ "Unknown licence": "Unknown licence",
+ "Use": "Use",
+ "Waiting to start…": "Waiting to start…",
+ "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.": "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.",
+ "cached picture": "cached picture",
+ "cached pictures": "cached pictures",
+ "commercial use allowed": "commercial use allowed",
+ "denoiseModel.accept": "denoiseModel.accept",
+ "in use": "in use",
+ "installed": "installed",
+ "makes AI Denoise available": "makes AI Denoise available",
+ "non-commercial use only": "non-commercial use only",
+ "photo has its denoised picture.": "photo has its denoised picture.",
+ "photo waiting": "photo waiting",
+ "photos have their denoised picture.": "photos have their denoised picture.",
+ "photos waiting": "photos waiting",
+ "starts using it for AI Denoise": "starts using it for AI Denoise",
+ "terms unclear": "terms unclear",
+ "the graphics card": "the graphics card",
+ "the graphics card is not used": "the graphics card is not used",
+ "Cancel Denoise": "Cancel Denoise",
+ "Cancel Denoise Model Download": "Cancel Denoise Model Download",
+ "Choose Denoise Model": "Choose Denoise Model",
+ "Clear Denoise Cache": "Clear Denoise Cache",
+ "Denoise Model Downloads": "Denoise Model Downloads",
+ "Denoise Photos": "Denoise Photos",
+ "Denoise Pump": "Denoise Pump",
+ "Denoise Status": "Denoise Status",
+ "Download Denoise Model": "Download Denoise Model",
+ "Remove Denoise Model": "Remove Denoise Model",
+ "Test Denoise Model": "Test Denoise Model",
+ "AI Denoise is enabled on the requesting photo": "AI Denoise is enabled on the requesting photo",
+ "After installation, AI Denoise will turn on for the requesting photo.": "After installation, AI Denoise will turn on for the requesting photo.",
+ "Cancel pending action": "Cancel pending action",
+ "Install a denoise model to enable AI Denoise on this photo": "Install a denoise model to enable AI Denoise on this photo",
+ "Pending photo action cancelled": "Pending photo action cancelled",
+ "Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed",
+ "ONNX model": "ONNX model",
+ "commercial use subject to GPL conditions": "commercial use subject to GPL conditions"
}
diff --cc crates/ui-egui/locales/ja.json
index dc22711ba,afc2fe44b..49f2ef807
--- a/crates/ui-egui/locales/ja.json
+++ b/crates/ui-egui/locales/ja.json
@@@ -1643,93 -1643,5 +1643,94 @@@
"Install the SAM 3 Model": "SAM 3モデルのインストール",
"This build can't download the model yet. To install it by hand, put model.safetensors, vocab.json and merges.txt from Meta's facebook/sam3 in the folder above: Object and Describe work as soon as they are there.": "このビルドではまだモデルをダウンロードできません。手動でインストールするには、Meta の facebook/sam3 の model.safetensors、vocab.json、merges.txt を上のフォルダに置いてください。置いた時点で「オブジェクト」と「説明で選択」が使えるようになります。",
"Open Log Folder": "ログフォルダーを開く",
- "Back to this person": "Back to this person"
++ "Back to this person": "Back to this person",
+ "AI Denoise": "AI Denoise",
+ "AI Denoise Model": "AI Denoise Model",
+ "AI Denoise is off: press Use on a model.": "AI Denoise is off: press Use on a model.",
+ "AI Denoise needs a model. Install one in Settings.": "AI Denoise needs a model. Install one in Settings.",
+ "Accept & Download": "Accept & Download",
+ "Already installed. Remove it before installing a replacement.": "Already installed. Remove it before installing a replacement.",
+ "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.",
+ "Cache": "Cache",
+ "Checking and installing the model…": "Checking and installing the model…",
+ "Checking…": "Checking…",
+ "Clear cache": "Clear cache",
+ "Denoise Models": "Denoise Models",
+ "Denoise Settings": "Denoise Settings",
+ "Denoise all photos with an Amount": "Denoise all photos with an Amount",
+ "Downloaded and checked. Installing…": "Downloaded and checked. Installing…",
+ "Failed its last test": "Failed its last test",
+ "Graphics card": "Graphics card",
+ "I have read these terms and accept them for my own use": "I have read these terms and accept them for my own use",
+ "Inspect Denoise Model": "Inspect Denoise Model",
+ "Install Denoise Model": "Install Denoise Model",
+ "Install from file…": "Install from file…",
+ "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.": "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.",
+ "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).": "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).",
+ "LightCraft does not know this model, so it assumed:": "LightCraft does not know this model, so it assumed:",
+ "Limit": "Limit",
+ "Make it now": "Make it now",
+ "Make the denoised picture of the photos I am looking at": "Make the denoised picture of the photos I am looking at",
+ "Next up for AI Denoise…": "Next up for AI Denoise…",
+ "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.": "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.",
+ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.",
+ "Open page": "Open page",
+ "Open the model's page": "Open the model's page",
+ "Opens the model's own page in your browser, to read about it or get the file yourself.": "Opens the model's own page in your browser, to read about it or get the file yourself.",
+ "Processor": "Processor",
+ "Set up AI Denoise…": "Set up AI Denoise…",
+ "Speed": "Speed",
+ "Starting…": "Starting…",
+ "Tested and works on this computer": "Tested and works on this computer",
+ "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works": "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works",
+ "The graphics card is set up when the next photo is made.": "The graphics card is set up when the next photo is made.",
+ "The model is kept on this computer only. LightCraft never uploads or shares it.": "The model is kept on this computer only. LightCraft never uploads or shares it.",
+ "The processor does the work.": "The processor does the work.",
+ "There is no model file to install": "There is no model file to install",
+ "This build cannot run denoise models.": "This build cannot run denoise models.",
+ "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)": "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)",
+ "This file cannot be used yet": "This file cannot be used yet",
+ "Tick the box to accept the model's terms first": "Tick the box to accept the model's terms first",
+ "Try again": "Try again",
+ "Try the graphics card again": "Try the graphics card again",
+ "Turn off": "Turn off",
+ "Unknown licence": "Unknown licence",
+ "Use": "Use",
+ "Waiting to start…": "Waiting to start…",
+ "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.": "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.",
+ "cached picture": "cached picture",
+ "cached pictures": "cached pictures",
+ "commercial use allowed": "commercial use allowed",
+ "denoiseModel.accept": "denoiseModel.accept",
+ "in use": "in use",
+ "installed": "installed",
+ "makes AI Denoise available": "makes AI Denoise available",
+ "non-commercial use only": "non-commercial use only",
+ "photo has its denoised picture.": "photo has its denoised picture.",
+ "photo waiting": "photo waiting",
+ "photos have their denoised picture.": "photos have their denoised picture.",
+ "photos waiting": "photos waiting",
+ "starts using it for AI Denoise": "starts using it for AI Denoise",
+ "terms unclear": "terms unclear",
+ "the graphics card": "the graphics card",
+ "the graphics card is not used": "the graphics card is not used",
+ "Cancel Denoise": "Cancel Denoise",
+ "Cancel Denoise Model Download": "Cancel Denoise Model Download",
+ "Choose Denoise Model": "Choose Denoise Model",
+ "Clear Denoise Cache": "Clear Denoise Cache",
+ "Denoise Model Downloads": "Denoise Model Downloads",
+ "Denoise Photos": "Denoise Photos",
+ "Denoise Pump": "Denoise Pump",
+ "Denoise Status": "Denoise Status",
+ "Download Denoise Model": "Download Denoise Model",
+ "Remove Denoise Model": "Remove Denoise Model",
+ "Test Denoise Model": "Test Denoise Model",
+ "AI Denoise is enabled on the requesting photo": "AI Denoise is enabled on the requesting photo",
+ "After installation, AI Denoise will turn on for the requesting photo.": "After installation, AI Denoise will turn on for the requesting photo.",
+ "Cancel pending action": "Cancel pending action",
+ "Install a denoise model to enable AI Denoise on this photo": "Install a denoise model to enable AI Denoise on this photo",
+ "Pending photo action cancelled": "Pending photo action cancelled",
+ "Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed",
+ "ONNX model": "ONNX model",
+ "commercial use subject to GPL conditions": "commercial use subject to GPL conditions"
}
diff --cc crates/ui-egui/locales/pt-br.json
index 521da1b12,be7d22baa..81e331c5c
--- a/crates/ui-egui/locales/pt-br.json
+++ b/crates/ui-egui/locales/pt-br.json
@@@ -1643,93 -1643,5 +1643,94 @@@
"≥ at least": "≥ no mínimo",
"日本語": "日本語",
"繁體中文(台灣)": "繁體中文(台灣)",
- "Back to this person": "Back to this person"
++ "Back to this person": "Back to this person",
+ "AI Denoise": "AI Denoise",
+ "AI Denoise Model": "AI Denoise Model",
+ "AI Denoise is off: press Use on a model.": "AI Denoise is off: press Use on a model.",
+ "AI Denoise needs a model. Install one in Settings.": "AI Denoise needs a model. Install one in Settings.",
+ "Accept & Download": "Accept & Download",
+ "Already installed. Remove it before installing a replacement.": "Already installed. Remove it before installing a replacement.",
+ "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.",
+ "Cache": "Cache",
+ "Checking and installing the model…": "Checking and installing the model…",
+ "Checking…": "Checking…",
+ "Clear cache": "Clear cache",
+ "Denoise Models": "Denoise Models",
+ "Denoise Settings": "Denoise Settings",
+ "Denoise all photos with an Amount": "Denoise all photos with an Amount",
+ "Downloaded and checked. Installing…": "Downloaded and checked. Installing…",
+ "Failed its last test": "Failed its last test",
+ "Graphics card": "Graphics card",
+ "I have read these terms and accept them for my own use": "I have read these terms and accept them for my own use",
+ "Inspect Denoise Model": "Inspect Denoise Model",
+ "Install Denoise Model": "Install Denoise Model",
+ "Install from file…": "Install from file…",
+ "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.": "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.",
+ "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).": "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).",
+ "LightCraft does not know this model, so it assumed:": "LightCraft does not know this model, so it assumed:",
+ "Limit": "Limit",
+ "Make it now": "Make it now",
+ "Make the denoised picture of the photos I am looking at": "Make the denoised picture of the photos I am looking at",
+ "Next up for AI Denoise…": "Next up for AI Denoise…",
+ "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.": "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.",
+ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.",
+ "Open page": "Open page",
+ "Open the model's page": "Open the model's page",
+ "Opens the model's own page in your browser, to read about it or get the file yourself.": "Opens the model's own page in your browser, to read about it or get the file yourself.",
+ "Processor": "Processor",
+ "Set up AI Denoise…": "Set up AI Denoise…",
+ "Speed": "Speed",
+ "Starting…": "Starting…",
+ "Tested and works on this computer": "Tested and works on this computer",
+ "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works": "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works",
+ "The graphics card is set up when the next photo is made.": "The graphics card is set up when the next photo is made.",
+ "The model is kept on this computer only. LightCraft never uploads or shares it.": "The model is kept on this computer only. LightCraft never uploads or shares it.",
+ "The processor does the work.": "The processor does the work.",
+ "There is no model file to install": "There is no model file to install",
+ "This build cannot run denoise models.": "This build cannot run denoise models.",
+ "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)": "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)",
+ "This file cannot be used yet": "This file cannot be used yet",
+ "Tick the box to accept the model's terms first": "Tick the box to accept the model's terms first",
+ "Try again": "Try again",
+ "Try the graphics card again": "Try the graphics card again",
+ "Turn off": "Turn off",
+ "Unknown licence": "Unknown licence",
+ "Use": "Use",
+ "Waiting to start…": "Waiting to start…",
+ "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.": "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.",
+ "cached picture": "cached picture",
+ "cached pictures": "cached pictures",
+ "commercial use allowed": "commercial use allowed",
+ "denoiseModel.accept": "denoiseModel.accept",
+ "in use": "in use",
+ "installed": "installed",
+ "makes AI Denoise available": "makes AI Denoise available",
+ "non-commercial use only": "non-commercial use only",
+ "photo has its denoised picture.": "photo has its denoised picture.",
+ "photo waiting": "photo waiting",
+ "photos have their denoised picture.": "photos have their denoised picture.",
+ "photos waiting": "photos waiting",
+ "starts using it for AI Denoise": "starts using it for AI Denoise",
+ "terms unclear": "terms unclear",
+ "the graphics card": "the graphics card",
+ "the graphics card is not used": "the graphics card is not used",
+ "Cancel Denoise": "Cancel Denoise",
+ "Cancel Denoise Model Download": "Cancel Denoise Model Download",
+ "Choose Denoise Model": "Choose Denoise Model",
+ "Clear Denoise Cache": "Clear Denoise Cache",
+ "Denoise Model Downloads": "Denoise Model Downloads",
+ "Denoise Photos": "Denoise Photos",
+ "Denoise Pump": "Denoise Pump",
+ "Denoise Status": "Denoise Status",
+ "Download Denoise Model": "Download Denoise Model",
+ "Remove Denoise Model": "Remove Denoise Model",
+ "Test Denoise Model": "Test Denoise Model",
+ "AI Denoise is enabled on the requesting photo": "AI Denoise is enabled on the requesting photo",
+ "After installation, AI Denoise will turn on for the requesting photo.": "After installation, AI Denoise will turn on for the requesting photo.",
+ "Cancel pending action": "Cancel pending action",
+ "Install a denoise model to enable AI Denoise on this photo": "Install a denoise model to enable AI Denoise on this photo",
+ "Pending photo action cancelled": "Pending photo action cancelled",
+ "Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed",
+ "ONNX model": "ONNX model",
+ "commercial use subject to GPL conditions": "commercial use subject to GPL conditions"
}
diff --cc crates/ui-egui/locales/ru.json
index 32ea6149a,f1d33491c..382bfc05a
--- a/crates/ui-egui/locales/ru.json
+++ b/crates/ui-egui/locales/ru.json
@@@ -1313,94 -1313,5 +1313,95 @@@
"saved in": "сохранено в",
"this photo": "это фото",
"− harder border · + softer border": "− жёстче край · + мягче край",
- "Back to this person": "Back to this person"
++ "Back to this person": "Back to this person",
+ "AI Denoise": "AI Denoise",
+ "AI Denoise Model": "AI Denoise Model",
+ "AI Denoise is off: press Use on a model.": "AI Denoise is off: press Use on a model.",
+ "AI Denoise needs a model. Install one in Settings.": "AI Denoise needs a model. Install one in Settings.",
+ "Accept & Download": "Accept & Download",
+ "Already installed. Remove it before installing a replacement.": "Already installed. Remove it before installing a replacement.",
+ "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.",
+ "Cache": "Cache",
+ "Checking and installing the model…": "Checking and installing the model…",
+ "Checking…": "Checking…",
+ "Clear cache": "Clear cache",
+ "Denoise Models": "Denoise Models",
+ "Denoise Settings": "Denoise Settings",
+ "Denoise all photos with an Amount": "Denoise all photos with an Amount",
+ "Downloaded and checked. Installing…": "Downloaded and checked. Installing…",
+ "Failed its last test": "Failed its last test",
+ "Graphics card": "Graphics card",
+ "I have read these terms and accept them for my own use": "I have read these terms and accept them for my own use",
+ "Inspect Denoise Model": "Inspect Denoise Model",
+ "Install Denoise Model": "Install Denoise Model",
+ "Install from file…": "Install from file…",
+ "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.": "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.",
+ "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).": "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).",
+ "LightCraft does not know this model, so it assumed:": "LightCraft does not know this model, so it assumed:",
+ "Limit": "Limit",
+ "Make it now": "Make it now",
+ "Make the denoised picture of the photos I am looking at": "Make the denoised picture of the photos I am looking at",
+ "Models": "Models",
+ "Next up for AI Denoise…": "Next up for AI Denoise…",
+ "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.": "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.",
+ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.",
+ "Open page": "Open page",
+ "Open the model's page": "Open the model's page",
+ "Opens the model's own page in your browser, to read about it or get the file yourself.": "Opens the model's own page in your browser, to read about it or get the file yourself.",
+ "Processor": "Processor",
+ "Set up AI Denoise…": "Set up AI Denoise…",
+ "Speed": "Speed",
+ "Starting…": "Starting…",
+ "Tested and works on this computer": "Tested and works on this computer",
+ "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works": "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works",
+ "The graphics card is set up when the next photo is made.": "The graphics card is set up when the next photo is made.",
+ "The model is kept on this computer only. LightCraft never uploads or shares it.": "The model is kept on this computer only. LightCraft never uploads or shares it.",
+ "The processor does the work.": "The processor does the work.",
+ "There is no model file to install": "There is no model file to install",
+ "This build cannot run denoise models.": "This build cannot run denoise models.",
+ "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)": "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)",
+ "This file cannot be used yet": "This file cannot be used yet",
+ "Tick the box to accept the model's terms first": "Tick the box to accept the model's terms first",
+ "Try again": "Try again",
+ "Try the graphics card again": "Try the graphics card again",
+ "Turn off": "Turn off",
+ "Unknown licence": "Unknown licence",
+ "Use": "Use",
+ "Waiting to start…": "Waiting to start…",
+ "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.": "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.",
+ "cached picture": "cached picture",
+ "cached pictures": "cached pictures",
+ "commercial use allowed": "commercial use allowed",
+ "denoiseModel.accept": "denoiseModel.accept",
+ "in use": "in use",
+ "installed": "installed",
+ "makes AI Denoise available": "makes AI Denoise available",
+ "non-commercial use only": "non-commercial use only",
+ "photo has its denoised picture.": "photo has its denoised picture.",
+ "photo waiting": "photo waiting",
+ "photos have their denoised picture.": "photos have their denoised picture.",
+ "photos waiting": "photos waiting",
+ "starts using it for AI Denoise": "starts using it for AI Denoise",
+ "terms unclear": "terms unclear",
+ "the graphics card": "the graphics card",
+ "the graphics card is not used": "the graphics card is not used",
+ "Cancel Denoise": "Cancel Denoise",
+ "Cancel Denoise Model Download": "Cancel Denoise Model Download",
+ "Choose Denoise Model": "Choose Denoise Model",
+ "Clear Denoise Cache": "Clear Denoise Cache",
+ "Denoise Model Downloads": "Denoise Model Downloads",
+ "Denoise Photos": "Denoise Photos",
+ "Denoise Pump": "Denoise Pump",
+ "Denoise Status": "Denoise Status",
+ "Download Denoise Model": "Download Denoise Model",
+ "Remove Denoise Model": "Remove Denoise Model",
+ "Test Denoise Model": "Test Denoise Model",
+ "AI Denoise is enabled on the requesting photo": "AI Denoise is enabled on the requesting photo",
+ "After installation, AI Denoise will turn on for the requesting photo.": "After installation, AI Denoise will turn on for the requesting photo.",
+ "Cancel pending action": "Cancel pending action",
+ "Install a denoise model to enable AI Denoise on this photo": "Install a denoise model to enable AI Denoise on this photo",
+ "Pending photo action cancelled": "Pending photo action cancelled",
+ "Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed",
+ "ONNX model": "ONNX model",
+ "commercial use subject to GPL conditions": "commercial use subject to GPL conditions"
}
diff --cc crates/ui-egui/locales/zh-hans.json
index 466f57b4b,3d88dcc25..4074dfbda
--- a/crates/ui-egui/locales/zh-hans.json
+++ b/crates/ui-egui/locales/zh-hans.json
@@@ -1643,93 -1643,5 +1643,94 @@@
"Install the SAM 3 Model": "安装 SAM 3 模型",
"This build can't download the model yet. To install it by hand, put model.safetensors, vocab.json and merges.txt from Meta's facebook/sam3 in the folder above: Object and Describe work as soon as they are there.": "此版本尚无法下载模型。如需手动安装,请将 Meta 的 facebook/sam3 中的 model.safetensors、vocab.json 和 merges.txt 放入上方的文件夹:放入后即可使用“对象”和“描述”。",
"Open Log Folder": "打开日志文件夹",
- "Back to this person": "Back to this person"
++ "Back to this person": "Back to this person",
+ "AI Denoise": "AI Denoise",
+ "AI Denoise Model": "AI Denoise Model",
+ "AI Denoise is off: press Use on a model.": "AI Denoise is off: press Use on a model.",
+ "AI Denoise needs a model. Install one in Settings.": "AI Denoise needs a model. Install one in Settings.",
+ "Accept & Download": "Accept & Download",
+ "Already installed. Remove it before installing a replacement.": "Already installed. Remove it before installing a replacement.",
+ "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.",
+ "Cache": "Cache",
+ "Checking and installing the model…": "Checking and installing the model…",
+ "Checking…": "Checking…",
+ "Clear cache": "Clear cache",
+ "Denoise Models": "Denoise Models",
+ "Denoise Settings": "Denoise Settings",
+ "Denoise all photos with an Amount": "Denoise all photos with an Amount",
+ "Downloaded and checked. Installing…": "Downloaded and checked. Installing…",
+ "Failed its last test": "Failed its last test",
+ "Graphics card": "Graphics card",
+ "I have read these terms and accept them for my own use": "I have read these terms and accept them for my own use",
+ "Inspect Denoise Model": "Inspect Denoise Model",
+ "Install Denoise Model": "Install Denoise Model",
+ "Install from file…": "Install from file…",
+ "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.": "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.",
+ "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).": "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).",
+ "LightCraft does not know this model, so it assumed:": "LightCraft does not know this model, so it assumed:",
+ "Limit": "Limit",
+ "Make it now": "Make it now",
+ "Make the denoised picture of the photos I am looking at": "Make the denoised picture of the photos I am looking at",
+ "Next up for AI Denoise…": "Next up for AI Denoise…",
+ "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.": "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.",
+ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.",
+ "Open page": "Open page",
+ "Open the model's page": "Open the model's page",
+ "Opens the model's own page in your browser, to read about it or get the file yourself.": "Opens the model's own page in your browser, to read about it or get the file yourself.",
+ "Processor": "Processor",
+ "Set up AI Denoise…": "Set up AI Denoise…",
+ "Speed": "Speed",
+ "Starting…": "Starting…",
+ "Tested and works on this computer": "Tested and works on this computer",
+ "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works": "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works",
+ "The graphics card is set up when the next photo is made.": "The graphics card is set up when the next photo is made.",
+ "The model is kept on this computer only. LightCraft never uploads or shares it.": "The model is kept on this computer only. LightCraft never uploads or shares it.",
+ "The processor does the work.": "The processor does the work.",
+ "There is no model file to install": "There is no model file to install",
+ "This build cannot run denoise models.": "This build cannot run denoise models.",
+ "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)": "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)",
+ "This file cannot be used yet": "This file cannot be used yet",
+ "Tick the box to accept the model's terms first": "Tick the box to accept the model's terms first",
+ "Try again": "Try again",
+ "Try the graphics card again": "Try the graphics card again",
+ "Turn off": "Turn off",
+ "Unknown licence": "Unknown licence",
+ "Use": "Use",
+ "Waiting to start…": "Waiting to start…",
+ "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.": "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.",
+ "cached picture": "cached picture",
+ "cached pictures": "cached pictures",
+ "commercial use allowed": "commercial use allowed",
+ "denoiseModel.accept": "denoiseModel.accept",
+ "in use": "in use",
+ "installed": "installed",
+ "makes AI Denoise available": "makes AI Denoise available",
+ "non-commercial use only": "non-commercial use only",
+ "photo has its denoised picture.": "photo has its denoised picture.",
+ "photo waiting": "photo waiting",
+ "photos have their denoised picture.": "photos have their denoised picture.",
+ "photos waiting": "photos waiting",
+ "starts using it for AI Denoise": "starts using it for AI Denoise",
+ "terms unclear": "terms unclear",
+ "the graphics card": "the graphics card",
+ "the graphics card is not used": "the graphics card is not used",
+ "Cancel Denoise": "Cancel Denoise",
+ "Cancel Denoise Model Download": "Cancel Denoise Model Download",
+ "Choose Denoise Model": "Choose Denoise Model",
+ "Clear Denoise Cache": "Clear Denoise Cache",
+ "Denoise Model Downloads": "Denoise Model Downloads",
+ "Denoise Photos": "Denoise Photos",
+ "Denoise Pump": "Denoise Pump",
+ "Denoise Status": "Denoise Status",
+ "Download Denoise Model": "Download Denoise Model",
+ "Remove Denoise Model": "Remove Denoise Model",
+ "Test Denoise Model": "Test Denoise Model",
+ "AI Denoise is enabled on the requesting photo": "AI Denoise is enabled on the requesting photo",
+ "After installation, AI Denoise will turn on for the requesting photo.": "After installation, AI Denoise will turn on for the requesting photo.",
+ "Cancel pending action": "Cancel pending action",
+ "Install a denoise model to enable AI Denoise on this photo": "Install a denoise model to enable AI Denoise on this photo",
+ "Pending photo action cancelled": "Pending photo action cancelled",
+ "Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed",
+ "ONNX model": "ONNX model",
+ "commercial use subject to GPL conditions": "commercial use subject to GPL conditions"
}
diff --cc crates/ui-egui/locales/zh-hant.json
index c0ab6d4a6,085ccadc5..96fcbb18b
--- a/crates/ui-egui/locales/zh-hant.json
+++ b/crates/ui-egui/locales/zh-hant.json
@@@ -1643,93 -1643,5 +1643,94 @@@
"Install the SAM 3 Model": "安裝 SAM 3 模型",
"This build can't download the model yet. To install it by hand, put model.safetensors, vocab.json and merges.txt from Meta's facebook/sam3 in the folder above: Object and Describe work as soon as they are there.": "此版本尚無法下載模型。如需手動安裝,請將 Meta 的 facebook/sam3 中的 model.safetensors、vocab.json 和 merges.txt 放入上方的資料夾:放入後即可使用「物件」與「描述」。",
"Open Log Folder": "開啟記錄資料夾",
- "Back to this person": "Back to this person"
++ "Back to this person": "Back to this person",
+ "AI Denoise": "AI Denoise",
+ "AI Denoise Model": "AI Denoise Model",
+ "AI Denoise is off: press Use on a model.": "AI Denoise is off: press Use on a model.",
+ "AI Denoise needs a model. Install one in Settings.": "AI Denoise needs a model. Install one in Settings.",
+ "Accept & Download": "Accept & Download",
+ "Already installed. Remove it before installing a replacement.": "Already installed. Remove it before installing a replacement.",
+ "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.",
+ "Cache": "Cache",
+ "Checking and installing the model…": "Checking and installing the model…",
+ "Checking…": "Checking…",
+ "Clear cache": "Clear cache",
+ "Denoise Models": "Denoise Models",
+ "Denoise Settings": "Denoise Settings",
+ "Denoise all photos with an Amount": "Denoise all photos with an Amount",
+ "Downloaded and checked. Installing…": "Downloaded and checked. Installing…",
+ "Failed its last test": "Failed its last test",
+ "Graphics card": "Graphics card",
+ "I have read these terms and accept them for my own use": "I have read these terms and accept them for my own use",
+ "Inspect Denoise Model": "Inspect Denoise Model",
+ "Install Denoise Model": "Install Denoise Model",
+ "Install from file…": "Install from file…",
+ "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.": "Install your own ONNX model with denoise-model.json beside it. This build offers no model downloads.",
+ "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).": "Its denoised picture is not made yet, and pictures are not made on their own (Settings, AI Denoise).",
+ "LightCraft does not know this model, so it assumed:": "LightCraft does not know this model, so it assumed:",
+ "Limit": "Limit",
+ "Make it now": "Make it now",
+ "Make the denoised picture of the photos I am looking at": "Make the denoised picture of the photos I am looking at",
+ "Next up for AI Denoise…": "Next up for AI Denoise…",
+ "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.": "Nothing is fetched until you accept. The model is kept on this computer only; LightCraft never uploads or shares it.",
+ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.",
+ "Open page": "Open page",
+ "Open the model's page": "Open the model's page",
+ "Opens the model's own page in your browser, to read about it or get the file yourself.": "Opens the model's own page in your browser, to read about it or get the file yourself.",
+ "Processor": "Processor",
+ "Set up AI Denoise…": "Set up AI Denoise…",
+ "Speed": "Speed",
+ "Starting…": "Starting…",
+ "Tested and works on this computer": "Tested and works on this computer",
+ "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works": "The denoise model is installed and in use: the AI Denoise Amount slider under Detail now works",
+ "The graphics card is set up when the next photo is made.": "The graphics card is set up when the next photo is made.",
+ "The model is kept on this computer only. LightCraft never uploads or shares it.": "The model is kept on this computer only. LightCraft never uploads or shares it.",
+ "The processor does the work.": "The processor does the work.",
+ "There is no model file to install": "There is no model file to install",
+ "This build cannot run denoise models.": "This build cannot run denoise models.",
+ "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)": "This build has nowhere to keep denoise models, so AI Denoise is not available. (The desktop app has.)",
+ "This file cannot be used yet": "This file cannot be used yet",
+ "Tick the box to accept the model's terms first": "Tick the box to accept the model's terms first",
+ "Try again": "Try again",
+ "Try the graphics card again": "Try the graphics card again",
+ "Turn off": "Turn off",
+ "Unknown licence": "Unknown licence",
+ "Use": "Use",
+ "Waiting to start…": "Waiting to start…",
+ "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.": "Works on raw files from cameras with a standard (Bayer) sensor. Other files keep their normal noise reduction.",
+ "cached picture": "cached picture",
+ "cached pictures": "cached pictures",
+ "commercial use allowed": "commercial use allowed",
+ "denoiseModel.accept": "denoiseModel.accept",
+ "in use": "in use",
+ "installed": "installed",
+ "makes AI Denoise available": "makes AI Denoise available",
+ "non-commercial use only": "non-commercial use only",
+ "photo has its denoised picture.": "photo has its denoised picture.",
+ "photo waiting": "photo waiting",
+ "photos have their denoised picture.": "photos have their denoised picture.",
+ "photos waiting": "photos waiting",
+ "starts using it for AI Denoise": "starts using it for AI Denoise",
+ "terms unclear": "terms unclear",
+ "the graphics card": "the graphics card",
+ "the graphics card is not used": "the graphics card is not used",
+ "Cancel Denoise": "Cancel Denoise",
+ "Cancel Denoise Model Download": "Cancel Denoise Model Download",
+ "Choose Denoise Model": "Choose Denoise Model",
+ "Clear Denoise Cache": "Clear Denoise Cache",
+ "Denoise Model Downloads": "Denoise Model Downloads",
+ "Denoise Photos": "Denoise Photos",
+ "Denoise Pump": "Denoise Pump",
+ "Denoise Status": "Denoise Status",
+ "Download Denoise Model": "Download Denoise Model",
+ "Remove Denoise Model": "Remove Denoise Model",
+ "Test Denoise Model": "Test Denoise Model",
+ "AI Denoise is enabled on the requesting photo": "AI Denoise is enabled on the requesting photo",
+ "After installation, AI Denoise will turn on for the requesting photo.": "After installation, AI Denoise will turn on for the requesting photo.",
+ "Cancel pending action": "Cancel pending action",
+ "Install a denoise model to enable AI Denoise on this photo": "Install a denoise model to enable AI Denoise on this photo",
+ "Pending photo action cancelled": "Pending photo action cancelled",
+ "Pending photo action cancelled because its library or photo changed": "Pending photo action cancelled because its library or photo changed",
+ "ONNX model": "ONNX model",
+ "commercial use subject to GPL conditions": "commercial use subject to GPL conditions"
}
diff --cc crates/ui-egui/src/headless.rs
index 26f9bd475,77aa77b30..d1fae1e1b
--- a/crates/ui-egui/src/headless.rs
+++ b/crates/ui-egui/src/headless.rs
@@@ -292,64 -365,153 +366,209 @@@ impl Headless
#[cfg(test)]
mod tests {
+ #[test]
+ fn detail_offers_ai_denoise_for_raw_photos_and_leads_to_its_settings() {
+ use crate::state::Dialog;
+ use lightcraft_catalog::{MediaKind, Op, Photo, PhotoId, Source};
+ let mut h = demo([1400.0, 900.0]);
+ let t = Duration::from_secs(10);
+ let dir = std::env::temp_dir().join(format!("lc-ui-denoise-{}", std::process::id()));
+ let _ = std::fs::remove_dir_all(&dir);
+ std::fs::create_dir_all(&dir).unwrap();
+ h.app.session.set_denoise_models_dir(Some(dir.join("denoise-models")));
+ // a raw photo (its file need not exist: nothing here reads it)
+ let id = PhotoId(h.app.session.catalog.photos().map(|p| p.id.0).max().unwrap_or(0) + 1);
+ let mut raw = Photo::new(
+ id,
+ Source::File { path: dir.join("IMG_1.dng").to_string_lossy().into_owned() },
+ "IMG_1.dng",
+ "DNG",
+ 6000,
+ 4000,
+ "2026-10-01T00:00:00",
+ );
+ raw.kind = MediaKind::Raw;
+ h.app.session.commit("setup", Op::AddPhoto { photo: Box::new(raw) }).unwrap();
+ let widgets = |h: &mut Headless| h.request("ui.widgets", json!({}), t).to_string();
+ h.request("engine.execute", json!({"command": "library.select", "params": {"ids": [id.0]}}), t);
+ h.request("ui.set", json!({"view": "detail"}), t);
+ h.app.ui.open_sections = vec!["detail".to_string()];
+ h.settle(SETTLE);
+ h.step();
+ h.step();
+ let w = widgets(&mut h);
+ assert!(w.contains("\"denoise:setup\""), "a raw photo with no model is offered the setup: {w}");
+ // One click lands in Settings, with local installation available even without a download offer.
+ let r = h.request("ui.clickWidget", json!({"id": "denoise:setup"}), t);
+ assert_eq!(r["ok"], true, "{r}");
+ h.step();
+ h.step();
+ assert_eq!(h.app.ui.dialog, Some(Dialog::Settings { tab: "denoise".into() }));
+ h.settle(SETTLE);
+ let listed = h.app.session.execute("denoise.models.list", &json!({})).unwrap();
+ assert_eq!(listed["models"].as_array().unwrap().len(), lightcraft_denoise::known::all().len(), "{listed}");
+ assert!(widgets(&mut h).contains("\"denoise:installFile\""));
+ h.app.ui.dialog = None;
+ // a photo that is not raw: no offer
+ h.request(
+ "engine.execute",
+ json!({"command": "library.select", "params": {"ids": [h.app.session.catalog.photos().find(|p| p.id != id).unwrap().id.0]}}),
+ t,
+ );
+ h.settle(SETTLE);
+ h.step();
+ h.step();
+ assert!(!widgets(&mut h).contains("\"denoise:setup\""), "nothing is offered for a photo denoise does not apply to");
+ let _ = std::fs::remove_dir_all(&dir);
+ }
+
use super::*;
+ #[test]
+ fn screenshot_dimensions_are_checked_before_layout() {
+ assert_eq!(viewport_pixels([1600.0, 1000.0], 2.0).unwrap(), [3200, 2000]);
+ assert_eq!(viewport_pixels([345.0, 200.0], 0.9).unwrap(), [311, 180]);
+ assert_eq!(viewport_pixels([8000.0, 8000.0], 1.0).unwrap(), [8000, 8000]);
+ for (size, scale) in [
+ ([f32::NAN, 10.0], 1.0),
+ ([10.0, f32::INFINITY], 1.0),
+ ([10.0, 10.0], f32::INFINITY),
+ ([10.0, 10.0], f32::NAN),
+ ([10.0, 10.0], 0.0),
+ ([0.0, 10.0], 1.0),
+ ([10.0, 10.0], 0.01),
+ ([9000.0, 9000.0], 1.0),
+ ([9000.0, 100.0], 2.0),
+ ] {
+ assert!(viewport_pixels(size, scale).is_err(), "{size:?} at {scale}");
+ }
+ let raw = HeadlessView::raw_input(egui::vec2(f32::INFINITY, 10.0), 1.0, 0.0, vec![]);
+ assert_eq!(raw.screen_rect.unwrap().size(), egui::vec2(1600.0, 1000.0));
+ }
+
+ #[test]
+ fn ui_zoom_preserves_host_pixels_and_scales_layout() {
+ for (size, scale, expected) in
+ [(egui::vec2(400.0, 240.0), 1.0, [400, 240]), (egui::vec2(345.0, 200.0), 0.9, [311, 180]), (egui::vec2(400.0, 240.0), 2.0, [800, 480])]
+ {
+ let mut view = HeadlessView::new();
+ for frame in 0..9 {
+ let key = match frame {
+ 1 => Some(egui::Key::Plus),
+ 5 => Some(egui::Key::Minus),
+ _ => None,
+ };
+ let mut raw = HeadlessView::raw_input(size, scale, frame as f64 / 60.0, vec![]);
+ if let Some(key) = key {
+ let modifiers = egui::Modifiers { command: true, ..Default::default() };
+ raw.events.push(egui::Event::ModifiersChanged(modifiers));
+ raw.events.extend(vec![
+ egui::Event::Key { key, physical_key: None, pressed: true, repeat: false, modifiers },
+ egui::Event::Key { key, physical_key: None, pressed: false, repeat: false, modifiers },
+ ]);
+ }
+ view.run(raw, |ui| {
+ ui.label("UI zoom changes layout, keeping the host viewport size");
+ });
+ assert_eq!(view.size_px(), expected, "frame {frame} at scale {scale}");
+ assert_eq!(view.paint(&HashMap::new()).size, expected);
+ if frame == 4 {
+ assert!(view.ctx.zoom_factor() > 1.0);
+ assert!(view.ctx.content_rect().width() < size.x);
+ }
+ if frame == 8 {
+ assert!(view.ctx.zoom_factor() < 1.01);
+ }
+ }
+ }
+ }
+
+ #[test]
+ fn shadow_screenshot_keeps_the_zoomed_hosts_size_and_scale() {
+ let mut app = LightcraftApp::new(lightcraft_engine::Session::new(), crate::Services::default());
+ app.ui.settings.gpu = false;
+ let mut h = Headless::new(app, [480.0, 320.0], 2.0);
+ let t = Duration::from_secs(5);
+ assert_eq!(h.request("ui.key", json!({"key": "Plus", "cmd": true}), t)["ok"], true);
+ assert!(h.view.ctx.zoom_factor() > 1.0);
+ let main = h.view.ctx.clone();
+ let screenshot = h.app.headless_screenshot(&main, true).unwrap();
+ assert_eq!(screenshot.size, [960, 640]);
+ let shadow = h.app.shadow.as_ref().unwrap();
+ assert!((shadow.ctx.pixels_per_point() - main.pixels_per_point()).abs() < 0.001);
+ assert!((shadow.ctx.content_rect().width() - main.content_rect().width()).abs() < 0.1);
+ }
+
+ #[test]
+ fn control_resize_uses_effective_points_after_ui_zoom() {
+ for scale in [0.9, 1.0, 2.0] {
+ let mut app = LightcraftApp::new(lightcraft_engine::Session::new(), crate::Services::default());
+ app.ui.settings.gpu = false;
+ let mut h = Headless::new(app, [480.0, 320.0], scale);
+ let t = Duration::from_secs(5);
+ assert_eq!(h.request("ui.key", json!({"key": "Plus", "cmd": true}), t)["ok"], true);
+ let native_size = resized_viewport([320.0, 240.0], scale, h.view.ctx.zoom_factor()).unwrap();
+ let expected = native_viewport_pixels([native_size.x, native_size.y], scale).unwrap();
+ assert_eq!(h.request("ui.resize", json!({"width": 320, "height": 240}), t)["ok"], true);
+ assert_eq!(h.view.size_px(), expected);
+ assert!((h.view.ctx.content_rect().width() - 320.0).abs() < 0.1);
+ let main = h.view.ctx.clone();
+ assert_eq!(h.app.headless_screenshot(&main, true).unwrap().size, expected);
+ }
+ }
+
+ #[test]
+ fn control_resize_keeps_a_minimum_width_after_zooming_out() {
+ let mut app = LightcraftApp::new(lightcraft_engine::Session::new(), crate::Services::default());
+ app.ui.settings.gpu = false;
+ let mut h = Headless::new(app, [480.0, 320.0], 1.0);
+ h.view.ctx.set_zoom_factor(0.5);
+ let t = Duration::from_secs(5);
+ assert_eq!(h.request("ui.resize", json!({"width": 1, "height": 120}), t)["ok"], true);
+ assert_eq!(h.size, egui::vec2(0.5, 60.0));
+ assert_eq!(h.view.size_px(), [1, 60]);
+ assert!((h.view.ctx.content_rect().width() - 1.0).abs() < 0.01);
+ let main = h.view.ctx.clone();
+ assert_eq!(h.app.headless_screenshot(&main, true).unwrap().size, [1, 60]);
+ }
+
+ #[test]
+ fn control_resize_rounds_in_native_points_after_a_fractional_zoom_out() {
+ let mut app = LightcraftApp::new(lightcraft_engine::Session::new(), crate::Services::default());
+ app.ui.settings.gpu = false;
+ let mut h = Headless::new(app, [480.0, 320.0], 0.9);
+ let t = Duration::from_secs(5);
+ assert_eq!(h.request("ui.key", json!({"key": "Minus", "cmd": true}), t)["ok"], true);
+ assert!((h.view.ctx.zoom_factor() - 0.9).abs() < 0.001);
+ assert_eq!(h.request("ui.resize", json!({"width": 150, "height": 150}), t)["ok"], true);
+ assert_eq!(h.size, egui::vec2(135.0, 135.0));
+ assert_eq!(h.view.size_px(), [122, 122]);
+ assert!((h.view.ctx.content_rect().width() - 150.0).abs() < 0.01);
+ let main = h.view.ctx.clone();
+ assert_eq!(h.app.headless_screenshot(&main, true).unwrap().size, [122, 122]);
+ }
+
+ #[test]
+ fn invalid_control_resize_preserves_the_headless_viewport() {
+ let app = LightcraftApp::new(lightcraft_engine::Session::new(), crate::Services::default());
+ let mut h = Headless::new(app, [480.0, 320.0], 2.0);
+ h.app.ui.settings.gpu = false;
+ h.step();
+ let size = h.size;
+ let rejected = h.request("ui.resize", json!({"width": 9000, "height": 8000}), Duration::from_secs(5));
+ assert_eq!(rejected["ok"], false, "{rejected}");
+ assert_eq!(h.size, size);
+ for bad in [json!({"width": "320", "height": 240}), json!({"width": 320, "height": null}), json!({"width": true})] {
+ let rejected = h.request("ui.resize", bad, Duration::from_secs(5));
+ assert_eq!(rejected["ok"], false, "{rejected}");
+ assert_eq!(h.size, size);
+ }
+ let accepted = h.request("ui.resize", json!({"width": 320, "height": 240}), Duration::from_secs(5));
+ assert_eq!(accepted["ok"], true, "{accepted}");
+ assert_eq!(h.size, egui::vec2(320.0, 240.0));
+ assert_eq!(h.view.size_px(), [640, 480]);
+ }
+
/// Generous: renders are slow when the machine is loaded (parallel builds), and a timed-out
/// settle would show a half-rendered UI.
const SETTLE: Duration = Duration::from_secs(120);
diff --cc crates/ui-egui/src/lib.rs
index d0ccf2e9a,ea82b0d7f..206846ffe
--- a/crates/ui-egui/src/lib.rs
+++ b/crates/ui-egui/src/lib.rs
@@@ -107,8 -106,8 +107,10 @@@ pub struct Services
pub picker: Option<pick::Picker>,
/// Show an open dialog for photos; returns paths.
pub pick_files: Option<PickFiles>,
+ /// Local ONNX model; a manifest must accompany it.
+ pub pick_denoise_model: Option<PickFiles>,
+ /// Open dialog for a face model (`.onnx`; Settings ▸ Faces ▸ Add a model file…).
+ pub pick_model_file: Option<PickFiles>,
/// Open dialog for preset files (`.lcpreset`, `.xmp`, `.lrtemplate`, `.zip`, `.dng`, Luminar `.lmp` / `.mplumpack`).
pub pick_preset_files: Option<PickFiles>,
/// Open dialog for a GPS track log (`.gpx`; Photo ▸ Auto-Tag from Tracklog…).
@@@ -759,8 -765,7 +773,9 @@@ impl LightcraftApp
ctx.request_repaint_after(std::time::Duration::from_secs(3));
}
self.session.persist_if_dirty();
+ panels::denoise::pump(self, ctx);
+ model_setup::pump(self, ctx);
+ panels::faces::pump(self, ctx);
self.collect_screenshots(ctx);
self.issue_screenshots(ctx);
if self.fonts_ready {
@@@ -998,11 -1051,31 +1061,33 @@@ pub struct Caches
album_counts: Option<(u64, std::sync::Arc<std::collections::HashMap<lightcraft_catalog::AlbumId, usize>>)>,
/// How often the album counts were recomputed (tests check that unchanged frames don't).
pub album_count_scans: usize,
+ /// AI denoise: what the pump last saw, the model list and the downloads being watched.
+ pub denoise: panels::denoise::Ui,
+ /// Bumped when a face model is installed, removed or chosen, so Settings re-reads the list at once.
+ pub faces_epoch: u64,
+ /// Face model downloads the user started, followed until installed (see `panels::faces::pump`).
+ pub faces_dl_watch: Vec<String>,
+ /// Whether the background face indexer is running, how many faces it has embedded, how many photos are left, and
+ /// when to ask it again.
+ pub faces_active: bool,
+ pub faces_indexed: u64,
+ pub faces_pending: u64,
+ pub faces_next_pump: f64,
/// When the user last dragged, typed or scrolled, and when they last moved the pointer (egui time).
pub last_input: f64,
+ /// The pace the face scan was last given, and whether the window was in front then (for `ui.inspect`).
+ pub faces_pace: &'static str,
+ pub faces_in_front: bool,
pub last_move: f64,
+ /// Name suggestions for the photo in the loupe: (photo, catalog revision, faces indexed, suggestions by region).
+ pub face_hints: Option<(u64, u64, u64, std::sync::Arc<panels::faces::Hints>)>,
+ /// The open person page: (name, catalog revision, faces indexed, when it was asked for, the page).
+ pub person_page: Option<(String, u64, u64, f64, std::sync::Arc<panels::person::PersonPage>)>,
+ /// The unnamed faces: (catalog revision, faces indexed, when it was asked for, the list).
+ pub unnamed: Option<(u64, u64, f64, std::sync::Arc<panels::unnamed::Unnamed>)>,
+ /// The most photos the face scan has had left at once since it last finished (the progress bar's whole).
+ pub faces_peak: u64,
+ person_names: Option<(u64, std::sync::Arc<Vec<String>>)>,
/// The grid's date runs, layout and indexes (by the visible list's generation).
pub grid: panels::grid::GridCache,
/// What the grid did on its frames (benchmarks and tests check unchanged frames stay cheap).
diff --cc crates/ui-egui/src/panels/dialogs.rs
index da400bc2b,5c05d0ae8..c6069814e
--- a/crates/ui-egui/src/panels/dialogs.rs
+++ b/crates/ui-egui/src/panels/dialogs.rs
@@@ -85,7 -86,8 +86,9 @@@ pub fn show(app: &mut LightcraftApp, ct
Dialog::NewSmartAlbum { .. } => "Create Smart Album",
Dialog::AllMetadata { .. } => "All Metadata",
Dialog::SystemInfo { .. } => "System Info",
+ Dialog::DenoiseModel { .. } => "AI Denoise Model",
+ Dialog::FaceModel { info, .. } if info["download"].is_string() => "Download Face Model",
+ Dialog::FaceModel { .. } => "Add Face Model",
Dialog::WhatsNew => "What's New",
Dialog::Cull { .. } => "Assisted Culling",
Dialog::SmartRules { id: None, .. } => "New Smart Album",
@@@ -175,7 -178,7 +179,8 @@@
}
});
}
+ Dialog::DenoiseModel { info, accepted } => crate::panels::denoise::model_dialog(app, ui, &t, info, accepted),
+ Dialog::FaceModel { info, accepted, .. } => crate::panels::faces::model_dialog(app, ui, &t, info, accepted),
Dialog::SystemInfo { rows } => {
egui::Grid::new("sysinfo").num_columns(2).spacing([16.0, 4.0]).striped(true).show(ui, |ui| {
for (k, v) in rows.iter() {
@@@ -786,7 -789,8 +791,8 @@@
}
ui.add_space(4.0);
ui.horizontal(|ui| {
- let unusable_model = matches!(&dlg, Dialog::DenoiseModel { info, .. } if info["kind"] == "unsupported");
+ // a model file LightCraft cannot use has nothing to confirm
- let unusable_model = matches!(&dlg, Dialog::FaceModel { info, .. } if info["kind"] == "unsupported");
++ let unusable_model = matches!(&dlg, Dialog::DenoiseModel { info, .. } | Dialog::FaceModel { info, .. } if info["kind"] == "unsupported");
let informational = unusable_model || matches!(dlg, Dialog::About | Dialog::Shortcuts | Dialog::Settings { .. });
let sam = &app.session.segmenter;
let (sam_installed, sam_running, sam_failed) = (sam.installed(), sam.download_status().running, sam.download_status().error.is_some());
@@@ -813,8 -817,8 +819,10 @@@
add_label.as_str()
}
Dialog::Merge { .. } => "Merge",
+ Dialog::DenoiseModel { info, .. } if info["download"].is_string() => "Accept & Download",
+ Dialog::DenoiseModel { .. } => "Install",
+ Dialog::FaceModel { info, .. } if !informational && info["download"].is_string() => "Download",
+ Dialog::FaceModel { .. } if !informational => "Install",
Dialog::ConfirmDelete { .. } => "Delete",
Dialog::RemoveFolder { .. } => "Remove",
Dialog::SamModel { then: Some(_), .. } if sam_installed => "Continue",
@@@ -824,7 -828,8 +832,8 @@@
_ if informational => "Close",
_ => "OK",
};
- let can_confirm = informational || !matches!(&dlg, Dialog::DenoiseModel { accepted: false, .. });
+ // installing waits for the licence to be accepted
- let can_confirm = informational || !matches!(&dlg, Dialog::FaceModel { accepted: false, .. });
++ let can_confirm = informational || !matches!(&dlg, Dialog::DenoiseModel { accepted: false, .. } | Dialog::FaceModel { accepted: false, .. });
let r = (!ok.is_empty()).then(|| ui.add_enabled(can_confirm, egui::Button::new(crate::i18n::tr(ok))));
if let Some(r) = &r {
crate::widgets::register(ui.ctx(), "button:dialogOk", r.rect);
@@@ -1031,7 -1040,7 +1044,8 @@@ pub fn confirm_dialog(app: &mut Lightcr
Dialog::RenameKeyword { from, to } => app.run("keyword.rename", json!({"from": from, "to": to})),
Dialog::MergeKeywords { from, into } => app.run("keyword.merge", json!({"from": from, "into": into})),
Dialog::AutoStack { gap } => app.run("stack.auto", json!({"gap": gap})),
+ Dialog::DenoiseModel { info, accepted } => crate::panels::denoise::install(app, info, *accepted),
+ Dialog::FaceModel { path, info, accepted } => crate::panels::faces::install(app, path, info, *accepted),
Dialog::AllMetadata { .. } | Dialog::SystemInfo { .. } | Dialog::WhatsNew => Ok(serde_json::Value::Null),
Dialog::Cull { reject_below, pick_best } => {
let mut p = json!({"pickBest": pick_best});
diff --cc crates/ui-egui/src/panels/settings.rs
index 112857767,822d21276..2774a9622
--- a/crates/ui-egui/src/panels/settings.rs
+++ b/crates/ui-egui/src/panels/settings.rs
@@@ -1,4 -1,4 +1,4 @@@
- //! The Settings dialog (⌘,): General, Import, Performance, Interface, AI Denoise.
-//! The Settings dialog (⌘,): General, Import, Performance, Interface, Faces.
++//! The Settings dialog (⌘,): General, Import, Performance, Interface, Faces, AI Denoise.
//!
//! Changes apply immediately (no OK/Cancel). Where they are stored:
//! - **app settings** ([`crate::state::AppSettings`]: startup view, delete confirmation, GPU,
@@@ -17,8 -17,8 +17,14 @@@ use crate::theme::Tokens
use crate::widgets::register;
/// (id, label) of the tabs, in order.
--pub const TABS: &[(&str, &str)] =
- &[("general", "General"), ("import", "Import"), ("performance", "Performance"), ("interface", "Interface"), ("denoise", "AI Denoise")];
- &[("general", "General"), ("import", "Import"), ("performance", "Performance"), ("interface", "Interface"), ("faces", "Faces")];
++pub const TABS: &[(&str, &str)] = &[
++ ("general", "General"),
++ ("import", "Import"),
++ ("performance", "Performance"),
++ ("interface", "Interface"),
++ ("faces", "Faces"),
++ ("denoise", "AI Denoise"),
++];
/// Thumbnail cache sizes offered (MB).
const CACHE_SIZES: [u32; 5] = [512, 1024, 2048, 4096, 8192];
@@@ -44,7 -44,7 +50,8 @@@ pub fn body(app: &mut LightcraftApp, ui
"import" => import_tab(app, ui, &t),
"performance" => performance_tab(app, ui, &t),
"interface" => interface_tab(app, ui, &t),
+ "faces" => super::faces::settings_tab(app, ui, &t),
+ "denoise" => super::denoise::settings_tab(app, ui, &t),
_ => general_tab(app, ui, &t),
}
}
diff --cc crates/ui-egui/src/state.rs
index 45949bb8c,66084cf12..55179241f
--- a/crates/ui-egui/src/state.rs
+++ b/crates/ui-egui/src/state.rs
@@@ -535,10 -570,13 +570,17 @@@ pub enum Dialog
pick_best: bool,
},
/// Help ▸ System Info: (label, value) rows.
+ DenoiseModel {
+ info: serde_json::Value,
+ accepted: bool,
+ },
+ /// A face model file the user chose: what it is, its licence terms, and the "I accept" box.
+ FaceModel {
+ path: String,
+ /// The engine's `faces.models.inspect` answer.
+ info: serde_json::Value,
+ accepted: bool,
+ },
SystemInfo {
rows: Vec<(String, String)>,
},
diff --cc docs/parity.md
index 53ccabc1d,ed95faab9..0a0c61cce
--- a/docs/parity.md
+++ b/docs/parity.md
@@@ -48,9 -48,9 +48,9 @@@ and prints the summary; `cargo xtask pa
| Y. Menus | 82 | 0 | 4 | 8 | 47/47 (100%) | 23/23 (100%) |
| Z. Keyboard shortcuts (desktop) | 75 | 3 | 3 | 1 | 49/52 (94%) | 23/24 (96%) |
| Lightroom Classic extras | 32 | 11 | 39 | 9 | — | 22/24 (92%) |
- | **Total** | 393 | 37 | 85 | 36 | 193/200 (97%) | 142/152 (93%) |
-| **Total** | 394 | 37 | 85 | 36 | 193/200 (97%) | 142/152 (93%) |
++| **Total** | 394 | 38 | 84 | 36 | 193/200 (97%) | 142/152 (93%) |
- Weighted completion (✅ = 1, 🟡 = ½, 🚫 left out): **79.9%** of 515 in-scope rows — P0 98.2% of 200 · P1 95.7% of 152 · P2 42.3% of 162.
-Weighted completion (✅ = 1, 🟡 = ½, 🚫 left out): **79.9%** of 516 in-scope rows — P0 98.2% of 200 · P1 95.7% of 152 · P2 42.6% of 163.
++Weighted completion (✅ = 1, 🟡 = ½, 🚫 left out): **80.0%** of 516 in-scope rows — P0 98.2% of 200 · P1 95.7% of 152 · P2 42.9% of 163.
<!-- /parity:summary -->
## Top gaps
diff --cc xtask/src/layers.rs
index 376d9e3c6,b6eab0f01..051b3aedf
--- a/xtask/src/layers.rs
+++ b/xtask/src/layers.rs
@@@ -39,8 -39,7 +39,9 @@@ pub const TABLE: &[(&str, Class)] = &
("tiff", Class::Layer(0)),
("sysmem", Class::Layer(0)),
("fetch", Class::Layer(0)),
+ ("denoise-core", Class::Layer(1)),
+ ("denoise", Class::Layer(1)),
+ ("heif", Class::Layer(0)),
("raw", Class::Layer(1)),
("codecs", Class::Layer(1)),
("meta", Class::Layer(1)),