mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-27 20:05:20 +00:00
gguf-py : fix SafetensorRemote return on undefined size (< 0) (#13841)
This commit is contained in:
@ -231,7 +231,7 @@ class SafetensorRemote:
|
|||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
|
||||||
# Get raw byte data
|
# Get raw byte data
|
||||||
return response.content[:size]
|
return response.content[slice(size if size > -1 else None)]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def check_file_exist(cls, url: str) -> bool:
|
def check_file_exist(cls, url: str) -> bool:
|
||||||
|
Reference in New Issue
Block a user