-
Notifications
You must be signed in to change notification settings - Fork 57
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
i can't generate audio #6
Comments
Could you share the version of your transformers version and how you setup the conda environment? Thanks! I don't have this error in my side. |
Hey @hitchhicker, I get the same warning when running the generation example. I created the environment as explained for Conda:
And my version of transformers is |
Hey @gallilmaimon for providing the information for the setup! I wonder whether this error happens only for python 3.10. I am using 3.9 by the way. What python version are you using? |
I am using |
My python version is also The following is the output of my
I notice that my transformers version is |
I will try downgrading transformers and see if that makes any difference. I will also try to create the environment using pip and not anaconda and let you know if there is any difference. In the pip installation it says:
but the first line gives an error, I think it should be |
Thanks! You are right, |
I tried with
It is worth mentioning that (unlike the issue title) I am managing to generate audio:
but the warning above indicates that I might get wrong results when working with batches which I would like to do... |
Awesome to see that you are able to generate outputs! In fact, we don't really support batch prediction (one prediction can contain multiple texts, multiple audio or mixed of them, but they are still one batch) since the implementation of speech tokenizer does not support that. I see that you have a output of two lists. For each call of |
The outputs are fine and make sense (there are two generate calls) :) I wanted to calculate probabilities of speech only (non-interleaved) samples in batches to calculate sWUGGY metric (like in the paper) or other modelling metrics like SALMon (https://arxiv.org/abs/2409.07437), and doing so without batching can be slow. However, as this is already a bit out pf scope for this issue, I will do that and if I have the same warning or unexplained behaviour there I will open a new issue. Thank you! |
i try use it
but i see errors
/home/.conda/envs/spiritlm/lib/python3.10/site-packages/transformers/generation/configuration_utils.py:579: UserWarning:
pad_token_id
should be positive but got -1. This will cause errors when batch generating, if there is padding. Please setpad_token_id
explicitly asmodel.generation_config.pad_token_id=PAD_TOKEN_ID
to avoid errors in generationwarnings.warn(
how to get PAD_TOKEN_ID
The text was updated successfully, but these errors were encountered: