Model Weights Download
How the inference package downloads and caches model weights, how to configure a persistent cache directory, and how to pre-download weights.
Overview
Cache location
import os
# Set to a persistent directory (not /tmp)
os.environ["MODEL_CACHE_DIR"] = "/home/user/.roboflow/cache"
from inference import get_model
# ... rest of your codeNative Python API
Pre-downloading weights
Running inference
Best practices
Troubleshooting
Weights disappear after reboot
Model not found error
Permission issues
Last updated
Was this helpful?