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

[Bug] cannot import name 'LogitsWarper' from 'transformers', from transformers import LogitsWarper #4165

Open
devops724 opened this issue Mar 3, 2025 · 2 comments
Labels
bug Something isn't working wontfix This will not be worked on but feel free to help.

Comments

@devops724
Copy link

devops724 commented Mar 3, 2025

Describe the bug

Hi
what i run finetune code for tts v2
i get this error
from TTS.tts.layers.xtts.trainer.gpt_trainer import GPTArgs, GPTTrainer, GPTTrainerConfig, XttsAudioConfig
File "/home/user/workspace/dataset/TTS/venv/lib/python3.11/site-packages/TTS/tts/layers/xtts/trainer/gpt_trainer.py", line 15, in
from TTS.tts.layers.tortoise.arch_utils import TorchMelSpectrogram
File "/home/user/workspace/dataset/TTS/venv/lib/python3.11/site-packages/TTS/tts/layers/tortoise/arch_utils.py", line 10, in
from transformers import LogitsWarper
ImportError: cannot import name 'LogitsWarper' from 'transformers' (/home/user/workspace/dataset/TTS/venv/lib/python3.11/site-packages/transformers/init.py)
Traceback (most recent call last):
File "/home/user/workspace/dataset/xtts-fa/train_xtts.py", line 11, in
from TTS.tts.layers.xtts.trainer.gpt_trainer import GPTArgs, GPTTrainer, GPTTrainerConfig, XttsAudioConfig
File "/home/user/workspace/dataset/TTS/venv/lib/python3.11/site-packages/TTS/tts/layers/xtts/trainer/gpt_trainer.py", line 15, in
from TTS.tts.layers.tortoise.arch_utils import TorchMelSpectrogram
File "/home/user/workspace/dataset/TTS/venv/lib/python3.11/site-packages/TTS/tts/layers/tortoise/arch_utils.py", line 10, in
from transformers import LogitsWarper
ImportError: cannot import name 'LogitsWarper' from 'transformers' (/home/user/workspace/dataset/TTS/venv/lib/python3.11/site-packages/transformers/init.py)
Traceback (most recent call last):
File "/home/user/workspace/dataset/xtts-fa/train_xtts.py", line 11, in
from TTS.tts.layers.xtts.trainer.gpt_trainer import GPTArgs, GPTTrainer, GPTTrainerConfig, XttsAudioConfig
File "/home/user/workspace/dataset/TTS/venv/lib/python3.11/site-packages/TTS/tts/layers/xtts/trainer/gpt_trainer.py", line 15, in
from TTS.tts.layers.tortoise.arch_utils import TorchMelSpectrogram
File "/home/user/workspace/dataset/TTS/venv/lib/python3.11/site-packages/TTS/tts/layers/tortoise/arch_utils.py", line 10, in
from transformers import LogitsWarper
ImportError: cannot import name 'LogitsWarper' from 'transformers' (/home/user/workspace/dataset/TTS/venv/lib/python3.11/site-packages/transformers/init.py)

To Reproduce

run
https://github.com/coqui-ai/TTS/blob/dev/recipes/ljspeech/xtts_v2/train_gpt_xtts.py
script

Expected behavior

No response

Logs

Environment

TTS==0.22.0
torch==2.6.0
torchaudio==2.6.0
transformers==4.49.0

Additional context

No response

@devops724 devops724 added the bug Something isn't working label Mar 3, 2025
@eginhard
Copy link
Contributor

eginhard commented Mar 3, 2025

This repo is not maintained anymore and doesn't work with latest versions of Pytorch and transformers. You can use our fork instead, available via pip install coqui-tts

Copy link

stale bot commented Apr 4, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on but feel free to help.
Projects
None yet
Development

No branches or pull requests

2 participants