-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
4.37 ImportError: cannot import name 'SampleOutput' from 'transformers.generation.utils' #28649
Comments
cc @gante |
Just encountered this error and found this thread by google searching it |
Confirm this happens on 4.37.0 |
Me too, literally just happened. I'll try downgrading first. |
Encountered this error as well. Downgrading Transformers to 4.36.2 fixes it. |
This worked for me: Run: |
For anyone currently experiencing this issue - any version of transformers before 4.37 should still be fine i.e. setting |
@amyeroberts Thanks for looking into this Amy & @gante its very appreciated! |
transformers==4.33.0 works for me. |
transformers will import transformers_stream_generator, while transformers_stream_generator has the following import
But in transformers>=4.37, SampleOutput was removed and transformers will raise ImportError although transformers_stream_generator has already been installed.
|
Hi all, a patch has been released which should resolve the issues here: You should be able to revert back to the original requirements.txt file, install the latest transformers and run your code with Coqui's TTS. |
@amyeroberts Thanks so much Amy. I will give it a test at some point soon and feed back if there's any issues. Really appreciate your help with that. |
@amyeroberts Actually managed to give it a quick go now and everything loads up fine again! Awesome stuff! Ill close off the ticket. Again, thanks so much! |
@erew123 Great - thanks for confirming! |
System Info
I am a developer of AllTalk https://github.com/erew123/alltalk_tts/ which uses the Coqui TTS engine https://github.com/coqui-ai/TTS
As of the 4.37 update, I have users reporting this error:
The issue is mainly this:
ImportError: cannot import name 'SampleOutput' from 'transformers.generation.utils'
Downgrading to 4.36.2 of Transformers makes things work fine again.
I looked to see if this could be related to Remove support for torch 1.10 but can find no references to SampleOutput being a part of that.
Would you be able to confirm to me is this something that has been dropped in 4.37 or perhaps an omission that will be resolved in a future update?
Thanks
Who can help?
@sanchit-gandhi (Im guessing you may be the correct person as this is Speech, apologies if not).
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Use transformers 4.37 with the Coqui TTS engine and try to import their XTTS model.
Expected behavior
Of course, for this model to import correctly.
The text was updated successfully, but these errors were encountered: