AI analysis

tessera-web can use a vision language model (VLM) to automatically suggest tags for images, videos, and archives. The model looks at the file and returns a list of descriptive tags.

Setup

You need an OpenAI-compatible chat endpoint that supports vision (image input). Ollama with a model like llava, llava-phi3, or minicpm-v works well locally:

ollama pull llava-phi3
ollama serve

Or use any other OpenAI-compatible endpoint (OpenAI API, LM Studio, llama.cpp server, etc.).

Configuring the AI endpoint

Open Settings → Features and fill in:

FieldExample
AI endpointhttp://localhost:11434
AI modelllava-phi3
Tag prefixai/ (optional — keeps AI-generated tags namespaced)
Collection descriptionMy personal photo library (optional context for the model)

Analysing a file

Open a file in the detail panel and click Analyse with AI. The model receives a (resized) JPEG of the file and returns a list of suggested tags. Review the suggestions, then click Apply to add them, or dismiss the panel to ignore them.

What the model receives

File typeInput sent to model
ImageResized JPEG (max 1024 px)
VideoSprite sheet (contact sheet of frames)
Comic/archiveBounded multi-page overview sampled across the archive
EPUBExtracted plain text

Batch analysis

In Settings → Features, click Analyse all files to run AI analysis on every unanalysed file in the database. A progress indicator shows the status.

Previously analysed files are skipped (their ai/* tags are already present). Use the Re-analyse option to force re-analysis.

Clearing AI tags

To remove all tags with the configured AI prefix from a file or from the entire database, use the Clear AI tags button in the settings or detail panel.

Customising the prompts

Advanced users can override the prompts used for image, video, and archive analysis in Settings → Features:

  • Image prompt — instructions for single-image analysis
  • Video prompt — instructions for sprite-sheet (video) analysis
  • Archive prompt — instructions for archive (cover + listing) analysis

The model always responds in structured JSON regardless of the prompt; the prompt controls what aspects to focus on. Suggested tags may carry an explicit subject, which Tessera preserves as structured subject metadata rather than encoding it into the tag text.