gguf.py : dont add empty strings

This commit is contained in:
klosax 2023-08-14 11:22:06 +02:00 committed by GitHub
parent a7d226f871
commit 5c5a95ba2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,7 @@ class GGUFWriter:
self.add_val(val, GGUFValueType.BOOL)
def add_string(self, key: str, val: str):
if len(val) == 0: return
self.add_key(key)
self.add_val(val, GGUFValueType.STRING)