After selecting "Parler" in Gradio, it won't start up: ImportError: cannot import name 'EncoderDecoderCache' from 'transformers.cache_utils'
Closed this issue · 4 comments
I installed v2 fresh. I tried xtts, it worked nice, then I selected parler from the gui, but it got an error. I figure because it hadn't installed it. I quit the cli, started it again, and instead of asking what engine I wanted on boot, it just gave me an error. I tried a few times, tried the pip install again, nothing.
[AllTalk TTS] Config file update: No Updates required
[AllTalk TTS] Start-up Mode : Standalone mode
[AllTalk TTS] WAV file deletion : Disabled
[AllTalk TTS] Github updated : 5th October 2024 at 22:34
[AllTalk ENG] Transcoding : ffmpeg found
Traceback (most recent call last):
File "D:\AITools\alltalk_tts\tts_server.py", line 171, in <module>
loader_module = importlib.import_module(f"system.tts_engines.{engine_loaded}.model_engine")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AITools\alltalk_tts\alltalk_environment\env\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "D:\AITools\alltalk_tts\system\tts_engines\parler\model_engine.py", line 35, in <module>
from parler_tts import ParlerTTSForConditionalGeneration
File "D:\AITools\alltalk_tts\alltalk_environment\env\Lib\site-packages\parler_tts\__init__.py", line 8, in <module>
from .modeling_parler_tts import (
File "D:\AITools\alltalk_tts\alltalk_environment\env\Lib\site-packages\parler_tts\modeling_parler_tts.py", line 29, in <module>
from transformers.cache_utils import (
ImportError: cannot import name 'EncoderDecoderCache' from 'transformers.cache_utils' (D:\AITools\alltalk_tts\alltalk_environment\env\Lib\site-packages\transformers\cache_utils.py)
I think I got my model names wrong. I think it happens if I select parler in the gui, and then it gets stuck that way unless I mess with the config file manually
I worked around it by changing "firstrun_model": true
in the config and picked piper since it was small to redownload, it let me launch again at least. I'm running the standalone version.
I found the model voices download page for parler and downloaded it, but it didn't fix it.
It's no big deal, I'm sure it'll work itself out once you're available again, good luck with your fam!
/extensions/alltalk_tts/system/tts_engines
In there you will have tts_engines.json, and its backup(the last known good settings).
If you change the engine loaded to something valid, like xtts perhaps or piper by default
{
"engine_loaded": "piper",
"selected_model": "piper",
"engines_available": [
{
"name": "parler",
"selected_model": "parler - parler_tts_mini_v0.1"
},
{
"name": "piper",
"selected_model": "piper"
},
{
"name": "vits",
"selected_model": "vits - tts_models--en--vctk--vits"
},
{
"name": "xtts",
"selected_model": "xtts - xttsv2_2.0.3"
}
]
}
Thanks the default config there, you can clear out the selected models if those models dont exist and are throwing an error, but yeah just load into something else thats valid.
This doesnt fix the fundamental flaw, but this will get you back up and running, just dont select that engine again for the time being till you fix it.