mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-06 09:46:50 +00:00
gguf.py : dont add empty strings
This commit is contained in:
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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user