From b99bea3c69d997d7d8988b2fcd5def1173e306ea Mon Sep 17 00:00:00 2001 From: Nikita Skakun Date: Thu, 30 Mar 2023 23:11:59 -0700 Subject: [PATCH] Fixed reported header affecting resuming download --- download-model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download-model.py b/download-model.py index 8e3f2e8b..75b031bd 100644 --- a/download-model.py +++ b/download-model.py @@ -34,7 +34,7 @@ def get_file(url, output_folder): output_path = output_folder / filename if output_path.exists() and not args.clean: # Check if the file has already been downloaded completely - r = requests.head(url) + r = requests.get(url, stream=True) total_size = int(r.headers.get('content-length', 0)) if output_path.stat().st_size >= total_size: return