HuggingFace:Hub
lastmod 2024-05-08created 2024-05-081 edits
Download checkpoints
Install the package:
Then download:
from huggingface_hub import hf_hub_download
chkpt_path = hf_hub_download("ybelkada/segment-anything", "checkpoints/sam_vit_b_01ec64.pth")
If the file already exists, it is not downloaded again. The checkpoint file path is returned as a string in the chkpt_path variable.