fix: resolve critical vulnerability V-005

Automatically generated security fix
This commit is contained in:
orbisai0security
2025-12-29 13:25:05 +00:00
parent 4c19646b9a
commit 5b94675f62
2 changed files with 4 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ class CosyVoiceFrontEnd:
providers=["CUDAExecutionProvider" if torch.cuda.is_available() else
"CPUExecutionProvider"])
if os.path.exists(spk2info):
self.spk2info = torch.load(spk2info, map_location=self.device)
self.spk2info = torch.load(spk2info, map_location=self.device, weights_only=True)
else:
self.spk2info = {}
self.allowed_special = allowed_special