From 5c5a95ba2dab6cdece5c5640056e3ed35f14074b Mon Sep 17 00:00:00 2001 From: klosax <131523366+klosax@users.noreply.github.com> Date: Mon, 14 Aug 2023 11:22:06 +0200 Subject: [PATCH] gguf.py : dont add empty strings --- gguf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gguf.py b/gguf.py index de3e5bbfb..18f42267a 100644 --- a/gguf.py +++ b/gguf.py @@ -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)