mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 17:29:22 +01:00
Fixed the ZeroDivisionError when downloading a model (#2797)
This commit is contained in:
parent
90be1d9fe1
commit
89fb6f9236
@ -149,7 +149,7 @@ class ModelDownloader:
|
|||||||
for data in r.iter_content(block_size):
|
for data in r.iter_content(block_size):
|
||||||
t.update(len(data))
|
t.update(len(data))
|
||||||
f.write(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)
|
count += len(data)
|
||||||
self.progress_bar(float(count) / float(total_size), f"Downloading {filename}")
|
self.progress_bar(float(count) / float(total_size), f"Downloading {filename}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user