Models:
- Type: nsfw
  Name: Nsfw
  Resolution: 224
  Tags:
  - serve
- Type: face
  Name: FaceNet
  Resolution: 160
  Tags:
  - serve
- Type: caption
  Model: gemma4:26b
  Engine: ollama
  Run: auto
  System: |
    You write helpful captions for a personal photo library. Provide the captions both in English and translated to German. The English caption needs to start with "English:", the German with "German: ". Separate the two sentences by a newline. Omit text formatting and avoid any meta-language or phrases such as "This picture," "The picture," "The photo," "There are," "Here is," or "A picture of".
  Prompt: |
    Write a brief, journalistic and unemotional description of the image in a single sentence. If the picture is black and white, then mention it and don't talk about colors, but contrasts.
  Options:
    Seed: 3407           # model default
    Temperature: 0.25    # reduce randomness for fewer hallucinations
    TopK: 20             # matches the model's default
    TopP: 0.8            # matches the model's default
    MinP: 0.05           # cut very low-probability, odd tokens
    TypicalP: 1.0        # effectively disabled; TopP/MinP dominate
    RepeatLastN: 64      # short history for 1-2 sentences
    RepeatPenalty: 1.1   # penalty to avoid loops without harming fluency
    NumPredict: 4096
  Service:
    Uri: http://ollama.home:11434/api/generate
    Think: "true"
- Type: labels
  Model: gemma4:26b
  Engine: ollama
  Run: auto
  System: |
    You label photographs for a personal photo library. Users search by visible subjects, scenes, and activities. Output only JSON matching the schema. Each `name` is a lowercase noun or noun phrase in its singular form (use `snake_case` for multi-word concepts). Do not include emoji, punctuation, or descriptive phrases.
  Prompt: |
    Return 5–15 labels covering the most salient visible subjects, the scene/setting, and any clear activity. Order by descending `confidence`. Avoid near-synonyms and hypernyms of labels you already included.
    - `confidence` (0–1): certainty the label is actually present. Use 0.9+ only for unmistakable subjects; 0.3–0.5 for plausible guesses.
    - `topicality` (0–1): how central the label is to the overall image (foreground subject = high; incidental background = low).

    Respond exactly like: {"labels":[{"name":"sunset","confidence":0.72,"topicality":0.64}]}
  Service:
    Uri: http://ollama.home:11434/api/generate
  Options:
    StructuredOutput: true  # Enforce json
    Seed: 3407              # model default, see https://github.com/QwenLM/Qwen3-VL
    Temperature: 0.01       # low randomness, fewer hallucinations
    TopK: 40                # consider only top ~40 tokens
    TopP: 0.9               # cut off tail of distribution
    MinP: 0.05              # drop rare tokens
    TypicalP: 1.0           # effectively off
    RepeatLastN: 128        # look back to prevent repetition
    RepeatPenalty: 1.2      # penalty to avoid simple loops
    NumPredict: 1024        # prevent runaway output
Thresholds:
  Confidence: 10
