mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-01-07 13:52:10 +01:00
Cleaner implementation of zipfolder
This commit is contained in:
parent
9a8e8a0005
commit
eeb1774d42
@ -2395,7 +2395,7 @@ def load_model(use_gpu=True, gpu_layers=None, disk_layers=None, initial_load=Fal
|
||||
try:
|
||||
f = z.open(f"archive/data/{storage_key}")
|
||||
except:
|
||||
f = z.open(f"%s/data/{storage_key}" % zipfolder)
|
||||
f = z.open(f"{zipfolder}/data/{storage_key}")
|
||||
current_offset = 0
|
||||
if current_offset != model_dict[key].seek_offset:
|
||||
f.read(model_dict[key].seek_offset - current_offset)
|
||||
|
@ -1287,7 +1287,7 @@ def load_model(path: str, driver_version="tpu_driver0.1_dev20210607", hf_checkpo
|
||||
try:
|
||||
f = z.open(f"archive/data/{storage_key}")
|
||||
except:
|
||||
f = z.open(f"%s/data/{storage_key}" % zipfolder)
|
||||
f = z.open(f"{zipfolder}/data/{storage_key}")
|
||||
current_offset = 0
|
||||
if current_offset != model_dict[key].seek_offset:
|
||||
f.read(model_dict[key].seek_offset - current_offset)
|
||||
|
Loading…
Reference in New Issue
Block a user