fix reader on linux
Signed-off-by: isotr0py <2037008807@qq.com>
This commit is contained in:
parent
810f06bd5b
commit
94d814c559
1 changed files with 1 additions and 0 deletions
|
@ -95,6 +95,7 @@ class GGUFReader:
|
||||||
offs = 0
|
offs = 0
|
||||||
|
|
||||||
# Check for GGUF magic
|
# Check for GGUF magic
|
||||||
|
self.data.seek(offs)
|
||||||
if struct.unpack("<I", self.data.read(4))[0] != GGUF_MAGIC:
|
if struct.unpack("<I", self.data.read(4))[0] != GGUF_MAGIC:
|
||||||
raise ValueError('GGUF magic invalid')
|
raise ValueError('GGUF magic invalid')
|
||||||
offs += 4
|
offs += 4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue