Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After selecting "Parler" in Gradio, it won't start up: ImportError: cannot import name 'EncoderDecoderCache' from 'transformers.cache_utils' #374

Closed
phazei opened this issue Oct 13, 2024 · 4 comments

Comments

@phazei
Copy link

phazei commented Oct 13, 2024

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)

diagnostics.log

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

@phazei
Copy link
Author

phazei commented Oct 13, 2024

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.

@phazei phazei changed the title won't start up: ImportError: cannot import name 'EncoderDecoderCache' from 'transformers.cache_utils' After selecting "Parler" in gui, it won't start up: ImportError: cannot import name 'EncoderDecoderCache' from 'transformers.cache_utils' Oct 13, 2024
@phazei phazei changed the title After selecting "Parler" in gui, it won't start up: ImportError: cannot import name 'EncoderDecoderCache' from 'transformers.cache_utils' After selecting "Parler" in Gradio, it won't start up: ImportError: cannot import name 'EncoderDecoderCache' from 'transformers.cache_utils' Oct 13, 2024
@erew123
Copy link
Owner

erew123 commented Oct 13, 2024

Hi @phazei

Please read this here. Apologies for your install problems, but I hope that may give you a way forward. If it does and you are happy with that resolution, please close the ticket for now. If not, feel free to leave it open and I will return to it when I can.

Thanks

@phazei
Copy link
Author

phazei commented Oct 14, 2024

It's no big deal, I'm sure it'll work itself out once you're available again, good luck with your fam!

@phazei phazei closed this as completed Oct 14, 2024
@Urammar
Copy link

Urammar commented Oct 14, 2024

/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants