Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tastelikefeet committed Sep 10, 2024
1 parent fcb5f9b commit 8f1e0df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modelscope/hub/file_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def http_get_model_file(
with open(temp_file_path, 'rb') as f:
partial_length = f.seek(0, io.SEEK_END)
progress.update(partial_length)
if partial_length >= file_size:
if partial_length >= file_size > 0:
break
# closed range[], from 0.
get_headers['Range'] = 'bytes=%s-%s' % (partial_length,
Expand Down

0 comments on commit 8f1e0df

Please sign in to comment.