Repository navigation
LR-EDIT-AUTO: Lightroom-like Auto, calibrated on Lightroom's Auto results - #628
Merged
Merged
Conversation
…ults (storytold#318, storytold#209) Auto was a percentile rule that set Exposure about 1.4 EV higher than Lightroom's Auto on the same photos (mean +1.81 against +0.44 EV) and barely used Shadows: on 24 Sony raw photos its results were further from Lightroom's Auto results (median dE76 22.0) than leaving the photo unedited (7.9), about 18 L* too bright. Auto is now Lightroom's shape of rule with values chosen for our results: - Exposure = -0.58 - 0.41 * the scene's log-average luminance (EV from middle grey, scene-linear, under the photo's white balance, so it does not depend on the base tone curve), clamped to -2..3 EV. The slope is Lightroom's: its Auto's chosen Exposure against our log average, r -0.92; - Highlights -66 and Shadows +52: Lightroom's own average Auto values; - Contrast +68 and Vibrance +30 (our scales; our base tone is flatter); Whites, Blacks and Saturation 0. The exposure offset, Contrast and Vibrance were fitted jointly so our renders match Lightroom's Auto exports on the 16 photos whose starting look Sony's DRO doesn't brighten (storytold#568 changes the other 8). Held out one photo at a time, each fold fitted from its own training photos only: median dE76 6.38 on those 16 (8.28 unedited, 18.81 with the old rule), 12 of 16 closer than unedited; 7.70 on all 24 (7.92 unedited); on the 8 DRO photos 9.39 (7.00 unedited), their brighter start showing through. Freeing Highlights and Shadows too (5 fitted values) did no better held out (6.51) and left them poorly determined across folds. The log average skips pixels that aren't finite (a damaged decode) through the proxy's resampling and white balance; with no valid pixel, Exposure 0. Values are black-box observations of Lightroom (the settings its Auto chose and its exports), as in storytold#514. Auto only applies when asked for, so existing edits keep their look; HDR merges with Auto Settings use the same rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thank you @AlexChambers! This landed in #657 with the other community PRs of this round. While merging, Auto now renders under the photo's process (#533). Please join our Discord if you haven't already: https://discord.gg/artcraft |
|
Auto mode still does not working properly Contrast +68 and Highlights -66 tested on V0.14.0 |
emmertex
added a commit
to clydecbrown/lightcraft
that referenced
this pull request
Oct 27, 2026
…buting Docs: CONTRIBUTING.md, AGENTS.md as the one instruction file, PR template in line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #318 ("won't do a proper auto correction") and the Auto half of #209 (Auto + Clarity looks much worse than Lightroom).
Why
Auto (
develop.auto,crates/pipeline/src/auto.rs) was a short percentile rule. On 24 Sony raw photos, it set Exposure about 1.4 EV higher than Lightroom's Auto on average (+1.81 against +0.44 EV) and barely used Shadows. Its results were about 18 L* brighter than Lightroom's Auto results, and further from them than the unedited render (median dE76 22.02 against 7.92).What
Auto now follows the shape of Lightroom's rule, with values chosen so that our results match its results (our sliders have their own scales, so copying its numbers is not the goal):
Auto only applies when someone asks for it, so existing edits keep their look. HDR merges with Auto Settings use the same rule.
How it was fitted and tested
Targets. The targets are Lightroom 9.5.1's observed behaviour, measured black-box: the values its Auto chose and its exported results on the 24 photos of the owner's study 119, with the matching exports from probe 529. No Adobe files are read. This is the same approach as #514; the owner has asked the maintainer about it on #146.
Metric. Probe 529's metric: 16-bit sRGB exports at 2048 px, CIELab D65 after a 1.7 px Gaussian, whole frame minus a 12 px border, mean dE76 and mean dL*.
DRO. Sony's in-camera DRO brightens the camera JPEG our starting look is fitted to, so 8 of the 24 photos start brighter than they should (#568 fixes that separately). The rule is fitted only on the 16 DRO-off photos, and every result is reported per group.
Held-out validation (leave one out). For each of the 24 photos:
What this shows:
DRO-off photos: the held-out Auto is closer to Lightroom's Auto than the unedited render on 12 of the 16. Their mean Exposure is +0.18 EV against Lightroom's +0.26 (the old rule chose +1.47). Across all 24, it's +0.35 against +0.44 (correlation 0.92; within the 16 DRO-off photos alone, 0.61).
Where it is worse than unedited (DRO off, held out): four scenes where Lightroom's sliders largely cancel out.
DRO-on photos: only 1 of 8 is better than unedited; they end about 8.6 L* too bright, their brighter starting point showing through. LR-PROF-CAMERACOLOR: Sony ARWs shot with DRO no longer start with the camera JPEG's lifted shadows (#244) #568 should change that.
Parameter spread across the 24 folds:
The larger rule did no better: freeing Highlights and Shadows as well (5 fitted values) gave 6.51 / 7.05 held out on the DRO-off photos, and left the parameters poorly determined across folds: Contrast 17 to 70, Highlights -69 to -39, Shadows 17 to 54. So Highlights and Shadows are taken from Lightroom instead.
Other sources (no Lightroom reference, checked for sanity), default to Auto:
The raws get the expected added contrast, vibrance and highlight recovery, with no more crushed blacks than before. JPEGs are already toned: their log average reads brighter, so their Exposure moves less, but Contrast +68 still darkens their midtones a little. The demo scenes' very bright skies and suns are pulled down. None of these sources was calibrated against Lightroom.
Limits
Testing
crates/pipeline/src/auto.rsunit tests:cargo xtask ci: on origin/main 88ea1a8 (rustc 1.99, Apple M3 Max): fmt, clippy and heif pass;testfails only on the two knownlightcraft-gpudenoise-runner tests (nn::tests::the_gpu_gives_what_the_reference_gives,nn::tests::a_runner_serves_many_tiles_from_many_threads), which fail the same way on main on this machine. With--no-fail-fastevery other test binary passes (77), and parity, layers, assets and wasm pass when run on their own.🤖 Generated with Claude Code