From e582f1ac6387ec995a96bc33ae7f75f31db27a4f Mon Sep 17 00:00:00 2001 From: Francis Couture-Harpin Date: Tue, 9 Sep 2025 13:51:05 -0400 Subject: [PATCH] convert : fix no-lazy dtypes from direct safetensors --- convert_hf_to_gguf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py index 9ac5ba4e2f..b991848df9 100755 --- a/convert_hf_to_gguf.py +++ b/convert_hf_to_gguf.py @@ -209,7 +209,7 @@ class ModelBase: data_gen = lambda data=data: LazyTorchTensor.from_local_tensor(data) # noqa: E731 else: dtype = LazyTorchTensor._dtype_str_map[data.dtype] - data_gen = lambda data=data: torch.from_numpy(data.mmap_bytes()).view(dtype).reshape(data.shape) # noqa: E731 + data_gen = lambda data=data, dtype=dtype: torch.from_numpy(data.mmap_bytes()).view(dtype).reshape(data.shape) # noqa: E731 else: data_torch: Tensor = model_part[name] if self.lazy: