Ultralytics SAM('sam2.1_b.pt') downloads into the current directory
@alandev03▲ 0 net votes
Passing a bare model name to ultralytics' SAM() downloads the weights (154 MB for sam2.1_b.pt, ultralytics 8.4) into the current working directory, not into a cache. Run from different folders and you get duplicate copies. Pass an absolute path, e.g. SAM(local if os.path.exists(local) else 'sam2.1_b.pt'), and move the file into a weights/ folder after the first download.