As an admin, I want to decide exactly when each vision model runs (while indexing, after indexing, on demand, etc.) so that I can balance indexing/import speed against richer AI-driven metadata.
- Adds new Run scheduling property to vision models (auto, manual, on-index, newly-indexed, on-demand, on-schedule, always, never) and wired backend components (VisionModelShouldRun, indexer, metadata worker) to respect it.
- Updates the intelligence specs and Ollama guides with guidance on the new run modes, recommending Run: newly-indexed for slower external providers and documenting Run: on-index for fast local models.
Each entry in vision.yml may define Run: <mode> to control when PhotoPrism executes the model. Supported values map to the contexts shown below (case-insensitive aliases such as auto, on-index, after-index, etc. resolve to the same internal constants):
Run value |
Description |
Triggered during |
auto (default) |
Chooses a sensible default per model type. Built-in defaults (Nasnet, NSFW, Facenet, Caption) run while indexing; custom or external models run after indexing via the metadata worker. |
Manual CLI, scheduled/metadata contexts, plus on-index for default models only |
manual |
Only runs when invoked explicitly via CLI/API (photoprism vision run …). |
Manual |
on-index |
Runs during the main indexing pipeline in addition to manual invocations. Recommended only for fast, local models to avoid slowing imports. |
Manual, on-index |
newly-indexed |
Runs after indexing completes (metadata worker) as well as manual invocations. |
Manual, metadata (“newly indexed”) |
on-demand |
Runs when explicitly requested (manual), via the metadata worker, and during background scheduled jobs. |
Manual, metadata, scheduled |
on-schedule |
Runs during scheduled background jobs and manual invocations; skips on-index and immediate post-index execution. |
Manual, scheduled |
always |
Runs in every context except when explicitly suppressed (equivalent to enabling manual, on-index, metadata, and scheduled execution). |
Manual, on-index, metadata, scheduled |
never |
Disables the model without removing it from the configuration. |
— |
Related Issues:
As an admin, I want to decide exactly when each vision model runs (while indexing, after indexing, on demand, etc.) so that I can balance indexing/import speed against richer AI-driven metadata.
Each entry in
vision.ymlmay defineRun: <mode>to control when PhotoPrism executes the model. Supported values map to the contexts shown below (case-insensitive aliases such asauto,on-index,after-index, etc. resolve to the same internal constants):Runvalueauto(default)manualphotoprism vision run …).on-indexnewly-indexedon-demandon-schedulealwaysneverRelated Issues: