LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge PR #3384: LR-MASK-OBJECTS: a SAM 3 checkpoint in Meta's original format is named as such, not as an unsupported dtype (#3378)
aionggac36428e6d4b
diff --cc docs/parity-checklist.mdindex 9479846ff,0689b803f..8a4d098f2--- a/docs/parity-checklist.md+++ b/docs/parity-checklist.md@@@ -293,13 -293,13 +293,13 @@@ differences and missing bindings are i| LR-MASK-SUBJECT | Select subject | P2 | π‘ | `cmd:mask.add` (`subject`), `crates/pipeline/src/masks.rs` | saliency heuristic, no segmentation model; a photo that carries person mattes (DNG semantic masks: iPhone ProRAW portrait / skin / hair / teeth / glasses mattes) uses them instead (synthetic files only: no corpus file carries person mattes) || LR-MASK-SKY | Select sky | P2 | π‘ | `cmd:mask.add` (`sky`), `crates/pipeline/src/masks.rs` (`Mattes`), `crates/raw/src/semantic.rs` | heuristic; a photo that carries a sky matte (DNG semantic mask, e.g. iPhone ProRAW) uses it instead, through orientation / crop / lens corrections, preview = export (checked on one CC0 iPhone 12 Pro ProRAW and synthetic files) || LR-MASK-BACKGROUND | Select background | P2 | π‘ | `cmd:mask.add` (`background`) | inverse of the subject mask (heuristic, or the photo's person mattes) |- | LR-MASK-OBJECTS | Object selection | P2 | π‘ | `cmd:mask.add` (`object`, `prompt`), `cmd:mask.objectPoint`, `cmd:mask.refineDetail`, `cmd:segment.prepare`, `cmd:segment.model.status`, `cmd:segment.model.download`, `cmd:segment.model.cancel`, `cmd:app.openSamModelFolder`, `crates/segment`, `crates/engine/src/segment.rs` | SAM 3 in pure Rust (candle; Metal on macOS, CPU elsewhere): Object tile β click to include, β₯-click to leave out; Describe tile β a text prompt selects every instance ("sky", "the red car"); both also as Add/Subtract/Intersect components; + / β under the selected mask; comma lists (`car, road`); a zoomed-in detail pass for 5β10Γ finer edges on small objects; per-selection Edge (hard β soft); the stored grid is enlarged along the photo's edges (a guided filter of its logits by log luminance, so no outline spills onto the background under a raised Exposure, #3272). The model runs on its own worker thread (the UI never waits; panics become errors; a job that fails on the Mac's GPU runs again on the CPU, which then serves the rest of the session, #1974), is unloaded after 10 min idle, and is optional: the segmentation is stored with the mask (288Β² logits), so renders and exports never need it. Weights are never bundled (SAM License): without them the app offers a consented background download (mirrors, resume, timeouts, SHA-256) β **but no default download location is configured yet** (users set `LIGHTCRAFT_SAM3_MIRRORS` or install by hand: the dialog names the three files, opens the configured model folder with the host opener, preserves setup on an open error, and links docs/ai-masks.md). Not verified against Lightroom's Select Object; no brush/box object mode; the first click on a photo waits for its analysis (~4 s on an M4 Pro, much longer on CPU) |-| LR-MASK-OBJECTS | Object selection | P2 | π‘ | `cmd:mask.add` (`object`, `prompt`), `cmd:mask.objectPoint`, `cmd:mask.refineDetail`, `cmd:segment.prepare`, `cmd:segment.model.status`, `cmd:segment.model.download`, `cmd:segment.model.cancel`, `cmd:app.openSamModelFolder`, `crates/segment`, `crates/engine/src/segment.rs` | SAM 3 in pure Rust (candle; Metal on macOS, CPU elsewhere): Object tile β click to include, β₯-click to leave out; Describe tile β a text prompt selects every instance ("sky", "the red car"); both also as Add/Subtract/Intersect components; + / β under the selected mask; comma lists (`car, road`); a zoomed-in detail pass for 5β10Γ finer edges on small objects; per-selection Edge (hard β soft). The model runs on its own worker thread (the UI never waits; panics become errors; a job that fails on the Mac's GPU runs again on the CPU, which then serves the rest of the session, #1974), is unloaded after 10 min idle, and is optional: the segmentation is stored with the mask (288Β² logits), so renders and exports never need it. Weights are never bundled (SAM License): without them the app offers a consented background download (mirrors, resume, timeouts, SHA-256) β **but no default download location is configured yet** (users set `LIGHTCRAFT_SAM3_MIRRORS` or install by hand: the dialog names the three files, opens the configured model folder with the host opener, preserves setup on an open error, and links docs/ai-masks.md; Meta's original checkpoint installed in place of the Hugging Face one is named as such, #3378). Not verified against Lightroom's Select Object; no brush/box object mode; the first click on a photo waits for its analysis (~4 s on an M4 Pro, much longer on CPU) |++| LR-MASK-OBJECTS | Object selection | P2 | π‘ | `cmd:mask.add` (`object`, `prompt`), `cmd:mask.objectPoint`, `cmd:mask.refineDetail`, `cmd:segment.prepare`, `cmd:segment.model.status`, `cmd:segment.model.download`, `cmd:segment.model.cancel`, `cmd:app.openSamModelFolder`, `crates/segment`, `crates/engine/src/segment.rs` | SAM 3 in pure Rust (candle; Metal on macOS, CPU elsewhere): Object tile β click to include, β₯-click to leave out; Describe tile β a text prompt selects every instance ("sky", "the red car"); both also as Add/Subtract/Intersect components; + / β under the selected mask; comma lists (`car, road`); a zoomed-in detail pass for 5β10Γ finer edges on small objects; per-selection Edge (hard β soft); the stored grid is enlarged along the photo's edges (a guided filter of its logits by log luminance, so no outline spills onto the background under a raised Exposure, #3272). The model runs on its own worker thread (the UI never waits; panics become errors; a job that fails on the Mac's GPU runs again on the CPU, which then serves the rest of the session, #1974), is unloaded after 10 min idle, and is optional: the segmentation is stored with the mask (288Β² logits), so renders and exports never need it. Weights are never bundled (SAM License): without them the app offers a consented background download (mirrors, resume, timeouts, SHA-256) β **but no default download location is configured yet** (users set `LIGHTCRAFT_SAM3_MIRRORS` or install by hand: the dialog names the three files, opens the configured model folder with the host opener, preserves setup on an open error, and links docs/ai-masks.md; Meta's original checkpoint installed in place of the Hugging Face one is named as such, #3378). Not verified against Lightroom's Select Object; no brush/box object mode; the first click on a photo waits for its analysis (~4 s on an M4 Pro, much longer on CPU) || LR-MASK-PEOPLE | People parts | P2 | β¬ | | shape exists (no UI): uses the photo's person / skin / hair / teeth / glasses mattes when it carries them (DNG semantic masks), else the subject heuristic || LR-MASK-LANDSCAPE | Landscape classes | P2 | β¬ | | shape exists, evaluates empty |-| LR-MASK-BRUSH | Brush mask | P0 | π‘ | `cmd:tool.brush`, `cmd:mask.brushStroke` (`autoMask`), `crates/pipeline/src/masks.rs`, `crates/ui-egui/src/brush_live.rs` | size/feather/flow/density/erase; Create New Mask starts a separate brush in paint mode; the stroke shows while the button is held with the committed stroke's dab spacing, feather and flow, so fast strokes have no gaps (#517); coverage builds up by passes, not hold time (holding the brush still adds nothing, live or committed, #518); Auto Mask: dabs weighted by similarity to the colour under the dab centre, refined by a guided filter on luminance (CPU + GPU); β§-click draws a straight stroke from where the last stroke ended (`connect`), tapering size, feather and flow from that stroke's values when they changed; no A/B brushes; pen pressure (Brush βΈ Pen Pressure, on by default; `pressure` per point in `mask.brushStroke`) scales each dab's size (a tenth to all of it) and flow, live and committed alike, where winit reports a pen force (Windows; not macOS / Linux tablets yet); no tilt |+| LR-MASK-BRUSH | Brush mask | P0 | π‘ | `cmd:tool.brush`, `cmd:mask.brushStroke` (`autoMask`), `crates/pipeline/src/masks.rs`, `crates/ui-egui/src/brush_live.rs` | size/feather/flow/density/erase; Create New Mask starts a separate brush in paint mode; the stroke shows while the button is held with the committed stroke's dab spacing, feather and flow, so fast strokes have no gaps (#517); with the mask overlay hidden (O / the eye, or after a mask slider hid it) or a colour overlay at opacity 0 it is not tinted while painting either, so dodging and burning is judged on the photo, and its effect shows once the stroke is committed (#2549); coverage builds up by passes, not hold time (holding the brush still adds nothing, live or committed, #518); oversized path segments skip intermediate dabs instead of allocating a million samples; Auto Mask: dabs weighted by similarity to the colour under the dab centre, refined by a guided filter on luminance (CPU + GPU); β§-click draws a straight stroke from where the last stroke ended (`connect`), tapering size, feather and flow from that stroke's values when they changed; no A/B brushes; pen pressure (Brush βΈ Pen Pressure, on by default; `pressure` per point in `mask.brushStroke`) scales each dab's size (a tenth to all of it) and flow, live and committed alike, where winit reports a pen force (Windows; not macOS / Linux tablets yet); no tilt || LR-MASK-LINEAR | Linear gradient | P0 | β | `cmd:tool.linear`, `cmd:mask.update` | || LR-MASK-RADIAL | Radial gradient | P0 | β | `cmd:tool.radial`, `cmd:mask.update`, `crates/ui-egui/src/panels/detail.rs` | drag the selected ellipse's body or centre pin to move; edge grips resize, outer grip rotates; rotated and compound radial components, hidden pins, outside hit rejection and one-step undo tested |-| LR-MASK-COLORRANGE | Colour range | P1 | β | `cmd:mask.add` (`colorRange`), `cmd:mask.sampleColor`, `cmd:mask.update`, `crates/pipeline/src/lib.rs` (`color_range_sample`) | Color tile β click the photo to sample (β§-click adds, up to 5; samples taken in the space the mask compares in, respecting section eyes and the requested HDR/SDR rendition), Pick button, Refine slider |+| LR-MASK-COLORRANGE | Colour range | P1 | β | `cmd:mask.add` (`colorRange`), `cmd:mask.sampleColor`, `cmd:mask.update`, `crates/pipeline/src/lib.rs` (`color_range_sample`) | Color tile β click the photo to sample (β§-click adds, up to 5; samples taken in the space the mask compares in, respecting section eyes and the requested HDR/SDR rendition), Pick button, Refine slider; at most 64 samples (`MAX_COLOR_RANGE_SAMPLES`, render cost is pixels Γ samples) however the mask arrives: `mask.add` / `mask.update`, a sidecar's `lc:settings`, a preset, `develop.merge`, `render --settings` or the catalog and history keep the first 64 (issue #2556) || LR-MASK-LUMRANGE | Luminance range | P1 | β | `cmd:mask.add` (`luminanceRange`), `cmd:mask.update`, `crates/ui-egui/src/panels/masking.rs` (`range_controls`) | range bar with two handles (the pressed endpoint stays selected through fast/crossing drags; one undo step per drag), Smoothness, Show Luminance Map (B&W photo with the range tinted) || LR-MASK-DEPTHRANGE | Depth range | P2 | β¬ | | shape exists, needs depth data || LR-MASK-COMBINE | Add / subtract / intersect | P0 | β | `cmd:mask.addComponent`, `cmd:tool.brush` | Add/Subtract > Brush creates a component with the chosen operation; Erase removes paint within that brush component |diff --cc docs/whats-new.mdindex 013220cd0,e06c39116..7d43b2ec8--- a/docs/whats-new.md+++ b/docs/whats-new.md@@@ -2,35 -2,12 +2,41 @@@## 2026-10-30+### A colour-range mask keeps at most 64 samples, however it arrives+- A colour-range mask compares every pixel with every colour it has sampled, so a mask with thousands of samples+ could stall a render or export, or lose the GPU for the rest of the session. `mask.add` and `mask.update` already+ kept the first 64; a sidecar's `lc:settings`, a preset, `develop.merge`, `render --settings` and the catalog and+ edit history now keep the first 64 too, in order, and the extra ones are skipped as they are read. Masks made in+ the app (up to 5 samples) are unchanged.++ ### A SAM 3 model in the wrong format says so+ - Object and Describe need `model.safetensors` from `facebook/sam3` in the Hugging Face format. The+ `sam3.safetensors` on community mirrors is Meta's original checkpoint, with other tensor names; installed in its+ place, AI masks failed with "unsupported dtype C64". LightCraft now says that the file is Meta's original+ checkpoint and which file it needs instead.++## 2026-10-29++### Object and Describe masks show their pins+- With Show Pins on, an Object mask now has a pin where you first clicked the object, and a Describe mask has one in+ the middle of what its description found. Before, these masks had no pin on the photo, so they couldn't be picked+ there. Clicking a pin selects its mask; dragging it changes nothing, as these masks follow what they selected.+ With the Object tool on, a click on another mask's pin selects that mask too, instead of adding a click to the+ selected Object mask, and a click on the selected mask's own pin adds nothing. Subject, Sky, Background and the+ range masks still have no pin.++## 2026-10-27++### The Edit menu groups Select Only Active Photo and Paste Settings from Previous with their kin+- Select Only Active Photo now sits under Deselect All, and Paste Settings from Previous under Paste Selected Settingsβ¦, instead of both after Settingsβ¦, near the end of the Edit menu. On macOS, where Settingsβ¦ lives in the application menu, the Edit menu no longer shows two separator lines in a row.++## 2026-10-25++### `>=` and `<=` work in the search box+- Fielded search tokens now take inclusive comparisons: `rating:>=3`, `iso:<=400`, `f:>=2.8`, `focal:<=50`. Before,+ the `=` was read as part of the number, so such a search quietly showed no photos at all.++## 2026-10-24### Relative-date filters and smart albums follow the clock