From bd6f7798b98f05e1151e956b9362d606e88b583a Mon Sep 17 00:00:00 2001 From: Gnome Ann <> Date: Thu, 14 Apr 2022 14:33:10 -0400 Subject: [PATCH] Fix lazy loader in aiserver.py --- aiserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiserver.py b/aiserver.py index db0e8872..fc444660 100644 --- a/aiserver.py +++ b/aiserver.py @@ -1119,7 +1119,7 @@ if(not vars.use_colab_tpu and vars.model not in ["InferKit", "Colab", "OAI", "Go current_offset = 0 for key in tqdm(sorted(device_map.keys(), key=lambda k: (model_dict[k].key, model_dict[k].seek_offset)), desc="Loading model tensors"): storage_key = model_dict[key].key - if storage_key != last_storage_key: + if storage_key != last_storage_key or model_dict[key].seek_offset < current_offset: last_storage_key = storage_key if isinstance(f, zipfile.ZipExtFile): f.close()