Skip to content

Commit e86fc56

Browse files
authored
Fix gguf-convert-endian script (#4037)
* Fix gguf-convert-endian script * Bump version and update description
1 parent d96ca7d commit e86fc56

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

gguf-py/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "gguf"
3-
version = "0.5.0"
4-
description = "Write ML models in GGUF for GGML"
3+
version = "0.5.1"
4+
description = "Read and write ML models in GGUF for GGML"
55
authors = ["GGML <[email protected]>"]
66
packages = [
77
{include = "gguf"},

gguf-py/scripts/gguf-convert-endian.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def convert_byteorder(reader: gguf.GGUFReader, args: argparse.Namespace) -> None
2828
file_endian = swapped_endian
2929
else:
3030
file_endian = host_endian
31-
if args.order == "native":
32-
order = host_endian
31+
order = host_endian if args.order == "native" else args.order
3332
print(f"* Host is {host_endian.upper()} endian, GGUF file seems to be {file_endian.upper()} endian")
3433
if file_endian == order:
3534
print(f"* File is already {order.upper()} endian. Nothing to do.")

0 commit comments

Comments
 (0)