apps/lightcraft/src/main.rs: kept main's split; hunks ported (clear_color, compose_window, with_transparent); test moved to tests.rs
crates/ui-egui/src/panels/settings.rs: deleted on main; checkbox ported to dialogs/settings/performance.rs
crates/ui-egui/src/state.rs: compose_window field and default ported to state/settings.rs
crates/ui-egui/locales/*.json: main's file plus the new key
docs/gaps.md, docs/parity-checklist.md: main's header and rows plus the PR's additions; duplicated header line and blank lines dropped
Mask ids come unchecked from develop.merge, sidecars (lc:settings) and
pastes. With a mask id of u32::MAX, next_mask_id() and Preset::apply
added 1 to it: debug builds panicked, release builds wrapped to 0, so
the second new mask got the same id as the first.
next_mask_id() now falls back to the lowest id no mask uses when the
highest is at the limit, and Preset::apply takes each preset mask's id
from it instead of counting on its own, so mask.add, mask.brushStroke,
mask.duplicate and presets with masks all get unused ids.
The sam3.safetensors on community mirrors (AEmotionStudio/sam3,
1038lab/sam3) is a conversion of Meta's original sam3.pt: its tensors
keep Meta's names, and its RoPE tables are C64. Renamed to
model.safetensors, it failed to load with "unsupported dtype
Some("C64")", which read like a LightCraft limitation.
Weights::open now lists a tensor of another dtype instead of failing
the whole file; reading it fails with the dtype error (LightCraft
computes RoPE itself and never reads those tables). Sam3::load_on then
checks the format: when the backbone's first tensor in Hugging Face
naming is missing and the file has Meta's detector.backbone. or
tracker. tensors, the error says it is Meta's original checkpoint and
that model.safetensors from facebook/sam3 in the Hugging Face format
is needed. docs/ai-masks.md says so for installing by hand.
Render cost is pixels x samples (CPU and GPU), and only mask.add / mask.update capped the list, so a
sidecar's lc:settings, a preset, develop.merge, render --settings or a catalog / history load could
carry thousands and stall a render or lose the GPU device. MAX_COLOR_RANGE_SAMPLES moves to
lightcraft-develop and ColorRange::samples deserializes through a capped visitor (the first 64 in
order, the rest skipped as IgnoredAny); the CPU and GPU renders also take at most 64 for settings
built in code.
With Show Pins on, Object and Describe masks had no pin on the photo, so they could only be picked in the Masking panel. An Object component's pin now sits at its first click and a Describe component's in the middle of what its segmentation selected. Clicking the pin selects the mask; dragging it changes nothing and adds no History step. Subject, Sky, Background, People, Landscape and the range masks still have no pin.
The gap 24 row, the change-log line and the two document headers now say only
that an extreme brush segment skips its intermediate dabs. They no longer claim
live preview, edge refinement or a mask test count, and the headers no longer
carry the unrelated gap 15 and print-page entries.
push_dabs clamped the number of intermediate dabs of one brush segment to 1,000,000, so a
finite but extreme segment (a point 10,000,000 px away) still allocated a million dabs. A
segment that would need more than that many now keeps only its endpoints; ordinary
spacing and the segment's end point are unchanged.
Adds oversized_brush_segments_skip_intermediate_dabs, which checks both the extreme case
(2 dabs) and an ordinary feathered-brush segment (21 dabs, end point kept, spacing kept).
The docs record the fix under gap 24 and LR-MASK-BRUSH; the parity status stays partial.
An Object / Describe mask is stored as a model's logit grid (288² over the whole photo,
~20 px cells on a 24 MP export) and was enlarged by bilinear sampling alone, so its edge
spilled 1–2 px onto the background; raising the mask's Exposure turned that strip into a
bright outline in previews and exports (CPU and GPU: the GPU renderer evaluates these
shapes with the same CPU `shape_alpha`).
`sample_seg` now guided-filters the sampled logits by the photo's log luminance where the
grid is coarser than the output: the fast (subsampled) guided filter, a window of 1.5 grid
cells, so a preview and an export put the edge in the same place. Filtering logits, not
coverage, lets the confident side win (the spill goes to ≈ 0, not to a mean of ≈ 0.1).
Pixels whose window is all inside or all outside, and edges the photo has no contrast
across, keep the plain sample exactly. Refine Edges still runs afterwards on the combined
mask and finds the edges in place: no second halo, no tightening.
One implementation: `guided_cross` (Refine Edges, Auto Mask) and the new
`guided_cross_fast` share `guided_coeffs`; the subsampled form uses
`local::guided_fast_step` and a box `resize`, like `local::guided_fast`. `guided_cross`'s
output is unchanged.
Existing AI masks become 1–2 px tighter at a subject's edges, on every process; their
inside, outside and contrast-less edges are unchanged. This lands in place under the
bug-fix rule of docs/process-versions.md (output that is in neither the photo nor the
edit), noted there.
Cost per AI selection (M2 Pro, 12 cores; one shape_alpha, before → after):
24 MP 25.7 → 48.2 ms, heap peak 96.5 → 108.8 MB; 60 MP 64.1 → 109.9 ms, 239.9 → 256.7 MB;
2.7 MP preview 3.1 → 10.6 ms, 11.2 → 26.5 MB.
Tests (a dark disc on a light background, its mask on a 32² grid): ≈ 0 one and two px
outside and ≈ 1 inside, all around (1 px outside was 0.66), bit-identical away from the
edge; with Refine Edges 50 / 100 (was 0.29 outside) and the edge within 1 px of the
unrefined one; the same edge position at 256, 512 and 1024 px; a Prompt mask's window
matches the whole render.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The restore actions use the recorded folder without checking that it still
exists, so an upgrade creates it again rather than using the default folder.
Gpu::new built the 27 compute pipelines one after another. On DX12 each one is compiled by FXC
(issue #471), single-threaded, inside create_compute_pipeline, so every process waited ~2.2 s for
them on an Intel Core Ultra 7 165U iGPU (app.gpu 2.4 s median) while the other cores idled.
build_kernels creates the shader modules and layouts on the calling thread and shares the pipelines
out to worker threads (std::thread::scope, an atomic job counter; the calling thread works too, so
every kernel is built even when no thread can be started). wgpu's error scopes are per thread, so
each worker pushes its own validation and internal scopes: a refused kernel or a panicked worker
still means no GPU, never a half-built one. app.gpu: 2.4 s -> 1.2 s median on that machine, exports
pixel-identical. The gpu: info line now reports the kernel count and build time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018QWU3BMJMENFqFqxDHzV3b
window_gpu::base_options() built the window's wgpu options from
egui_wgpu::WgpuConfiguration::default(), which is egui-wgpu's HIGH_THROUGHPUT
surface (desired_maximum_frame_latency 2; three drawables on Metal), not
eframe's default. eframe's NativeOptions::default() uses LOW_LATENCY
(latency 1). The window had eframe's default until #136 started building
the options by hand to choose the backends.
Start from eframe::NativeOptions::default().wgpu_options and change only
the backends, the DX12 compiler and the instance flags, as before. The
probed Windows configurations are built on the same options.
Measured on an M2 Max at 120 Hz (Metal System Trace, heavy develop drag,
presents joined to WindowServer's reads of the same IOSurface): the window
cycles 2 drawables instead of 3, and a frame reaches the compositor about
8.3 ms (one frame) sooner, 9.5-10.6 ms instead of 17.9-18.9 ms after it is
presented, at the same ~119 frames a second.
Test: window_gpu::tests::window_surface_keeps_one_frame_in_flight (fails
on the old options: latency Some(2) instead of Some(1)).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`rating:>=3`, `iso:<=400`, `f:>=2.8` read the `=` as part of the number, the
parse failed, and the token silently matched no photo. Parse the two-character
operators first and compare inclusively; `>`, `<`, `=` and bare numbers are
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqKgSkHi5MfTQFrZvDKBjm
* LR-PREF-SHORTCUTS: the shortcuts panel's Fixed keys ignore keys saved for unknown commands
* KEYC-METADATA: an Add Keywords request the Keywords panel can't take in time expires
* LR-META-INFO: Target Photo saves an Info edit to the photo it shows