Skip to content

[AI] Add plugins/ai/models_path to override the AI models folder#21049

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

[AI] Add plugins/ai/models_path to override the AI models folder#21049
TurboGit merged 1 commit into
darktable-org:masterfrom
andriiryzhkov:model_path

Conversation

@andriiryzhkov
Copy link
Copy Markdown
Collaborator

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 --configdir so 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 $HOME so users can type ~/dt-models in preferences. No migration of existing downloads; the longdescription notes this.

@TurboGit TurboGit added this to the 5.6 milestone May 17, 2026
@TurboGit TurboGit added feature: enhancement current features to improve priority: low core features work as expected, only secondary/optional features don't scope: codebase making darktable source code easier to manage scope: AI features AI features related issues and PR labels 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.

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!

@TurboGit TurboGit merged commit e96f8a2 into darktable-org:master May 17, 2026
5 checks passed
@andriiryzhkov andriiryzhkov deleted the model_path branch May 17, 2026 11:51
@wpferguson
Copy link
Copy Markdown
Member

Thanks @TurboGit @andriiryzhkov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: enhancement current features to improve priority: low core features work as expected, only secondary/optional features don't scope: AI features AI features related issues and PR scope: codebase making darktable source code easier to manage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants