Skip to content

[AI] Add model card dialog to AI preferences#20797

Merged
TurboGit merged 3 commits intodarktable-org:masterfrom
andriiryzhkov:model_card
Apr 13, 2026
Merged

[AI] Add model card dialog to AI preferences#20797
TurboGit merged 3 commits intodarktable-org:masterfrom
andriiryzhkov:model_card

Conversation

@andriiryzhkov
Copy link
Copy Markdown
Contributor

Summary

  • Adds a model card (transparency/provenance info) dialog accessible from the AI preferences tab
  • Each model row has a clickable ℹ icon that opens the card
  • Card fields are read on demand from config.json on disk – no memory overhead in the registry
  • Fields: scope, author, source, paper, license, training data, data license, notes
  • URLs (source, paper) rendered as clickable links
  • Missing fields display en dash (–)
  • Hand cursor + tooltip on the ℹ icon for discoverability

config.json schema

Card fields live under a nested model_card object:

{
    "id": "denoise-nind",
    "name": "denoise nind",
    ...
    "model_card": {
        "long_description": "Image denoiser trained on...",
        "scope": "single-image luminance denoising",
        "author": "Benoit Brummer (Catholic University of Louvain)",
        "source": "https://github.com/trougnouf/nind-denoise",
        "paper": "https://arxiv.org/abs/1906.00270",
        "license": "GPL-3.0",
        "training_data": "NIND dataset",
        "training_data_license": "CC BY 4.0 / CC0 (per-image, Wikimedia Commons)",
        "notes": "trained on publicly available academic data"
    }
}

Architecture

  • ai_models.c/h: new dt_ai_model_card_t struct + dt_ai_models_get_card() / dt_ai_model_card_free() – reads config.json, returns owned strings
  • preferences_ai.c: ℹ column, click handler, tooltip/cursor, dialog rendering – no JSON parsing in the GUI layer

Screenshot

model_card

Prerequisite

Model configs need model_card data: darktable-org/darktable-ai#17

Motivation

Addresses community request for AI model transparency: https://discuss.pixls.us/t/feature-request-navigating-the-ai-controversies/57052

@TurboGit
Copy link
Copy Markdown
Member

For some reason the column with the i icon was hidden by default:

image

So not very discoverable. Also the i should certainly be centered on the column.

Also, for me it was a good time to check to new models being available but I still don't see the "update available" string on the UI.

@TurboGit TurboGit added this to the 5.6 milestone Apr 12, 2026
@TurboGit TurboGit added feature: enhancement current features to improve priority: high core features are broken and not usable at all, software crashes labels Apr 12, 2026
@andriiryzhkov
Copy link
Copy Markdown
Contributor Author

So not very discoverable. Also the i should certainly be centered on the column.

Oh, never seen scroll in the models table. Maybe we can move the info column. Just before the model name?

Also, for me it was a good time to check to new models being available but I still don't see the "update available" string on the UI.

Models versions did not change yet.

@TurboGit
Copy link
Copy Markdown
Member

Oh, never seen scroll in the models table. Maybe we can move the info column. Just before the model name?

Would be a better place for the info column anyway. Not sure if this would fix the issue though.

@andriiryzhkov
Copy link
Copy Markdown
Contributor Author

@TurboGit : I improved layout of models table. It is cleaner and always visible now. Model description is in the details now, no need to keep it in table.

models_table

@TurboGit
Copy link
Copy Markdown
Member

@andriiryzhkov : This needs conflicts resolution. TIA.

@andriiryzhkov
Copy link
Copy Markdown
Contributor Author

@TurboGit : Resolved

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 771a121 into darktable-org:master Apr 13, 2026
5 checks passed
@andriiryzhkov andriiryzhkov deleted the model_card branch April 13, 2026 20:05
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: high core features are broken and not usable at all, software crashes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants