erew123 / alltalk_tts

AllTalk is based on the Coqui TTS engine, similar to the Coqui_tts extension for Text generation webUI, however supports a variety of advanced features, such as a settings page, low VRAM support, DeepSpeed, narrator, model finetuning, custom models, wav file maintenance. It can also be used with 3rd Party software via JSON calls.
GNU Affero General Public License v3.0
1.08k stars 115 forks source link

ImportError: cannot import name 'SampleOutput' from 'transformers.generation.utils' #80

Closed caseygoodrich closed 9 months ago

caseygoodrich commented 9 months ago

Please generate a diagnostics report and upload the "diagnostics.log".

https://github.com/erew123/alltalk_tts/tree/main?#-how-to-make-a-diagnostics-report-file diagnostics.log

Describe the bug I ran the shell script on a fresh new OS and when i start the app I get this error.

To Reproduce Steps to reproduce the behaviour: Fresh install run the ./atsetup.sh and select standalone

Text/logs ./start_alltalk.sh [AllTalk Startup] Running script.py in standalone mode [AllTalk Startup] Coqui Public Model License [AllTalk Startup] https://coqui.ai/cpml.txt [AllTalk Startup] Old output wav file deletion is set to disabled. [AllTalk Startup] Checking Model is Downloaded. [AllTalk Startup] TTS version installed: 0.21.3 [AllTalk Startup] TTS version is up to date. [AllTalk Startup] All required files are present. [AllTalk Startup] TTS Subprocess starting [AllTalk Startup] [AllTalk Startup] AllTalk Settings & Documentation: http://127.0.0.1:7851 [AllTalk Startup] Traceback (most recent call last): File "/home/ai/alltalk_tts/tts_server.py", line 7, in from TTS.tts.configs.xtts_config import XttsConfig File "/home/ai/alltalk_tts/alltalk_environment/env/lib/python3.11/site-packages/TTS/tts/configs/xtts_config.py", line 5, in from TTS.tts.models.xtts import XttsArgs, XttsAudioConfig File "/home/ai/alltalk_tts/alltalk_environment/env/lib/python3.11/site-packages/TTS/tts/models/xtts.py", line 12, in from TTS.tts.layers.xtts.stream_generator import init_stream_support File "/home/ai/alltalk_tts/alltalk_environment/env/lib/python3.11/site-packages/TTS/tts/layers/xtts/stream_generator.py", line 24, in from transformers.generation.utils import GenerateOutput, SampleOutput, logger ImportError: cannot import name 'SampleOutput' from 'transformers.generation.utils' (/home/ai/alltalk_tts/alltalk_environment/env/lib/python3.11/site-packages/transformers/generation/utils.py)

erew123 commented 9 months ago

Heya

Looks like they released a new version of transformers 7 hours ago https://github.com/huggingface/transformers/releases

I don't know if this is something they have broken in their code or a bug, I cant see a breaking change that would have caused this.

You can force transformers to downgrade with (load the python environment first):

pip install transformers==4.36.2

Ill bump that into the requirements file in a minute to avoid this in future. If you need more help on this, let me know.

Thanks