mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04: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):
|
||||
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…
Reference in New Issue
Block a user