[PR #23576] [MERGED] feat(ml): add preload and fp16 settings for ocr #17564

Closed
opened 2026-02-05 16:24:00 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/23576
Author: @mertalev
Created: 11/4/2025
Status: Merged
Merged: 11/6/2025
Merged by: @mertalev

Base: mainHead: feat/ml-ov-ocr


📝 Commits (10+)

📊 Changes

6 files changed (+109 additions, -30 deletions)

View changed files

📝 docs/docs/install/environment-variables.md (+25 -23)
📝 machine-learning/immich_ml/config.py (+9 -0)
📝 machine-learning/immich_ml/main.py (+14 -0)
📝 machine-learning/immich_ml/schemas.py (+5 -0)
📝 machine-learning/immich_ml/sessions/ort.py (+5 -3)
📝 machine-learning/test_main.py (+51 -4)

📄 Description

Description

This PR lets users load OCR models in advance at server startup like for other tasks. This can be particularly useful for OpenVINO, which has a resource-intensive compilation step.

It also adds a setting to use FP16 precision for OpenVINO. This can substantially lower memory usage and processing time for a very slight effect on quality.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/23576 **Author:** [@mertalev](https://github.com/mertalev) **Created:** 11/4/2025 **Status:** ✅ Merged **Merged:** 11/6/2025 **Merged by:** [@mertalev](https://github.com/mertalev) **Base:** `main` ← **Head:** `feat/ml-ov-ocr` --- ### 📝 Commits (10+) - [`96442b4`](https://github.com/immich-app/immich/commit/96442b4de417b594c552eb877691635cf1bb2214) add settings - [`4310221`](https://github.com/immich-app/immich/commit/4310221711f385d221c614b61c08fe8306a74d81) formatting - [`1037ab5`](https://github.com/immich-app/immich/commit/1037ab544391b0bc6af7e7212d08eb88cf4c1004) cache capacity setting - [`b9984f6`](https://github.com/immich-app/immich/commit/b9984f69938dc7dbaf72f28adc7cf72e5d9873a2) update tests - [`6779ab9`](https://github.com/immich-app/immich/commit/6779ab9e8a10123a46156770d2d4819534080780) add test for fp16 - [`e9236e6`](https://github.com/immich-app/immich/commit/e9236e6fe26ad9a3ef6cad7ebb6a9c8b29173b9e) formatting - [`a5e39ad`](https://github.com/immich-app/immich/commit/a5e39adecfe27473f2fc632b3824a097bc51013a) leave cache capacity change for separate pr - [`4710c8a`](https://github.com/immich-app/immich/commit/4710c8a22fd26b435f8112f85a6aa97af10bed07) Update environment-variables.md - [`29efbc0`](https://github.com/immich-app/immich/commit/29efbc095bdf2f63ea9d5fb02154652977b578b2) Update environment-variables.md - [`bc88c90`](https://github.com/immich-app/immich/commit/bc88c904db07ec260d029059afcb7bfb8484ce68) formatting ### 📊 Changes **6 files changed** (+109 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `docs/docs/install/environment-variables.md` (+25 -23) 📝 `machine-learning/immich_ml/config.py` (+9 -0) 📝 `machine-learning/immich_ml/main.py` (+14 -0) 📝 `machine-learning/immich_ml/schemas.py` (+5 -0) 📝 `machine-learning/immich_ml/sessions/ort.py` (+5 -3) 📝 `machine-learning/test_main.py` (+51 -4) </details> ### 📄 Description ## Description This PR lets users load OCR models in advance at server startup like for other tasks. This can be particularly useful for OpenVINO, which has a resource-intensive compilation step. It also adds a setting to use FP16 precision for OpenVINO. This can substantially lower memory usage and processing time for a very slight effect on quality. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 16:24:00 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#17564