mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
More universal pytorch folder detection
This commit is contained in:
@@ -581,10 +581,9 @@ class HFTorchInferenceModel(HFInferenceModel):
|
|||||||
last_storage_key = storage_key
|
last_storage_key = storage_key
|
||||||
if isinstance(f, zipfile.ZipExtFile):
|
if isinstance(f, zipfile.ZipExtFile):
|
||||||
f.close()
|
f.close()
|
||||||
try:
|
ziproot = z.namelist()[0].split("/")[0]
|
||||||
f = z.open(f"archive/data/{storage_key}")
|
f = z.open(f"{ziproot}/data/{storage_key}")
|
||||||
except:
|
|
||||||
f = z.open(f"{zipfolder}/data/{storage_key}")
|
|
||||||
current_offset = 0
|
current_offset = 0
|
||||||
if current_offset != model_dict[key].seek_offset:
|
if current_offset != model_dict[key].seek_offset:
|
||||||
f.read(model_dict[key].seek_offset - current_offset)
|
f.read(model_dict[key].seek_offset - current_offset)
|
||||||
|
Reference in New Issue
Block a user