gguf-py : fix SafetensorRemote return on undefined size (< 0) (#13841)
This commit is contained in:
parent
763d06edb7
commit
53ae30640e
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue