Set weights_only=True when using torch.load() (#12366)

Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant
2025-01-24 02:17:30 +00:00
committed by GitHub
parent 24b0205f58
commit d3d6bb13fb
4 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -26,4 +26,4 @@ class ImageAsset:
"""
image_path = get_vllm_public_assets(filename=f"{self.name}.pt",
s3_prefix=VLM_IMAGES_DIR)
return torch.load(image_path, map_location="cpu")
return torch.load(image_path, map_location="cpu", weights_only=True)