Set weights_only=True when using torch.load() (#12366)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
+2
-1
@@ -273,7 +273,8 @@ class LoRAModel(AdapterModel):
|
||||
new_embeddings_tensor_path)
|
||||
elif os.path.isfile(new_embeddings_bin_file_path):
|
||||
embeddings = torch.load(new_embeddings_bin_file_path,
|
||||
map_location=device)
|
||||
map_location=device,
|
||||
weights_only=True)
|
||||
|
||||
return cls.from_lora_tensors(
|
||||
lora_model_id=get_lora_id()
|
||||
|
||||
Reference in New Issue
Block a user