Fixed the ZeroDivisionError when downloading a model (#2797)
This commit is contained in:
parent
90be1d9fe1
commit
89fb6f9236
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ class ModelDownloader:
|
|||
for data in r.iter_content(block_size):
|
||||
t.update(len(data))
|
||||
f.write(data)
|
||||
if self.progress_bar is not None:
|
||||
if total_size != 0 and self.progress_bar is not None:
|
||||
count += len(data)
|
||||
self.progress_bar(float(count) / float(total_size), f"Downloading {filename}")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue