Skip auto-applied denoise presets on AI denoised output - #21940
Merged
Conversation
Member
|
Maybe we should think about another way to solve this. Not writing to image files is one of the founding principles of darktable. Maybe we need to make module auto apply a little smarter. |
andriiryzhkov
force-pushed
the
fix_21391
branch
from
August 21, 2026 15:31
da8ec7a to
c12360a
Compare
Collaborator
Author
|
We can think of other way, but lets first align on what actually gets written where:
|
Collaborator
Author
|
@wpferguson : does this mean you think this approach is reasonable? |
Member
|
So we're just adding a little bit more to what we are already writing. Consider my comment withdrawn 😄 Though auto apply could be a little smarter (not just for this). |
TurboGit
reviewed
Aug 22, 2026
andriiryzhkov
force-pushed
the
fix_21391
branch
from
August 23, 2026 14:00
c12360a to
6669f1f
Compare
andriiryzhkov
force-pushed
the
fix_21391
branch
from
August 23, 2026 14:01
6669f1f to
cb7622a
Compare
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.
Fixes #21391
If you have denoise (profiled) as an auto-apply preset, it fires again on the DNG that AI raw denoise produces. The output keeps the source ISO, so an ISO-ranged preset matches it exactly as it matched the original raw – darktable has no way of knowing the work has already been done.
So the DNG now says so itself. The writer stamps
Xmp.darktable.neural_restore = "raw-denoise"into the file,dt_exif_readpicks it up at import and sets a newDT_IMAGE_AI_DENOISEDflag, and_dev_auto_apply_presetsleavesdenoiseprofileandrawdenoiseout of its query for those images – the same trick already used forbasecurvein a display-referred workflow. Keeping the marker in the file rather than the database means it survives a manual import, a film roll rescan or a rebuilt library.Only automatic application is suppressed; you can still enable the module yourself, which is what the thread asked for. A preference switches the stamping off for anyone who doesn't want darktable writing that into their files, and says plainly that this also removes the protection.
Astrophoto denoise deliberately stays out of the skip list – auto-applying it is usually a choice. IPTC
DigitalSourceTypewould be the standards-correct way to announce this to other software, but it's single-valued and sharpening elsewhere sets the same code, so it can't drive the decision and belongs in its own change.