immich_machine_learning | [11/16/25 21:36:20] INFO Downloading detection model 'PP-OCRv5_mobile' to immich_machine_learning | /cache/ocr/PP-OCRv5_mobile/detection/model.onnx. immich_machine_learning | This may take a while. immich_machine_learning | [11/16/25 21:36:20] INFO Initiating download: immich_machine_learning | https://www.modelscope.cn/models/RapidAI/RapidOCR/r immich_machine_learning | esolve/v3.4.0/onnx/PP-OCRv5/det/ch_PP-OCRv5_mobile_ immich_machine_learning | det.onnx immich_machine_learning | [11/16/25 21:36:23] INFO Download size: 4.60MB immich_machine_learning | [11/16/25 21:36:23] INFO Successfully saved to: immich_machine_learning | /cache/ocr/PP-OCRv5_mobile/detection/model.onnx immich_machine_learning | [11/16/25 21:36:23] INFO Loading detection model 'PP-OCRv5_mobile' to memory immich_machine_learning | [11/16/25 21:36:24] INFO Setting execution providers to immich_machine_learning | ['OpenVINOExecutionProvider', immich_machine_learning | 'CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [11/16/25 21:36:25] INFO Downloading recognition model 'PP-OCRv5_mobile' to immich_machine_learning | /cache/ocr/PP-OCRv5_mobile/recognition/model.onnx. immich_machine_learning | This may take a while. immich_machine_learning | [11/16/25 21:36:25] INFO Initiating download: immich_machine_learning | https://www.modelscope.cn/models/RapidAI/RapidOCR/r immich_machine_learning | esolve/v3.4.0/onnx/PP-OCRv5/rec/ch_PP-OCRv5_rec_mob immich_machine_learning | ile_infer.onnx immich_machine_learning | [11/16/25 21:36:26] INFO Download size: 15.86MB immich_machine_learning | [11/16/25 21:36:28] INFO Successfully saved to: immich_machine_learning | /cache/ocr/PP-OCRv5_mobile/recognition/model.onnx immich_machine_learning | [11/16/25 21:36:28] INFO Loading recognition model 'PP-OCRv5_mobile' to immich_machine_learning | memory immich_machine_learning | [11/16/25 21:36:28] INFO Setting execution providers to immich_machine_learning | ['OpenVINOExecutionProvider', immich_machine_learning | 'CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [11/16/25 21:36:29] INFO Using engine_name: onnxruntime immich_redis | 1:M 16 Nov 2025 21:36:39.060 * 10000 changes in 60 seconds. Saving... immich_redis | 1:M 16 Nov 2025 21:36:39.061 * Background saving started by pid 31 immich_redis | 31:C 16 Nov 2025 21:36:39.114 * DB saved on disk immich_redis | 31:C 16 Nov 2025 21:36:39.115 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB immich_redis | 1:M 16 Nov 2025 21:36:39.161 * Background saving terminated with success immich_machine_learning | [11/16/25 21:36:59] ERROR Exception in ASGI application immich_machine_learning | immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮ immich_machine_learning | │ /usr/src/immich_ml/main.py:177 in predict │ immich_machine_learning | │ │ immich_machine_learning | │ 174 │ │ inputs = text │ immich_machine_learning | │ 175 │ else: │ immich_machine_learning | │ 176 │ │ raise HTTPException(400, "Either │ immich_machine_learning | │ ❱ 177 │ response = await run_inference(inputs │ immich_machine_learning | │ 178 │ return ORJSONResponse(response) │ immich_machine_learning | │ 179 │ immich_machine_learning | │ 180 │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/immich_ml/main.py:204 in run_inference │ immich_machine_learning | │ │ immich_machine_learning | │ 201 │ without_deps, with_deps = entries │ immich_machine_learning | │ 202 │ await asyncio.gather(*[_run_inference │ immich_machine_learning | │ 203 │ if with_deps: │ immich_machine_learning | │ ❱ 204 │ │ await asyncio.gather(*[_run_infer │ immich_machine_learning | │ 205 │ if isinstance(payload, Image): │ immich_machine_learning | │ 206 │ │ response["imageHeight"], response │ immich_machine_learning | │ 207 │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/immich_ml/main.py:197 in │ immich_machine_learning | │ _run_inference │ immich_machine_learning | │ │ immich_machine_learning | │ 194 │ │ │ │ message = f"Task {entry[' │ immich_machine_learning | │ output of {dep}" │ immich_machine_learning | │ 195 │ │ │ │ raise HTTPException(400, │ immich_machine_learning | │ 196 │ │ model = await load(model) │ immich_machine_learning | │ ❱ 197 │ │ output = await run(model.predict, │ immich_machine_learning | │ 198 │ │ outputs[model.identity] = output │ immich_machine_learning | │ 199 │ │ response[entry["task"]] = output │ immich_machine_learning | │ 200 │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/immich_ml/main.py:215 in run │ immich_machine_learning | │ │ immich_machine_learning | │ 212 │ if thread_pool is None: │ immich_machine_learning | │ 213 │ │ return func(*args, **kwargs) │ immich_machine_learning | │ 214 │ partial_func = partial(func, *args, * │ immich_machine_learning | │ ❱ 215 │ return await asyncio.get_running_loop │ immich_machine_learning | │ 216 │ immich_machine_learning | │ 217 │ immich_machine_learning | │ 218 async def load(model: InferenceModel) -> │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/local/lib/python3.11/concurrent/futures/th │ immich_machine_learning | │ read.py:58 in run │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/immich_ml/models/base.py:60 in predict │ immich_machine_learning | │ │ immich_machine_learning | │ 57 │ │ self.load() │ immich_machine_learning | │ 58 │ │ if model_kwargs: │ immich_machine_learning | │ 59 │ │ │ self.configure(**model_kwargs │ immich_machine_learning | │ ❱ 60 │ │ return self._predict(*inputs) │ immich_machine_learning | │ 61 │ │ immich_machine_learning | │ 62 │ @abstractmethod │ immich_machine_learning | │ 63 │ def _predict(self, *inputs: Any, **mo │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/immich_ml/models/ocr/recognition.py:72 │ immich_machine_learning | │ in _predict │ immich_machine_learning | │ │ immich_machine_learning | │ 69 │ │ boxes, box_scores = texts["boxes" │ immich_machine_learning | │ 70 │ │ if boxes.shape[0] == 0: │ immich_machine_learning | │ 71 │ │ │ return self._empty │ immich_machine_learning | │ ❱ 72 │ │ rec = self.model(TextRecInput(img │ immich_machine_learning | │ 73 │ │ if rec.txts is None: │ immich_machine_learning | │ 74 │ │ │ return self._empty │ immich_machine_learning | │ 75 │ immich_machine_learning | │ │ immich_machine_learning | │ /opt/venv/lib/python3.11/site-packages/rapidocr │ immich_machine_learning | │ /ch_ppocr_rec/main.py:134 in __call__ │ immich_machine_learning | │ │ immich_machine_learning | │ 131 │ │ │ │ │ rec_res[indices[beg_i │ immich_machine_learning | │ 132 │ │ │ │ │ continue │ immich_machine_learning | │ 133 │ │ │ │ │ immich_machine_learning | │ ❱ 134 │ │ │ │ rec_res[indices[beg_img_n │ immich_machine_learning | │ 135 │ │ │ immich_machine_learning | │ 136 │ │ all_line_results, all_word_result │ immich_machine_learning | │ 137 │ │ txts, scores = list(zip(*all_line │ immich_machine_learning | ╰─────────────────────────────────────────────────╯ immich_machine_learning | IndexError: index 23 is out of bounds for axis 0 immich_machine_learning | with size 23 immich_server | [Nest] 7 - 11/16/2025, 9:36:59 PM WARN [Microservices:MachineLearningRepository] Machine learning request to "http://immich-machine-learning:3003" failed with status 500: Internal Server Error immich_server | [Nest] 7 - 11/16/2025, 9:36:59 PM LOG [Microservices:MachineLearningRepository] Machine learning server became unhealthy (http://immich-machine-learning:3003). immich_server | [Nest] 7 - 11/16/2025, 9:36:59 PM ERROR [Microservices:{"id":"2aef6272-7f2b-4bdc-a332-dc9c1e75ff98"}] Unable to run job handler (Ocr): Error: Machine learning request '{"ocr":{"detection":{"modelName":"PP-OCRv5_mobile","options":{"minScore":0.5,"maxResolution":736}},"recognition":{"modelName":"PP-OCRv5_mobile","options":{"minScore":0.8}}}}' failed for all URLs immich_server | Error: Machine learning request '{"ocr":{"detection":{"modelName":"PP-OCRv5_mobile","options":{"minScore":0.5,"maxResolution":736}},"recognition":{"modelName":"PP-OCRv5_mobile","options":{"minScore":0.8}}}}' failed for all URLs immich_server | at MachineLearningRepository.predict (/usr/src/app/server/dist/repositories/machine-learning.repository.js:117:15) immich_server | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) immich_server | at async MachineLearningRepository.ocr (/usr/src/app/server/dist/repositories/machine-learning.repository.js:150:26) immich_server | at async OcrService.handleOcr (/usr/src/app/server/dist/services/ocr.service.js:52:28) immich_server | at async JobService.onJobRun (/usr/src/app/server/dist/services/job.service.js:199:30) immich_server | at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:91:13) immich_server | at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.61.2/node_modules/bullmq/dist/cjs/classes/worker.js:528:32 immich_server | [Nest] 7 - 11/16/2025, 9:36:59 PM LOG [Microservices:MachineLearningRepository] Machine learning server became healthy (http://immich-machine-learning:3003).