Skip to content

[AI] Add tensor:scale_add_planes to Lua API for raw-denoise color fix#21048

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
andriiryzhkov:fix_lua_raw_denoise
May 17, 2026
Merged

[AI] Add tensor:scale_add_planes to Lua API for raw-denoise color fix#21048
TurboGit merged 1 commit into
darktable-org:masterfrom
andriiryzhkov:fix_lua_raw_denoise

Conversation

@andriiryzhkov
Copy link
Copy Markdown
Collaborator

This is the minimal C-side dependency for a bug fix in lua-scripts, darktable-org/lua-scripts#677, which fixes wrong colors in the ai_raw_denoise.lua example script.

The script needs per-channel WB normalization to feed the bayer rawdenoise model the daylight-WB'd input it was trained on. The current Lua tensor API has no per-channel arithmetic and no element-wise multiply, so there's no viable Lua-only workaround – per-element get/set is ~60M Lua calls per image and unusable.

@andriiryzhkov andriiryzhkov added the bugfix pull request fixing a bug label May 16, 2026
@wpferguson
Copy link
Copy Markdown
Member

wpferguson commented May 16, 2026

@TurboGit: tested, works for me...

EDIT: @andriiryzhkov thanks

@TurboGit TurboGit added this to the 5.6 milestone May 17, 2026
Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to both of you @wpferguson and @andriiryzhkov !

@TurboGit TurboGit merged commit 3c38636 into darktable-org:master May 17, 2026
5 checks passed
@andriiryzhkov andriiryzhkov deleted the fix_lua_raw_denoise branch May 17, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants