Add torch.inference mode

This commit is contained in:
Billy Cao
2024-10-27 14:52:59 +08:00
committed by GitHub
parent d7708e830a
commit 7703ae07a9

View File

@@ -64,6 +64,7 @@ def get_yolo_model(model_path):
return model return model
@torch.inference_mode()
def get_parsed_content_icon(filtered_boxes, ocr_bbox, image_source, caption_model_processor, prompt=None): def get_parsed_content_icon(filtered_boxes, ocr_bbox, image_source, caption_model_processor, prompt=None):
to_pil = ToPILImage() to_pil = ToPILImage()
if ocr_bbox: if ocr_bbox: