Skip to content

Fix AI features ignoring plugins/ai/models_path override#21078

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
andriiryzhkov:fix_model_path
May 20, 2026
Merged

Fix AI features ignoring plugins/ai/models_path override#21078
TurboGit merged 1 commit into
darktable-org:masterfrom
andriiryzhkov:fix_model_path

Conversation

@andriiryzhkov
Copy link
Copy Markdown
Collaborator

Follow-up to #21049, which added the plugins/ai/models_path conf key to let users point darktable at a custom AI models folder. The preferences page picked the override up correctly (the AI tab listed installed models), but neural restore and the AI object mask tool kept reporting "model not found" – both created their own dt_ai_environment_t via dt_ai_env_init(NULL), which scanned only the XDG default and didn't know about the conf key.

This was the case @wpferguson's multi-instance setup needed in the first place, so it should actually work end-to-end.

What this PR does

Has dt_ai_env_init(NULL) fall back to the same plugins/ai/models_path value the registry already honors. The resolution lives in one helper, dt_ai_resolve_models_path_override(), so the registry, neural restore's env, and the object mask's env all read the path from the same source going forward.

@andriiryzhkov andriiryzhkov added bugfix pull request fixing a bug scope: AI features AI features related issues and PR priority: high core features are broken and not usable at all, software crashes labels May 20, 2026
@andriiryzhkov andriiryzhkov added this to the 5.6 milestone May 20, 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!

@TurboGit TurboGit merged commit 35fcbe3 into darktable-org:master May 20, 2026
5 checks passed
@andriiryzhkov andriiryzhkov deleted the fix_model_path branch May 20, 2026 15:55
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 priority: high core features are broken and not usable at all, software crashes scope: AI features AI features related issues and PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants