modal-omniparser

A serverless compute port of the OmniParser vision model for the Modal platform.
git clone https://unitehenry.com/git/modal-omniparser.git
Log | Files | Refs | README

commit 38a14bdede3113cd048b411887ed2a8e0404086e
parent bd13947cd9ada850c4958d2c3c1268db8e20feb0
Author: Henry Unite <unitehenry@gmail.com>
Date:   Fri, 13 Mar 2026 18:54:17 +0000

fix: always cleanup

Diffstat:
Msrc/app.py | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/app.py b/src/app.py @@ -74,7 +74,8 @@ def model_to_cuda(): def get_caption_model_processor(): setup() - from util.utils import get_som_labeled_img, check_ocr_box, get_caption_model_processor, get_yolo_model - get_caption_model_processor(model_name="florence2", model_name_or_path="weights/icon_caption_florence", device='cuda') - - cleanup() + try: + from util.utils import get_som_labeled_img, check_ocr_box, get_caption_model_processor, get_yolo_model + get_caption_model_processor(model_name="florence2", model_name_or_path="weights/icon_caption_florence", device='cuda') + finally: + cleanup()