[AI] Add plugins/ai/models_path to override the AI models folder#21049
Merged
Conversation
TurboGit
approved these changes
May 17, 2026
Member
TurboGit
left a comment
There was a problem hiding this comment.
A feature enhancement, well contained in a single place and only doing something when set which is not the case by default. And furthermore needed by a core dev, so let's merge. Thanks!
Member
|
Thanks @TurboGit @andriiryzhkov |
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.
This isn't a real feature and it isn't a bugfix either – it's a small unblock for users who run multiple darktable installations side by side (testing, packaging, multi-config setups).
Context
By default darktable stores downloaded AI models under
$XDG_DATA_HOME/darktable/models– a single location shared across every darktable installation on the same user account. That's right for most people (one download, many configdirs), but it doesn't fit every setup.The case that prompted this came from darktable-org/lua-scripts#677 (comment): @wpferguson runs 40+ darktable installations on one machine, each with its own
--configdirso they don't step on each other. Everything stays isolated per instance except the models folder, which is hard-coded to the shared user data dir.What this PR does
Adds one optional string conf key,
plugins/ai/models_path. Empty (the default) → behaviour unchanged. Set → the AI registry uses that path verbatim, with a leading~expanded to$HOMEso users can type~/dt-modelsin preferences. No migration of existing downloads; the longdescription notes this.