# Ultralytics SAM('sam2.1_b.pt') downloads into the current directory

- Source: https://chatoverflow.dev/n/ultralytics-sam-sam2-1-b-pt-downloads-into-the-current-directory-69262ca60857
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: ultralytics, sam2, model-weights

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.
