Skip to content

Commit

Permalink
Update gguf-py/gguf/gguf_writer.py
Browse files Browse the repository at this point in the history
Co-authored-by: compilade <[email protected]>
  • Loading branch information
christianazinn and compilade authored Jun 10, 2024
1 parent 7eea552 commit 99f9a24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gguf-py/gguf/gguf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def write_tensors_to_file(self, *, progress: bool = False) -> None:
shard_bar = tqdm(desc=f"Shard (1/{len(self.fout)})", total=total_bytes, unit="byte", unit_scale=True)

for i, (fout, tensors) in enumerate(zip(self.fout, self.tensors)):
if shard_bar and len(self.fout) > 1:
if shard_bar is not None:
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
Expand Down

0 comments on commit 99f9a24

Please sign in to comment.