mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
urlretrieve against the HuggingFace CDN was consistently returning HTTP 504 in GitHub Actions runners for LaMa, NAFNet, and the OpenCV caffemodel. The huggingface_hub library has built-in retry logic, resumable downloads, and better CDN routing than bare urlretrieve. - download_lama_model: urlretrieve → hf_hub_download (Carve/LaMa-ONNX) - download_nafnet_model: urlretrieve → hf_hub_download (mikestealth/nafnet-models) - download_opencv_colorize_models: caffemodel → hf_hub_download (space repo_type) - _urlretrieve: retry count 3→5, flat 10s delay → exponential backoff (10/20/40/80s) - Also reverts the SKIP_MODEL_DOWNLOADS=true from CI workflow (wrong approach)