From 6249996cdb101cbbafba6beda8bbb4dc55fbd78d Mon Sep 17 00:00:00 2001 From: Mert <101130780+mertalev@users.noreply.github.com> Date: Mon, 1 Dec 2025 21:26:01 -0500 Subject: [PATCH] fix(ml): do not upscale preview (#24322) do not upscale --- machine-learning/immich_ml/models/ocr/detection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/machine-learning/immich_ml/models/ocr/detection.py b/machine-learning/immich_ml/models/ocr/detection.py index 4101a5c6f7..d34a51684e 100644 --- a/machine-learning/immich_ml/models/ocr/detection.py +++ b/machine-learning/immich_ml/models/ocr/detection.py @@ -82,6 +82,7 @@ class TextDetector(InferenceModel): ratio = float(self.max_resolution) / img.height else: ratio = float(self.max_resolution) / img.width + ratio = min(ratio, 1.0) resize_h = int(img.height * ratio) resize_w = int(img.width * ratio)