Apply torchfix (#15532)

Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
cyyever
2025-03-26 12:09:06 +00:00
committed by GitHub
parent cf5c8f1686
commit 1aa162e030
5 changed files with 15 additions and 11 deletions
+3 -1
View File
@@ -272,7 +272,9 @@ class LoRAModel(AdapterModel):
f" target modules in {expected_lora_modules}"
f" but received {unexpected_modules}."
f" Please verify that the loaded LoRA module is correct")
tensors = torch.load(lora_bin_file_path, map_location=device)
tensors = torch.load(lora_bin_file_path,
map_location=device,
weights_only=True)
else:
raise ValueError(f"{lora_dir} doesn't contain tensors")