diff --git a/app.py b/app.py index 1bf9d60..6ec8be2 100644 --- a/app.py +++ b/app.py @@ -166,4 +166,4 @@ with gr.Blocks() as demo: ] ) -demo.launch(debug=False, show_error=True, max_threads=1) +demo.launch(debug=False, show_error=True) diff --git a/utils/florence.py b/utils/florence.py index 265f4e2..9887f44 100644 --- a/utils/florence.py +++ b/utils/florence.py @@ -7,7 +7,7 @@ from PIL import Image from transformers import AutoModelForCausalLM, AutoProcessor from transformers.dynamic_module_utils import get_imports -FLORENCE_CHECKPOINT = "microsoft/Florence-2-large" +FLORENCE_CHECKPOINT = "microsoft/Florence-2-base" FLORENCE_OBJECT_DETECTION_TASK = '' FLORENCE_DETAILED_CAPTION_TASK = '' FLORENCE_CAPTION_TO_PHRASE_GROUNDING_TASK = '' diff --git a/utils/sam.py b/utils/sam.py index 562cc56..74ebad2 100644 --- a/utils/sam.py +++ b/utils/sam.py @@ -7,8 +7,8 @@ from PIL import Image from sam2.build_sam import build_sam2 from sam2.sam2_image_predictor import SAM2ImagePredictor -SAM_CHECKPOINT = "checkpoints/sam2_hiera_large.pt" -SAM_CONFIG = "sam2_hiera_l.yaml" +SAM_CHECKPOINT = "checkpoints/sam2_hiera_small.pt" +SAM_CONFIG = "sam2_hiera_s.yaml" def load_sam_model(