Install AI models from additional repositories - #21827
Conversation
|
I'm a bit balanced about this. It is indeed already possible to download a |
|
There was one request to simplify installation of uncatalogued (non listed on the pref page) models. We currently have some optional models available in the repository. Another use case, I personally interested in - using AI models that does not meet darktable requirements and can not be added to the official repository. So I would have personal repository, which I'd like to connect to darktable as third-party one. To make clear to users that third-party models are not under darktable umbrella I implemented two things:
|
|
Small addition: the source column now covers manually installed models too. Before, only repository installs recorded an origin – a model imported from file, or a folder copied into the models directory, looked identical to an official download. A Now it shows |
Adds "install from repository…" to AI preferences: pick a repository, tick the models you want from its published listing, install. Models installed this way remember where they came from and are included in the update check. Repositories beyond the official one can be added and removed from the dialog.
Models outside darktable's bundled catalog were already installable – "import from file…" takes any
.dtmodel. But getting one there is a manual round trip: find the repository, open the right release, work out which asset you need, download it, then import it. And that is where it ends. darktable has no idea where the file came from, so it can never tell you a newer version has been published; you only find out by going back and checking by hand.A repository already publishes a
versions.jsonlisting everything in its release, which is all darktable needs to do both jobs itself.What's in it
A combo at the top of the dialog picks the repository, so two repositories publishing the same model id stay separate instead of merging into one ambiguous list.
"manage repositories…" on the action row edits the list, and adding one verifies it first by fetching its listing – the same call the combo makes, so "it verified" and "it will work" mean the same thing. That is also the right moment to say the repository isn't reviewed by the darktable project and that installing a model from it replaces any installed model of the same name.
Each install records where it came from, so the models table can name a publisher. That column stays hidden until something is actually installed from outside the official repository – which is why it isn't in the first screenshot – so nothing changes for people who never touch this.
Update checks now cover every configured repository instead of only the official one, with each
versions.jsonapplying only to its own models – an id another repository happens to reuse is a different model, and giving it the wrong digest would break its next download.The download cache is keyed on the asset digest rather than
<id>.dtmodel, which two repositories and two releases both claim, so an interrupted transfer is never resumed into an unrelated one.New config
plugins/ai/third_party_repositories– comma-separatedowner/repolist, empty by default. Everything above is inert until someone adds one.plugins/ai/repositorykeeps the meaning it shipped with in 5.6.0: the repository models come from. A mirror set there is still official as far as this installation is concerned.Notes
Third-party repositories are now contacted during the update check, which is mentioned in the config description. Nothing is contacted unless the user has added one.
Installing a model that shadows an installed one asks first. Removing a repository doesn't touch models already installed from it.