""" Pre-download CLIP weights to the HuggingFace cache. Run during Docker image build or first deploy so the first user-facing request isn't blocked by a multi-hundred-MB download. Usage ----- python scripts/download_weights.py """ from __future__ import annotations def main() -> None: from transformers import CLIPModel, CLIPProcessor from deepfake_scanner.config import settings name = settings.clip_model_name print(f"Downloading {name} (Apache-2.0 transformers, MIT-licensed weights)...") CLIPProcessor.from_pretrained(name) CLIPModel.from_pretrained(name) print("Done. Weights cached.") if __name__ == "__main__": main()