Update gguf-py/gguf/gguf_writer.py

Co-authored-by: compilade <git@compilade.net>
This commit is contained in:
Christian Zhou-Zheng 2024-06-10 07:54:50 -04:00 committed by GitHub
parent 99f9a24805
commit ad02c9409a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -396,7 +396,6 @@ class GGUFWriter:
else: else:
self.temp_file.seek(0) self.temp_file.seek(0)
assert self.fout is not None
shutil.copyfileobj(self.temp_file, self.fout[0 if not self.small_first_shard else 1]) shutil.copyfileobj(self.temp_file, self.fout[0 if not self.small_first_shard else 1])
self.flush() self.flush()
self.temp_file.close() self.temp_file.close()