Closed josiahbryan closed 3 months ago
Hey, please check the notebook you can load the model by:
import torch
# load model
mars5, config_class = torch.hub.load('Camb-ai/mars5-tts', 'mars5_english', trust_repo=True)
I will happily try that tomorrow. Please do keep in mind, the code that I was using was copied straight from the readme. Are you saying that the quick start there needs changed as well?
On Thu, Jun 13, 2024, 1:12 AM Arnav Mehta @.***> wrote:
Hey, please check the notebook https://github.com/Camb-ai/MARS5-TTS/blob/master/mars5_demo.ipynb you can load the model by:
import torch# load modelmars5, config_class = torch.hub.load('Camb-ai/mars5-tts', 'mars5_english', trust_repo=True)
— Reply to this email directly, view it on GitHub https://github.com/Camb-ai/MARS5-TTS/issues/21#issuecomment-2164541678, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEZELAODCXWJYPKQVQLU23ZHEZ5ZAVCNFSM6AAAAABJE66U26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRUGU2DCNRXHA . You are receiving this because you authored the thread.Message ID: @.***>
@arnavmehta7 I literally copied-pasted the import from the notebook -same error. Tried copy/pasting your code, same error. No clue what's going on here - I don't write a lot of python, so not used to reading the stack traces, but it SEEMS a problem in the package published on torch.hub because the error seems to happen inside .cache/torch/hub/Camb-ai_mars5-tts_master/inference.py
So my test file is literally just:
import torch
mars5, config_class = torch.hub.load('Camb-ai/mars5-tts', 'mars5_english', trust_repo=True)
... and it gives the same error:
ImportError: cannot import name 'Mars5TTS' from partially initialized module 'inference' (most likely due to a circular import) (/Users/josiahbryan/.cache/torch/hub/Camb-ai_mars5-tts_master/inference.py)
So yeah, something still very broken. Any suggestions on how to fix?
Try renaming the mars5.py
file to something else. It shadows the name of the package so that might cause some issues.
WOW - that was IT... reason number 1,024 on why I can't stand python lol. Consider issue closed. So stupid. (Python, not you)
How do I load the local model?
I followed the QuickStart (https://github.com/Camb-ai/MARS5-TTS?tab=readme-ov-file#quickstart) and copy/pasted code exactly. (did the
pip install --upgrade torch torchaudio librosa vocos encodec
, etc) - and here's my script. But when I run it, it closes with error (full console log below the script):Script (
mars5.py
):Console Output: