TTS: [Bug] Cant load xtts
Describe the bug
Error when loading xtts model
To Reproduce
from TTS.api import TTS
model = TTS("xtts", gpu=True)
Expected behavior
Expect it to load model without throwing an error
Logs
raise pickle.UnpicklingError(_get_wo_message(str(e))) from None
_pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with `weights_only=True` please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL TTS.tts.configs.xtts_config.XttsConfig was not an allowed global by default. Please use `torch.serialization.add_safe_globals([XttsConfig])` or the `torch.serialization.safe_globals([XttsConfig])` context manager to allowlist this global if you trust this class/function.
111
Environment
{
"CUDA": {
"GPU": [
"NVIDIA GeForce RTX 3080",
"NVIDIA GeForce RTX 3080"
],
"available": true,
"version": "12.4"
},
"Packages": {
"PyTorch_debug": false,
"PyTorch_version": "2.6.0.dev20241119+cu124",
"TTS": "0.22.0",
"numpy": "1.22.0"
},
"System": {
"OS": "Linux",
"architecture": [
"64bit",
"ELF"
],
"processor": "x86_64",
"python": "3.10.14",
"version": "#1 SMP Thu Jan 11 04:09:03 UTC 2024"
}
}
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (9 by maintainers)
You should install our fork (via
pip install coqui-tts), it should work with the latest Pytorch versions (but I haven’t tested 2.6 yet). This repo is not updated anymore.The latest version is 0.25.3…
If you don’t want to make a new virtual environment, the best way to switch is:
Otherwise it can still use the original Trainer and coqpit dependencies instead of their forks.
I had to change
io.pylocally, addingweights_onlyflag:I had reinstalled it before:
Actually, I found I have:
Thanks.
@gokturkDev Coqui the company shut down in December 2023, so it is not being sold anymore. We have no affiliation with the original team.