Revert "Downloader: Gracefully handle '416 Range Not Satisfiable' when continuing downloads"

This reverts commit 1aa2b924d2.
This commit is contained in:
oobabooga 2025-10-09 17:22:41 -07:00
parent 0d03813e98
commit bf5d85c922

View file

@ -255,11 +255,6 @@ class ModelDownloader:
mode = 'ab'
with session.get(url, stream=True, headers=headers, timeout=30) as r:
# Assume error 416 (range unsatisfiable) means the download is complete.
# Small size differences can happen in Git LFS
if mode == 'ab' and r.status_code == 416:
break
r.raise_for_status()
total_size_from_stream = int(r.headers.get('content-length', 0))
if mode == 'ab':