mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-01 22:17:53 -06:00
Conflicts: - xtask/src/main.rs: upstream's runners (cargo test or nextest, no examples, doctests apart, one wasm `cargo check --keep-going`) with #2302's `ci --quick` on top: test_selected builds the same targets (--lib --bins --tests), the wasm check takes the changed crates in one call, the full test step is upstream's. - apps/lightcraft/src/control_server.rs: upstream's `before` closure, with the batch's no-delay sockets kept. - docs/parity-checklist.md: LR-BEHAV-ACCESS from main (tests/it path), LR-BEHAV-LOCALE / LR-BEHAV-LOCALIZE from the batch (Polish). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2809,7 +2809,7 @@ pub(crate) mod tests {
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
|
||||
/// A Sony ARW of `model`: a 64 × 48 uncompressed 14-bit CFA strip in a SubIFD (as `crates/raw/tests/vendor_robust.rs`
|
||||
/// A Sony ARW of `model`: a 64 × 48 uncompressed 14-bit CFA strip in a SubIFD (as `crates/raw/tests/it/vendor_robust.rs`
|
||||
/// lays it out) whose IFD carries the full-frame 16–35 mm distortion table (tag 0x7037).
|
||||
fn sony_arw(model: &str) -> Vec<u8> {
|
||||
use lightcraft_tiff::tags::{self as t, photometric};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! AI denoise through the engine: installing a model, making a photo's denoised picture in the background and for an
|
||||
//! export, the Amount slider mixing it in, and the cache. A tiny stand-in model (it halves every sample) takes the
|
||||
//! place of a real one, which is enough to see what the machinery does with its answer; how well real models denoise is
|
||||
//! measured separately (`crates/denoise/tests/real_model.rs`).
|
||||
//! measured separately (`crates/denoise/tests/it/real_model.rs`).
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
//! Opt-in same-machine denoise model-stage benchmark on one public Bayer raw.
|
||||
//! LC_DENOISE_MODEL=<onnx> LC_DENOISE_RAW=<CC0 corpus/raw> cargo test --release
|
||||
//! -p lightcraft-engine --features denoise --test denoise_cpu -- --ignored --nocapture
|
||||
//! -p lightcraft-engine --features denoise --test it denoise_cpu:: -- --ignored --nocapture
|
||||
//! LC_DENOISE_ONLY selects a file (default arw-sony-a7m3-compressed.arw).
|
||||
//! The whole model stage includes packing, scale/clip protection, blending and normalization;
|
||||
//! file decode, model loading and GPU setup are outside the timer. It uses the application's tile pool convention.
|
||||
#![cfg(feature = "denoise")]
|
||||
|
||||
use lightcraft_denoise::{
|
||||
TileRunner,
|
||||
@@ -4,12 +4,11 @@
|
||||
//!
|
||||
//! ```text
|
||||
//! LC_DENOISE_MODEL=<model_bayer.onnx> LC_DENOISE_RAW=<folder with raw files> \
|
||||
//! cargo test --release -p lightcraft-engine --features denoise --test denoise_real -- --ignored --nocapture
|
||||
//! cargo test --release -p lightcraft-engine --features denoise --test it denoise_real:: -- --ignored --nocapture
|
||||
//! ```
|
||||
//!
|
||||
//! `LC_DENOISE_RAW` is a folder of CC0 raw files (`cargo xtask corpus --download` → `corpus/raw`); every file in it is
|
||||
//! tried. Optional: `LC_DENOISE_ONLY` (a file name to try alone), `LC_DENOISE_RUN_ON=cpu|gpu|auto` (where the model runs; `cpu` to compare with the card).
|
||||
#![cfg(feature = "denoise")]
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::{Duration, Instant};
|
||||
@@ -0,0 +1,7 @@
|
||||
//! The integration tests, one module per file, linked into one test binary.
|
||||
|
||||
#[cfg(feature = "denoise")]
|
||||
mod denoise_cpu;
|
||||
#[cfg(feature = "denoise")]
|
||||
mod denoise_real;
|
||||
mod preview_read;
|
||||
@@ -2,7 +2,7 @@
|
||||
//! network share, which is where reading only the header instead of the whole raw matters:
|
||||
//!
|
||||
//! LC_PREVIEW_RAW="/run/user/1000/gvfs/smb-share:.../DSCF0001.RAF" \
|
||||
//! cargo test --release -p lightcraft-engine --test preview_read -- --ignored --nocapture
|
||||
//! cargo test --release -p lightcraft-engine --test it preview_read:: -- --ignored --nocapture
|
||||
//!
|
||||
//! It reports what the preview cost and fails when the read is not the small part of the file the
|
||||
//! header path promises. Skipped without `LC_PREVIEW_RAW` (there is no committed raw fixture: media
|
||||
Reference in New Issue
Block a user