lightcraft/crates
Brandon Thomas d379e780cc M12: AI masks never require SAM 3 — background worker, consented download, review fixes
Engine (crates/engine/src/segment/):
- One worker thread owns the model and the encoded photo; the session
  sends jobs (with the render job for the model input) and gets results
  over channels, never locking what the model holds. In the app
  (Segmenter::background) clicks, descriptions, prepares and detail
  passes return at once and Session::segment_poll applies results (one
  undo step per settled selection, pending clicks shown on the photo);
  the CLI/MCP wait for them. Newer requests for the same selection
  supersede queued ones.
- Every job runs under catch_unwind: a candle panic becomes an error and
  the model is reloaded next time; busy counters are reset by drop
  guards; a dead worker is restarted. The model unloads after 10 min idle.
- segment.model.status / .download {acknowledged: true} / .cancel: the
  download runs on its own thread; status via atomics (try_lock only).
  Without the model every AI request fails at once with "The SAM 3 model
  is not installed…"; renders/exports never need it; `seg` params make
  AI masks from stored segmentations without it.
- Hostile documents: at most 4 detail patches per component (capped on
  deserialize and in the renderer), at most 64 Object clicks.

UI: Object / Describe without the model open "Download the SAM 3
Model?" (size, folder, SAM License link; Not Now / Download, progress,
cancel, Try Again with the reason, Continue once installed); progress in
the Masking panel when the dialog is closed. Reverted the PR's unrelated
default change (mask overlay off + hover-red) to main's behaviour.

tools/install-sam3.*: --fail so error pages never land in files, 416
restarts instead of looping, the weights are verified before they are
moved into place (a bad file is deleted, never resumed from).

Docs: docs/ai-masks.md (in-app download, mirrors, SAM License summary,
no weights in the repo), NOTICE, parity LR-MASK-OBJECTS, What's New,
ROADMAP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 09:56:50 -04:00
..
catalog LR-LIB-PEOPLE: leave empty face regions out of the catalog JSON 2026-10-07 06:16:02 -04:00
codecs Merge pull request #54 from storytold/pr/never-crash-codecs-catalog 2026-10-04 14:23:05 -04:00
color Never crash: color, geom, raster, develop, scenes, preview, pipeline 2026-10-04 12:34:53 -04:00
develop M12: AI masks never require SAM 3 — background worker, consented download, review fixes 2026-10-07 09:56:50 -04:00
engine M12: AI masks never require SAM 3 — background worker, consented download, review fixes 2026-10-07 09:56:50 -04:00
geom LR-LIB-PEOPLE: face boxes and People close-ups follow Rotate Left/Right 2026-10-07 06:21:04 -04:00
gpu LR-PROF-CAMERACOLOR: ARW camera looks bleach highlights and shift hue by brightness 2026-10-07 11:04:39 +02:00
mcp Merge main into fix/issue-93-export-overwrite 2026-10-05 18:44:02 -04:00
merge Issue #138: DNG: apply the file's own camera-profile look (HueSatMap, LookTable, ToneCurve) 2026-10-06 10:36:30 -04:00
meta LR-LIB-PEOPLE: clip XMP face regions to the photo, drop off-photo ones, read Rotation π 2026-10-07 06:12:49 -04:00
pipeline M12: AI masks never require SAM 3 — background worker, consented download, review fixes 2026-10-07 09:56:50 -04:00
preview Issue #98: thumbnail cache only lists, counts and deletes its own files 2026-10-05 16:23:32 -04:00
raster Merge pull request #56 from storytold/pr/never-crash-core 2026-10-04 14:23:22 -04:00
raw Merge remote-tracking branch 'origin/main' into fix-178 2026-10-07 06:01:50 -04:00
scenes Never crash: color, geom, raster, develop, scenes, preview, pipeline 2026-10-04 12:34:53 -04:00
segment M12: lightcraft-segment: Apache-2.0, checked weights, pure-Rust model download 2026-10-07 09:56:49 -04:00
sysmem Never crash: move the one unsafe FFI call into crates/sysmem 2026-10-05 02:06:08 -04:00
tiff Issue #138: DNG: apply the file's own camera-profile look (HueSatMap, LookTable, ToneCurve) 2026-10-06 10:36:30 -04:00
ui-egui M12: AI masks never require SAM 3 — background worker, consented download, review fixes 2026-10-07 09:56:50 -04:00