gguf-py : fix SafetensorRemote return on undefined size (< 0) (#13841)

This commit is contained in:
Beinsezii 2025-05-28 14:50:20 -07:00 committed by GitHub
parent 763d06edb7
commit 53ae30640e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -231,7 +231,7 @@ class SafetensorRemote:
response.raise_for_status()
# Get raw byte data
return response.content[:size]
return response.content[slice(size if size > -1 else None)]
@classmethod
def check_file_exist(cls, url: str) -> bool: