You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Neural restore RAW denoise exports appear brighter than the source #22767
I checked and did not find my issue in the already reported ones
Describe the bug
Darktable’s exports through Raw Denoise appear brighter than the original files. The increase varies by scene.
Steps to reproduce
Use a RAW source files.
Denoise it with RawNIND through Darktable’s RAW-denoise.
Render the original RAW.
Compare matching crops and calculate mean linear luminance before display gamma
Expected behavior
RAW denoising should preserve overall brightness.
Logfile | Screenshot | Screencast
Commit
N/A
Where did you obtain darktable from?
distro packaging
darktable version
5.6.2
What OS are you using?
Linux
What is the version of your OS?
Arch
Describe your system
N/A
Are you using OpenCL GPU in darktable?
Yes
If yes, what is the GPU card and driver?
RTX 5060 ti
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
I've realized this when trying to benchmark denoise models. Results from raw denoise didn't make sense and the agent said it was because of brightness:
Possible gain-matching error
In src/common/ai/restore_raw_bayer.c, _bayer_gain_match() calculates:
gain = mean(packed Bayer input) / mean(RGB output)
The input mean counts green twice; the output mean gives each RGB channel equal weight. For constant channel values where G1 = G2:
Bayer mean = (R + 2G + B) / 4
RGB mean = (R + G + B) / 3
These means differ even with perfect color reconstruction. A green-heavy tile can receive an unwanted brightness boost. A neutral tile hides the mismatch.
changed the title [-]RAW denoise exports appear brighter than the source[/-][+]Neural restore RAW denoise exports appear brighter than the source[/+]on Oct 24, 2026
Activity
jenshannoschwalm commentedon Oct 24, 2026
So this is not raw denoise!
AyedaOk commentedon Oct 24, 2026
You're right! I mean the Neural restore raw denoise, not the “raw denoise” processing module. I've edited the title accordingly.
I also saw this other denoise models, so I know the brightness don't come from the RawNIND.
[-]RAW denoise exports appear brighter than the source[/-][+]Neural restore RAW denoise exports appear brighter than the source[/+]