Closed ColeDrain closed 3 days ago
Thank you for opening this! I also noticed this and will look at it eventually, but anybody is also very welcome to submit a PR for this already. It should be a fairly simply change, just note that 2 occurrences of torch.load
in the Trainer will need to be updated as well.
In the meantime it shouldn't be a huge issue - the list of included default models is fixed and custom models that users load will mostly be their own fine-tuned ones. Otherwise the link shared above is useful to be aware of the risks with untrusted models: https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models
Describe the bug
When using the TTS library, the following warning is displayed:
This warning indicates a potential security vulnerability when loading models, as arbitrary code execution could occur during unpickling. I looked at the code, and it seems the default value is set to False, is there an implication on setting it to True.
To Reproduce
Expected behavior
The TTS library should use
torch.load
withweights_only=True
by default to prevent potential security risks.Logs
Environment
Additional context
This issue is related to a known security concern in PyTorch. More details can be found in the PyTorch security documentation: https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models