From 4550826871277e9317914852790ae133672798af Mon Sep 17 00:00:00 2001 From: Christian Zhou-Zheng <59622928+christianazinn@users.noreply.github.com> Date: Mon, 10 Jun 2024 07:55:24 -0400 Subject: [PATCH] Update gguf-py/gguf/gguf_writer.py Co-authored-by: compilade --- gguf-py/gguf/gguf_writer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gguf-py/gguf/gguf_writer.py b/gguf-py/gguf/gguf_writer.py index 9d7db73e0..bda817279 100644 --- a/gguf-py/gguf/gguf_writer.py +++ b/gguf-py/gguf/gguf_writer.py @@ -379,8 +379,7 @@ class GGUFWriter: shard_bar.set_description(f"Shard ({i + 1}/{len(self.fout)})") total = sum(ti.nbytes for ti in tensors.values()) # bar behaves weirdly when total is 0 - if total > 0: - shard_bar.reset(total=total) + shard_bar.reset(total=(total if total > 0 else None)) # relying on the fact that Python dicts preserve insertion order (since 3.7) for ti in tensors.values():