You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version 0.25.2 Is causing issues with fairseq
For Example when the eng.tar.gz is downloaded and extracted the G_100000.pth is being renamed to model.pth
This is causing issues as you might expect when the fairseq engine is looking for the G_100000.pth file and can't find it
If I Rename the model.pth to G_100000.pth then the model loads fine, confirming my suspicion
They also have the same shard
Logs
Idk I forgot to get it but its pretty self-evident when you re-download the English fairseq model to use fully with coqui-tts
oh there was this
bash
FileNotFoundError: [Errno 2] No such file or directory: '/Users/drew/ebook2audiobook/models/tts/tts_models--eng--fairseq--vits/G_100000.pth'
Caught DependencyError: [Errno 2] No such file or directory: '/Users/drew/ebook2audiobook/models/tts/tts_models--eng--fairseq--vits/G_100000.pth'convert_ebook() Exception: [Errno 2] No such file or directory: '/Users/drew/ebook2audiobook/models/tts/tts_models--eng--fairseq--vits/G_100000.pth'
s]Traceback (most recent call last):
File "/Users/drew/ebook2audiobook/lib/functions.py", line 694, in convert_chapters_to_audio
params['tts'] = load_tts_api_cached(model_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/lib/functions.py", line 634, in load_tts_api_cached
tts = XTTS(model_path)
^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/api.py", line 96, in init
self.load_tts_model_by_name(model_name, vocoder_name, gpu=gpu)
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/api.py", line 226, in load_tts_model_by_name
self.synthesizer = Synthesizer(
^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/utils/synthesizer.py", line 109, in init
self._load_fairseq_from_dir(model_dir, use_cuda)
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/utils/synthesizer.py", line 157, in _load_fairseq_from_dir
self.tts_model.load_fairseq_checkpoint(self.tts_config, checkpoint_dir=model_dir, eval=True)
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/tts/models/vits.py", line 1605, in load_fairseq_checkpoint
new_chk = rehash_fairseq_vits_checkpoint(checkpoint_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/tts/utils/fairseq.py", line 7, in rehash_fairseq_vits_checkpoint
chk = torch.load(checkpoint_file, map_location=torch.device("cpu"), weights_only=is_pytorch_at_least_2_4())["model"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/torch/serialization.py", line 1319, in load
with _open_file_like(f, "rb") as opened_file:
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/torch/serialization.py", line 659, in _open_file_like
return _open_file(name_or_buffer, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/torch/serialization.py", line 640, in init
super().init(open(name, mode))
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/drew/ebook2audiobook/models/tts/tts_models--eng--fairseq--vits/G_100000.pth'
Caught DependencyError: [Errno 2] No such file or directory: '/Users/drew/ebook2audiobook/models/tts/tts_models--eng--fairseq--vits/G_100000.pth'
convert_ebook() Exception: [Errno 2] No such file or directory: '/Users/drew/ebook2audiobook/models/tts/tts_models--eng--fairseq--vits/G_100000.pth'
100%|█████████████████████████████████████████████████| 135M/135M [00:30<00:00, 8.23MiB/s]
### Environment
```shell
on m1 MAC pro apple silicon 16gb ram
issues arrises when using
`coqui-tts==0.25.2`
Additional context
If I revert back to coqui-tts==0.25.1 then the issue goes away so
yeah
The text was updated successfully, but these errors were encountered:
@ROBERT-MCDOWELL@DrewThomasson Thanks for spotting this issue quickly, will release a new version with a fix (#264) today. It will accept both G_100000.pth and model.pth so it should work for any already downloaded models. Also added a test for the fairseq models to avoid similar issues in the future.
Describe the bug
Version 0.25.2 Is causing issues with fairseq
For Example when the eng.tar.gz is downloaded and extracted the G_100000.pth is being renamed to model.pth
This is causing issues as you might expect when the fairseq engine is looking for the G_100000.pth file and can't find it
To Reproduce
Try to use the "eng" fairseq model
This is what the zip should look like
wget https://dl.fbaipublicfiles.com/mms/tts/eng.tar.gz
Expected behavior
Expected output of that zip are the files
G_100000.pth config.json vocab.txt
But instead its getting
model.pth config.json vocab.txt
If I Rename the
model.pth
toG_100000.pth
then the model loads fine, confirming my suspicionThey also have the same shard
Logs
s]Traceback (most recent call last):
File "/Users/drew/ebook2audiobook/lib/functions.py", line 694, in convert_chapters_to_audio
params['tts'] = load_tts_api_cached(model_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/lib/functions.py", line 634, in load_tts_api_cached
tts = XTTS(model_path)
^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/api.py", line 96, in init
self.load_tts_model_by_name(model_name, vocoder_name, gpu=gpu)
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/api.py", line 226, in load_tts_model_by_name
self.synthesizer = Synthesizer(
^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/utils/synthesizer.py", line 109, in init
self._load_fairseq_from_dir(model_dir, use_cuda)
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/utils/synthesizer.py", line 157, in _load_fairseq_from_dir
self.tts_model.load_fairseq_checkpoint(self.tts_config, checkpoint_dir=model_dir, eval=True)
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/tts/models/vits.py", line 1605, in load_fairseq_checkpoint
new_chk = rehash_fairseq_vits_checkpoint(checkpoint_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/TTS/tts/utils/fairseq.py", line 7, in rehash_fairseq_vits_checkpoint
chk = torch.load(checkpoint_file, map_location=torch.device("cpu"), weights_only=is_pytorch_at_least_2_4())["model"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/torch/serialization.py", line 1319, in load
with _open_file_like(f, "rb") as opened_file:
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/torch/serialization.py", line 659, in _open_file_like
return _open_file(name_or_buffer, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/drew/ebook2audiobook/python_env/lib/python3.12/site-packages/torch/serialization.py", line 640, in init
super().init(open(name, mode))
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/drew/ebook2audiobook/models/tts/tts_models--eng--fairseq--vits/G_100000.pth'
Caught DependencyError: [Errno 2] No such file or directory: '/Users/drew/ebook2audiobook/models/tts/tts_models--eng--fairseq--vits/G_100000.pth'
convert_ebook() Exception: [Errno 2] No such file or directory: '/Users/drew/ebook2audiobook/models/tts/tts_models--eng--fairseq--vits/G_100000.pth'
100%|█████████████████████████████████████████████████| 135M/135M [00:30<00:00, 8.23MiB/s]
Additional context
If I revert back to
coqui-tts==0.25.1
then the issue goes away soyeah
The text was updated successfully, but these errors were encountered: