Skip to content

Alternative conventional NR: Contrast and edge-aware chroma (process V3) - #1714

Draft
Clearfall wants to merge 1 commit into
storytold:mainfrom
Clearfall:fix/denoise-controls
Draft

Clearfall wants to merge 1 commit into
storytold:mainfrom
Clearfall:fix/denoise-controls

Conversation

@Clearfall

Copy link
Copy Markdown
Contributor

Alternative proposal and overlap

This is a comparison draft, explicitly overlapping existing work. It does not claim these issues are unassigned or close them automatically:

Please assess this as an independent algorithm option; the current evidence does not establish that it is better than those implementations or matches Lightroom.

Additional coordination found in the 2026-10-14 review: open #1489 changes noise-reduction scaling to use original-image pixels and scale-dependent variance. It overlaps local.rs and the CPU/GPU parameter paths; this draft does not include that fix and needs integration review if either proposal lands. #1672 also proposed a different V3 sharpening/chroma algorithm, but is currently closed without merging. The three principal alternatives above remain open and unmerged.

Change and compatibility

Process V3 makes Luminance Contrast effective and provides separate Colour Detail/Smoothness roles. CPU and WGSL use the same parameters. Cache keys include the process and Contrast, so a warm slider change updates the render. V1/V2 keep their previous output; existing edits require Update to Current Process or Reset to adopt it. Other stages retain V2 behaviour.

V3 is provisional relative to main 68c9240. #1348, #1349, #944, #1226 and #1383 also propose process numbers; maintainers must reconcile numbering and inheritance in merge order before combining them. No code from those proposals is included here.

Validation and cost

  • On the preceding base: 179 pipeline tests passed (2 ignored), 28 develop tests passed and all 17 GPU-equivalence tests passed on an RTX 4060 Laptop GPU / DX12. New GPU control-extreme/cache cases differ from CPU by at most one 8-bit level.
  • Procedural regressions cover Contrast response and caching, flat noise versus edges, colour boundaries, luminance preservation, legacy output and bounded invalid parameters.
  • The reproducible conventional_nr_bench example and measurements are in docs/conventional-noise-reduction.md. In the measured optimized-development run, V3 NR-drag CPU times were 55.9 ms at 1152x768, 144.3 ms at 1920x1280 and 1420.2 ms at 24 MP; corresponding GPU times were 10.4, 29.8 and 200.8 ms. CPU costs are materially higher than V2 and miss the stated interaction/export budgets. This is an explicit review limitation, not a release-performance claim.
  • On base 68c9240, formatting and all-target Clippy pass. Three full-CI attempts were interrupted during the HEIF gate by native Rust 1.99 compiler crashes on this Windows host (including num-derive compilation); the remaining workspace/wasm gates are unverified. This is not a green full-CI result. Exact final results will be recorded before leaving draft status.
  • The later CLI build also terminated during image dependency compilation with native exit 0x80000004. No final-base UI check was completed. These native compiler exits are not test assertion failures.
  • No personal photos/catalogs, Adobe assets, model weights or local release files are included. AI-assisted contribution for @Clearfall, with Codex attribution in the commit.

Publication checkpoint (2026-10-14)

Upstream main is now a4b53b2; this comparison branch remains based on 68c9240. The historical results above do not validate integration with current main. GitHub reports that this branch cannot automatically merge with current main. Rebase/conflict resolution and current-main runtime validation remain required before leaving draft status. Separate contributions: #1433 (import duplicate matching) and #1713 (Lens Blur).

Make Luminance Contrast effective and filter colour through two edge-aware chromaticity passes on CPU and GPU. Keep V1/V2 rendering and include process/Contrast in the stage cache key.

Publish as an alternative comparison draft to existing NR proposals, with their overlap, provisional process numbering, synthetic evidence and measured CPU performance limitations documented. Full validation status is recorded in the PR.

Co-authored-by: Codex <noreply@openai.com>
@wanikhawar

Copy link
Copy Markdown
Contributor

This draft overlaps work that has landed since it was written: #1348 (colour NR) and #1489 (NR in original-image pixels) are merged, and #1259 and #1349 still cover luminance Contrast. The branch is based on 68c9240, conflicts on most of the files it touches, and full CI never completed, which the description acknowledges. The CPU cost is also above the budget you state. I suggest closing this as a comparison draft. If you want the edge-aware chroma passes or the Contrast epsilon idea considered, please open a fresh PR on current main that covers one piece and compares it with the merged #1348. Include a process-version and RENDER_CACHE_VERSION plan that matches main's numbering.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants