From d2deff2aa358dc9c693688416dfc4d7f68ecc2dd Mon Sep 17 00:00:00 2001 From: Radionic Date: Wed, 8 Nov 2023 14:49:57 +0800 Subject: [PATCH] feat: download sam_vit_h by default --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 50c5e80..1fcb5a2 100644 --- a/__init__.py +++ b/__init__.py @@ -53,7 +53,7 @@ def download_sam_model(): add_model_folder_path("sams", model_dir) files = get_filename_list("sams") - if len(files) == 0: + if "sam_vit_h_4b8939.pth" not in files: print("Downloading sam model...") url = "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth" response = requests.get(url, stream=True)