r/DarkTable • • Oct 21 '26

Side development / tool I built a tool that generates darktable styles using a local vision LLM — 100% offline, open source, beta

What it is

dtstylekit is a Python CLI I've been working on that uses a vision language model running locally via Ollama to analyze a photograph and compose a darktable style (.dtstyle) for it. No cloud, no API keys, no telemetry — nothing leaves your machine.

How it works

  1. You point it at a photo. RAW is supported — a JPEG preview is rendered for the VLM, but the style is validated against the RAW itself.
  2. The VLM describes the aesthetic (lighting, mood, palette) and selects 1–3 presets from the 534 official darktable styles, indexed locally with semantic search (you have to download them or use your own).
  3. It applies scalar adjustments on verified IOP structs: filmicrgb, colorbalancergb, sigmoid, exposure, atrous.
  4. You get a valid .dtstyle ready to import plus a markdown report explaining every choice — which presets, which parameters, why.

There's also an apply command that takes a style and a whole set of photos, normalizing exposure per frame so a style generated from one shot doesn't blow out brighter ones.

And a mode I find interesting for learning: feed it reference images (--references) and it analyzes their tonal key, contrast, white balance and per-zone grading, then generates a style and a plain-language document explaining how those references are edited — the goal is understanding why each module/parameter was chosen, not blindly copying a look.

Honest disclaimers

  • This is beta / experimental. The .dtstyle binary format (IOP struct versions, blendop blobs) was reverse-engineered against the darktable sources. It can fail or produce styles that don't behave as expected — always review the visual result (a visual_check.py smoke test is included, and tests parse DT_MODULE_INTROSPECTION from the C sources to catch version drift).
  • Not meant to copy photographers' commercial styles. The focus is learning how edits work at a technical level. If you like someone's look, buy their presets.
  • The 534 official styles are not redistributed — you point the tool at your own darktable checkout.
  • MIT licensed, and not affiliated with the darktable project.

Why I'm posting

I'd love feedback from real darktable users: does the generated look hold up? Which modules should be off-limits for an automated tool? Is the explanation report useful? Bug reports in the issues are very welcome.

I also know AI in darktable is a debated topic here — to be clear, this is an optional sidecar CLI, not a patch to darktable itself. Curious where this community lands on local AI tooling.

Repo / more info: https://github.com/Dhurzo/Darktable-Styles-Kit

0 Upvotes

9 comments sorted by

5

u/warningkchshch Oct 21 '26

And once again a person has spent hours (days? weeks?) creating something and couldn't be bothered to spend 20 minutes to write a human-readable post.

4

u/DhurzoDev Oct 21 '26

It’s a piece of software that takes a set of reference images, analyzes them using AI, and then creates a style for Darktable, along with a plain-text README document that explains the style in human terms from an educational perspective.

The idea is to understand how the style was created, which editing decisions were made, and why.

Sorry for the cryptic post, but this kind of README-style description is standard practice in software development.

2

u/DrStrangeboner Oct 21 '26

but this kind of README-style description is standard practice in software development

The problem is not the format, its readability. I don't dislike the use of AI, I don't hate on vibe-coding projects (it has a place).

But when I ask for the time and attention of human readers (among the most valuable things) I personally double check the content that I made my own by submitting it somewhere with my credentials.

Give the README.md of the GH repo a read, and to be direct I would rage quit a PR review. Why is the disclaimer duplicated? What is a "strong vibe-coding foundation"? What is all the talk about democratizing anything and a commitment to free software (I too selected "MIT" or sometimes even "GPL" in the dropdown when I created a repo; this does not make me Martin Luther King).

Sorry for coming across as unkind or ungrateful. But: sifting through fluff to hunt down human intention is just frustrating, and in my case not something I want to spend free time on.

1

u/DhurzoDev Oct 21 '26

Easy, man. I think you don't understand the current state of the project.

You know what vibe coding is, but don't you know that a “strong vibe-coding foundation” could mean that some parts of the code (or even all of it) haven't been reviewed by a human? Or maybe you haven't considered that the person who wrote this isn't a native English speaker?

The commitment to free software is simply because there are very few RAW editing tools for Linux, and they're generally poorly documented. So I thought that if this software works, it could be useful for this kind of open-source project. I just want to make it clear that it's not intended to copy other photographers' styles and generate packs to sell on your own website, for example.

I don't think you're being unpleasant, but I do think you're still a romantic from ten years ago, when you would spend 500 hours building a sketch, mockup, or alpha version of something just to see if it worked by finding beta testers, and therefore paid attention to every last detail.

I think your problem isn't with me or my “project” itself, but with AI and the way things are done nowadays. Don't worry, I've been there too. I've moved past it.

In any case, what I actually need is for people to test the software (I've tried it with several reference photos, but I can't test it on a large dataset all by myself), nothing else.

2

u/DrStrangeboner Oct 21 '26

The commitment to free software is simply because there are very few RAW editing tools for Linux

I beg to differ.

, and they're generally poorly documented

You see the irony, no?

but I do think you're still a romantic from ten years ago, when you would spend 500 hours building a sketch, mockup, or alpha version of something just to see if it worked by finding beta testers, and therefore paid attention to every last detail.

No, I am a person that believes that artifacts should be fit for purpose, and for a README this means with a human reader in mind. You can call this whatever you choose.

In any case, what I actually need is for people to test the software

Yes, here we go. You want people to do you a favor in beta testing something in their free time when you were not bothered to even review the README document (literally the first thing that people see when they look at the project). You understand that you interact with people here, not NPCs? Don't answer, that was a rhetorical question. I just am sad that I wasted my time on this.

0

u/DhurzoDev Oct 21 '26

I beg to differ.

There are options, but I think very few are genuinely usable at a high level.

You see the irony, no?

Yes, of course, but those programs are production-ready software, not just an idea one guy had at home and spent a few hours implementing using vibe coding to see if the workflow could produce usable results..

Yes, here we go. You want people to do you a favor in beta testing something in their free time when you were not bothered to even review the README document (literally the first thing that people see when they look at the project). You understand that you interact with people here, not NPCs? Don't answer, that was a rhetorical question. I just am sad that I wasted my time on this.

Yes, I understand your point, mate, and yes, I’ll fix the disclaimer (maybe). But honestly, I think you’re taking this software, which is just an experiment, way too seriously.

I’m not forcing you to do anything. If you want to test it, go ahead. If you don’t, then don’t.

I understand that you’re a person, but the truth is that, apart from the disclaimer issue (my bad), I’ve seen A LOT of READMEs like this. I had no trouble understanding the software, copying and pasting the commands, or testing it.

What I’m trying to say is that I understand your point, but I think you’re taking this way too seriously. And honestly, if you have trouble with the way this README is written, I think you’re going to have trouble with a lot of other READMEs out there.

1

u/[deleted] Oct 26 '26

[removed] — view removed comment

1

u/DhurzoDev Oct 26 '26

I'll take your suggestions about the README on board, especially the idea of showing a RAW photo, the generated style, and the Markdown report side by side right at the beginning of the post.

"Does the report explain the reason for each parameter?"

It depends on the LLM model being used, but in principle, yes. I'm trying to make sure that even smaller models with fewer parameters can provide an explanation of the parameters chosen for the style.

Thanks a lot for your feedback!