152334H / tortoise-tts-fast

Fast TorToiSe inference (5x or your money back!)
GNU Affero General Public License v3.0
771 stars 179 forks source link

ImportError and llvmlite #29

Closed KaleidoscopicPrism closed 1 year ago

KaleidoscopicPrism commented 1 year ago

Why does this happen when I try to generate?

Traceback (most recent call last): File "E:\tortoise-tts-fast\tortoise\do_tts.py", line 9, in from api import TextToSpeech File "E:\tortoise-tts-fast\tortoise\api.py", line 14, in from tortoise.models.arch_util import TorchMelSpectrogram File "E:\Anaconda3\lib\site-packages\tortoise\models.py", line 25, in from tortoise import connections ImportError: cannot import name 'connections' from 'tortoise' (unknown location)

And why does this happen when I install requirements.txt and pip install -e .

ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

152334H commented 1 year ago

see here

pip install llvmlite --ignore installed

you can also install poetry and run it that way, but I assume that is too complex for casual users

KaleidoscopicPrism commented 1 year ago

see here

pip install llvmlite --ignore installed

you can also install poetry and run it that way, but I assume that is too complex for casual users

Now this happens:

E:\Anaconda3\lib\site-packages\paramiko\transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated "class": algorithms.Blowfish, ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ E:\tortoise-tts-fast\tortoise\do_tts.py:11 in │ │ │ │ 8 import torch │ │ 9 from api import TextToSpeech │ │ 10 from base_argparser import ap, nullable_kwargs │ │ ❱ 11 from inference import save_gen_with_voicefix │ │ 12 from utils.audio import load_voices │ │ 13 │ │ 14 │ │ │ │ E:\tortoise-tts-fast\tortoise\inference.py:162 in │ │ │ │ 159 │ │ 160 from voicefixer import VoiceFixer │ │ 161 │ │ ❱ 162 vfixer = VoiceFixer() │ │ 163 │ │ 164 │ │ 165 def save_gen_with_voicefix(g, fpath, squeeze=True, voicefixer=True): │ │ │ │ E:\Anaconda3\lib\site-packages\voicefixer\base.py:24 in init │ │ │ │ 21 │ │ │ │ │ │ │ │ By default the checkpoint should be download automatical │ │ 22 │ │ │ │ │ │ │ │ But don't worry! Alternatively you can download it direc │ │ 23 │ │ self._model.load_state_dict( │ │ ❱ 24 │ │ │ torch.load( │ │ 25 │ │ │ │ self.analysis_module_ckpt │ │ 26 │ │ │ ) │ │ 27 │ │ ) │ │ │ │ E:\Anaconda3\lib\site-packages\torch\serialization.py:777 in load │ │ │ │ 774 │ │ │ # If we want to actually tail call to torch.jit.load, we need to │ │ 775 │ │ │ # reset back to the original position. │ │ 776 │ │ │ orig_position = opened_file.tell() │ │ ❱ 777 │ │ │ with _open_zipfile_reader(opened_file) as opened_zipfile: │ │ 778 │ │ │ │ if _is_torchscript_zip(opened_zipfile): │ │ 779 │ │ │ │ │ warnings.warn("'torch.load' received a zip file that looks like a To │ │ 780 │ │ │ │ │ │ │ │ " dispatching to 'torch.jit.load' (call 'torch.jit.loa │ │ │ │ E:\Anaconda3\lib\site-packages\torch\serialization.py:282 in init │ │ │ │ 279 │ │ 280 class _open_zipfile_reader(_opener): │ │ 281 │ def init(self, name_or_buffer) -> None: │ │ ❱ 282 │ │ super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_bu │ │ 283 │ │ 284 │ │ 285 class _open_zipfile_writer_file(_opener): │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

152334H commented 1 year ago

did you cancel the model download for voicefixer at some point

KaleidoscopicPrism commented 1 year ago

i think so

KaleidoscopicPrism commented 1 year ago

i'm just gonna reinstall tortoise

KaleidoscopicPrism commented 1 year ago

i'm just gonna reinstall tortoise

it did not work

152334H commented 1 year ago

your libraries are screwed, you need a fresh python environment (and also need to nuke wherever the partially downloaded voicefixer model file is)

KaleidoscopicPrism commented 1 year ago

how would i do as such?

KaleidoscopicPrism commented 1 year ago

i've created a new environment with python 3.9.1 in anaconda3 and deleted the voicefixer and voicefixer cmd file in the scripts folder before i did that

KaleidoscopicPrism commented 1 year ago

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ E:\tortoise-tts-fast\tortoise\do_tts.py:11 in │ │ │ │ 8 import torch │ │ 9 from api import TextToSpeech │ │ 10 from base_argparser import ap, nullable_kwargs │ │ ❱ 11 from inference import save_gen_with_voicefix │ │ 12 from utils.audio import load_voices │ │ 13 │ │ 14 │ │ │ │ E:\tortoise-tts-fast\tortoise\inference.py:167 in │ │ │ │ 164 │ │ 165 from voicefixer import VoiceFixer │ │ 166 │ │ ❱ 167 vfixer = VoiceFixer() │ │ 168 │ │ 169 │ │ 170 def save_gen_with_voicefix(g, fpath, squeeze=True, voicefixer=True): │ │ │ │ E:\Anaconda3\envs\Fuck\lib\site-packages\voicefixer\base.py:24 in init │ │ │ │ 21 │ │ │ │ │ │ │ │ By default the checkpoint should be download automatical │ │ 22 │ │ │ │ │ │ │ │ But don't worry! Alternatively you can download it direc │ │ 23 │ │ self._model.load_state_dict( │ │ ❱ 24 │ │ │ torch.load( │ │ 25 │ │ │ │ self.analysis_module_ckpt │ │ 26 │ │ │ ) │ │ 27 │ │ ) │ │ │ │ E:\Anaconda3\envs\Fuck\lib\site-packages\torch\serialization.py:777 in load │ │ │ │ 774 │ │ │ # If we want to actually tail call to torch.jit.load, we need to │ │ 775 │ │ │ # reset back to the original position. │ │ 776 │ │ │ orig_position = opened_file.tell() │ │ ❱ 777 │ │ │ with _open_zipfile_reader(opened_file) as opened_zipfile: │ │ 778 │ │ │ │ if _is_torchscript_zip(opened_zipfile): │ │ 779 │ │ │ │ │ warnings.warn("'torch.load' received a zip file that looks like a To │ │ 780 │ │ │ │ │ │ │ │ " dispatching to 'torch.jit.load' (call 'torch.jit.loa │ │ │ │ E:\Anaconda3\envs\Fuck\lib\site-packages\torch\serialization.py:282 in init │ │ │ │ 279 │ │ 280 class _open_zipfile_reader(_opener): │ │ 281 │ def init(self, name_or_buffer) -> None: │ │ ❱ 282 │ │ super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_bu │ │ 283 │ │ 284 │ │ 285 class _open_zipfile_writer_file(_opener): │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

KaleidoscopicPrism commented 1 year ago

your libraries are screwed, you need a fresh python environment (and also need to nuke wherever the partially downloaded voicefixer model file is)

I've repeated the process but with python 3.8 and it still hasn't worked.