From c3c19c470bb83fd1f39cd33a046ec4e290a526a9 Mon Sep 17 00:00:00 2001 From: Jie Fu Date: Mon, 1 Sep 2025 10:54:13 +0800 Subject: [PATCH] convert : remove redundant code Signed-off-by: Jie Fu --- convert_hf_to_gguf.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py index df37c4a6e430c..908435d7e5f00 100755 --- a/convert_hf_to_gguf.py +++ b/convert_hf_to_gguf.py @@ -302,10 +302,6 @@ def prepare_tensors(self): # data = data_torch.squeeze().numpy() data = data_torch.numpy() - # if data ends up empty, it means data_torch was a scalar tensor -> restore - if len(data.shape) == 0: - data = data_torch.numpy() - n_dims = len(data.shape) data_qtype: gguf.GGMLQuantizationType | bool = self.tensor_force_quant(name, new_name, bid, n_dims)