Correct the type hint for lazy_load_callback

This commit is contained in:
Gnome Ann 2022-06-19 17:17:41 -04:00
parent 21de36c4b0
commit 4dd59e0a9d

View File

@ -1668,7 +1668,7 @@ def load_model(use_gpu=True, gpu_layers=None, initial_load=False, online_model="
else:
ram_blocks = gpu_blocks = cumulative_gpu_blocks = None
def lazy_load_callback(model_dict: Dict[str, torch.Tensor], f, **_):
def lazy_load_callback(model_dict: Dict[str, Union[torch_lazy_loader.LazyTensor, torch.Tensor]], f, **_):
if lazy_load_callback.nested:
return
lazy_load_callback.nested = True