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

View File

@ -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: