mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 10:09:01 -06:00
LR-EDIT-DETAIL-DENOISE: address installation and model-policy review
Generated with Codex.
This commit is contained in:
+22
-9
@@ -15,22 +15,29 @@ An active slider gesture finishes before the pending action resumes.
|
||||
## Models and terms
|
||||
|
||||
**No model weights are bundled.** Models live in the per-user `denoise-models` folder
|
||||
(override with `LIGHTCRAFT_DENOISE_MODELS`). Settings offers a pinned, verified download
|
||||
of RawNIND UtNet2 for Bayer sensors, or installation of a user-supplied ONNX file with
|
||||
a `denoise-model.json` beside it. Terms must be acknowledged before installation or
|
||||
(override with `LIGHTCRAFT_DENOISE_MODELS`). Settings provides **Install from file…**
|
||||
for a user-supplied ONNX file with a `denoise-model.json` beside it. The default build
|
||||
offers no model downloads. The separate `rawnind-model` Cargo feature enables the
|
||||
pinned RawNIND offer only when a release's model policy permits it.
|
||||
Terms must be acknowledged before installation or
|
||||
download. Downloads use the shared pure-Rust `lightcraft-fetch` client, with resume,
|
||||
progress, cancellation, size limits and SHA-256 verification.
|
||||
|
||||
RawNIND's offered ONNX weights are **GPL-3.0**, as recorded in the pinned model catalog.
|
||||
RawNIND's optional ONNX weights are **GPL-3.0**, as recorded in the pinned model catalog.
|
||||
They are downloaded separately after consent and read by our own Rust executor.
|
||||
Whether releases should offer this download remains a maintainer policy decision;
|
||||
permissively licensed or independently trained weights remain a gap. This is not a
|
||||
claim that optional downloading settles licensing questions. No GPL decoder or neural
|
||||
runtime code is included. Model metadata is in `crates/denoise/src/known.rs`.
|
||||
runtime code is included. Model metadata is in `crates/denoise-core/src/known.rs`.
|
||||
|
||||
Installation checks the manifest, model hash and size, then runs a synthetic self-test:
|
||||
finite output of the promised shape, repeatability, the declared scale and reduced
|
||||
noise. Unsupported operators, malformed files and a failed self-test return errors.
|
||||
The UI performs copying, extraction, hashing, parsing and CPU/GPU self-tests on one
|
||||
background installation worker. `denoise.models.downloads` and `denoise.pump` report
|
||||
`installing`, `installed` or `failed`; an existing model is preserved on a failed replacement.
|
||||
Command clients can request the same asynchronous path with `background: true`.
|
||||
The synchronous command remains available for scripts that require the result immediately.
|
||||
|
||||
The current contract is `bayerToRgb`: normalized, black-subtracted, non-white-balanced
|
||||
RGGB planes `[1, 4, tile, tile]` produce camera RGB `[1, 3, 2*tile, 2*tile]`.
|
||||
@@ -63,10 +70,16 @@ reduction and report their limitation.
|
||||
## Pure-Rust CPU and GPU execution
|
||||
|
||||
The CPU executor reads a bounded subset of ONNX into checked network data. Convolutions
|
||||
use bounded im2col blocks and `faer-core 0.17.1` with its Rust-intrinsic GEMM kernels,
|
||||
without BLAS, generated assembly or an inner thread pool. Tiles share the outer worker
|
||||
use bounded im2col blocks and `faer-core 0.17.1` with its pure-Rust GEMM backend,
|
||||
without BLAS, C dependencies or an inner thread pool. That backend includes
|
||||
architecture-specific assembly in its dependencies. Tiles share the outer worker
|
||||
pool. A scalar implementation checks the optimized operators on synthetic networks.
|
||||
Tract is not a workspace dependency or a product feature.
|
||||
CPU inference and the GPU model module are feature-gated; ordinary engine/web builds
|
||||
do not compile the faer/GEMM backend. The engine depends on the inference crate only through `denoise = ["dep:lightcraft-denoise", …]`;
|
||||
lightweight `lightcraft-denoise-core` metadata and cache formats remain available without inference. Pictures are capped at 100 megapixels; at most
|
||||
four tile calls run together, chosen within the process-wide working-memory budget.
|
||||
One idle CPU workspace is retained, and cache costs reserve room for the blended picture.
|
||||
|
||||
The GPU executor uses our WGSL kernels through wgpu. It checks a real model's output
|
||||
against the CPU and falls back on errors, unsupported networks or a slower device.
|
||||
@@ -97,8 +110,8 @@ Fresh checks can be run using an already installed model and CC0 raw samples:
|
||||
|
||||
```text
|
||||
LC_DENOISE_MODEL=<model.onnx> cargo test --release -p lightcraft-gpu --lib real_model_on_the_gpu_matches_cpu -- --ignored --nocapture
|
||||
LC_DENOISE_MODEL=<model.onnx> LC_DENOISE_RAW=<corpus/raw> cargo test --release -p lightcraft-engine --features denoise --test denoise_cpu -- --ignored --nocapture
|
||||
LC_DENOISE_MODEL=<model.onnx> LC_DENOISE_RAW=<corpus/raw> cargo test --release -p lightcraft-engine --features denoise --test denoise_real -- --ignored --nocapture
|
||||
LC_DENOISE_MODEL=<model.onnx> LC_DENOISE_RAW=<corpus/raw> cargo test --release -p lightcraft-engine --features rawnind-model --test denoise_cpu -- --ignored --nocapture
|
||||
LC_DENOISE_MODEL=<model.onnx> LC_DENOISE_RAW=<corpus/raw> cargo test --release -p lightcraft-engine --features rawnind-model --test denoise_real -- --ignored --nocapture
|
||||
```
|
||||
|
||||
## Commands and limits
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ and prints the summary; `cargo xtask parity --write` refreshes the summary table
|
||||
| C. Views & navigation (VIEW) | 15 | 1 | 1 | 0 | 8/9 (89%) | 4/4 (100%) |
|
||||
| D. Search & filter (FILT) | 11 | 1 | 1 | 0 | 4/4 (100%) | 4/4 (100%) |
|
||||
| E. Metadata (META) | 5 | 1 | 0 | 0 | 2/2 (100%) | 2/2 (100%) |
|
||||
| F. Edit panel — global adjustments (EDIT) | 42 | 1 | 5 | 1 | 28/28 (100%) | 13/14 (93%) |
|
||||
| F. Edit panel — global adjustments (EDIT) | 42 | 2 | 4 | 1 | 28/28 (100%) | 13/14 (93%) |
|
||||
| G. Profiles (PROF) | 7 | 1 | 3 | 0 | 3/4 (75%) | 3/3 (100%) |
|
||||
| H. Crop & rotate (CROP) | 9 | 0 | 0 | 1 | 6/6 (100%) | 3/3 (100%) |
|
||||
| I. Remove / healing (REM) | 7 | 1 | 2 | 2 | 4/4 (100%) | 2/3 (67%) |
|
||||
@@ -79,7 +79,7 @@ Take the first one nobody is working on.
|
||||
Object and Describe masks run SAM 3 in pure Rust (`crates/segment`); the weights (SAM License) are never bundled:
|
||||
the app offers a consented, verified download, but **LightCraft's CDN mirrors are not configured yet** (the
|
||||
built-in list is empty, so today users need their own mirror or a manual install). Subject / Sky / People could
|
||||
use the same model with fixed prompts. Bayer RAW denoise now runs on pure-Rust CPU/GPU with separately installed weights; its opt-in GPL model policy, linear RGB and quality comparison remain open. Super-resolution models remain a maintainer decision.
|
||||
use the same model with fixed prompts; denoise / super-resolution models remain a maintainer decision.
|
||||
7. **HDR** (Q. HDR, LR-EXP-HDR), **video** (R. Video), **Classic output modules** (Map view, Book, Slideshow module,
|
||||
Print, publish): large, well understood, lower priority than 1–5.
|
||||
8. **LR-VIEW-ZOOM** (P0): pinch zoom and two-finger pan now work, with stable image cursors between gesture events.
|
||||
|
||||
Reference in New Issue
Block a user