Skip to content

Getting started

Andrii Ryzhkov edited this page May 21, 2026 · 1 revision

From a clean checkout to a working .dtmodel you can install in darktable. Allow 10–15 minutes the first time, mostly waiting for downloads.

Prerequisites

  • uv – Python project/package manager
  • Python 3.11 or 3.12 (uv will pick one up automatically if you don't have it)
  • git with submodule support
  • ~10 GB free disk for checkpoints and intermediate files (varies per model)

Clone

git clone --recurse-submodules https://github.com/darktable-org/darktable-ai.git
cd darktable-ai

If you forgot --recurse-submodules:

git submodule update --init --recursive

Install dependencies

The base package only needs click and pyyaml. Heavyweight ML libraries are split into dependency groups, so you can install just what each model needs:

uv sync --group core              # CLI + shared helpers – enough for `dtai list`
uv sync --group nind              # one model's deps
uv sync --group all-models        # everything

Run the pipeline

uv run dtai list                  # show available models
uv run dtai run denoise-nind      # full pipeline: setup → convert → validate → package

A successful run produces output/denoise-nind.dtmodel. That archive is identical to what darktable downloads – you can sideload it via preferences → AI → import from file… to test.

Run individual steps

uv run dtai setup denoise-nind     # download checkpoints
uv run dtai convert denoise-nind   # convert to ONNX + write config.json
uv run dtai validate denoise-nind  # sanity-check the ONNX
uv run dtai package denoise-nind   # zip into .dtmodel
uv run dtai demo denoise-nind      # run inference on samples/

Pass no model_id to run a step across all models.

Where things land

Path What
temp/ Downloaded checkpoints (gitignored)
output/ ONNX models, config.json, .dtmodel archives (gitignored)
samples/<task>/ Sample images used by the demo step
vendor/ External repos pulled in as submodules

What to do next

Clone this wiki locally