[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
5603ced75f
commit
851cb2af68
1 changed files with 5 additions and 1 deletions
|
|
@ -649,7 +649,11 @@ async def get_gguf_download_progress(
|
|||
break
|
||||
|
||||
total_progress_bytes = downloaded_bytes + in_progress_bytes
|
||||
progress = min(total_progress_bytes / expected_bytes, 0.99) if expected_bytes > 0 else 0
|
||||
progress = (
|
||||
min(total_progress_bytes / expected_bytes, 0.99)
|
||||
if expected_bytes > 0
|
||||
else 0
|
||||
)
|
||||
# Only report 1.0 when all bytes are in completed files (not in-progress)
|
||||
if expected_bytes > 0 and downloaded_bytes >= expected_bytes:
|
||||
progress = 1.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue