From 7703ae07a9671558716864d1f4e1909614a3e295 Mon Sep 17 00:00:00 2001 From: Billy Cao Date: Sun, 27 Oct 2024 14:52:59 +0800 Subject: [PATCH] Add torch.inference mode --- utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.py b/utils.py index 75d4d3a..b56588e 100755 --- a/utils.py +++ b/utils.py @@ -64,6 +64,7 @@ def get_yolo_model(model_path): return model +@torch.inference_mode() def get_parsed_content_icon(filtered_boxes, ocr_bbox, image_source, caption_model_processor, prompt=None): to_pil = ToPILImage() if ocr_bbox: