fix join license list
This commit is contained in:
parent
edf2583fbc
commit
7d5e0c0063
2 changed files with 4 additions and 3 deletions
|
@ -236,8 +236,6 @@ class GGUFWriter:
|
|||
kv_bytes = bytearray()
|
||||
|
||||
for key, val in kv_data.items():
|
||||
if key == "general.license" and isinstance(val.value, list):
|
||||
val.value = ",".join(val.value)
|
||||
kv_bytes += self._pack_val(key, GGUFValueType.STRING, add_vtype=False)
|
||||
kv_bytes += self._pack_val(val.value, val.type, add_vtype=True)
|
||||
|
||||
|
|
|
@ -458,7 +458,10 @@ class Metadata:
|
|||
gguf_writer.add_size_label(self.size_label)
|
||||
|
||||
if self.license is not None:
|
||||
gguf_writer.add_license(self.license)
|
||||
if isinstance(self.license, list):
|
||||
gguf_writer.add_license(",".join(self.license))
|
||||
else:
|
||||
gguf_writer.add_license(self.license)
|
||||
if self.license_name is not None:
|
||||
gguf_writer.add_license_name(self.license_name)
|
||||
if self.license_link is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue