Skip to content

Commit

Permalink
fix general.license list to str
Browse files Browse the repository at this point in the history
  • Loading branch information
mmnga committed Oct 9, 2024
1 parent 3dc48fe commit 0c18d21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gguf-py/gguf/gguf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ def write_kv_data_to_file(self) -> None:
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)

Expand Down

0 comments on commit 0c18d21

Please sign in to comment.