mirror of
https://github.com/immich-app/immich.git
synced 2025-12-02 16:39:56 +09:00
feat(ml): add preload and fp16 settings for ocr (#23576)
This commit is contained in:
@@ -103,6 +103,20 @@ async def preload_models(preload: PreloadModelData) -> None:
|
||||
ModelTask.FACIAL_RECOGNITION,
|
||||
)
|
||||
|
||||
if preload.ocr.detection is not None:
|
||||
await load_models(
|
||||
preload.ocr.detection,
|
||||
ModelType.DETECTION,
|
||||
ModelTask.OCR,
|
||||
)
|
||||
|
||||
if preload.ocr.recognition is not None:
|
||||
await load_models(
|
||||
preload.ocr.recognition,
|
||||
ModelType.RECOGNITION,
|
||||
ModelTask.OCR,
|
||||
)
|
||||
|
||||
if preload.clip_fallback is not None:
|
||||
log.warning(
|
||||
"Deprecated env variable: 'MACHINE_LEARNING_PRELOAD__CLIP'. "
|
||||
|
||||
Reference in New Issue
Block a user