gguf.py : dont add empty strings
This commit is contained in:
parent
a7d226f871
commit
5c5a95ba2d
1 changed files with 1 additions and 0 deletions
1
gguf.py
1
gguf.py
|
@ -114,6 +114,7 @@ class GGUFWriter:
|
||||||
self.add_val(val, GGUFValueType.BOOL)
|
self.add_val(val, GGUFValueType.BOOL)
|
||||||
|
|
||||||
def add_string(self, key: str, val: str):
|
def add_string(self, key: str, val: str):
|
||||||
|
if len(val) == 0: return
|
||||||
self.add_key(key)
|
self.add_key(key)
|
||||||
self.add_val(val, GGUFValueType.STRING)
|
self.add_val(val, GGUFValueType.STRING)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue