-
Notifications
You must be signed in to change notification settings - Fork 620
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
Add YuE (music gen) from fal.ai #2801
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
maybe |
Waiting for it! 😄 |
here you go : 07e1adb 😄 |
def _prepare_payload(self, inputs: Any, parameters: Dict[str, Any]) -> Dict[str, Any]: | ||
parameters = {k: v for k, v in parameters.items() if v is not None} | ||
return { | ||
"lyrics": inputs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder in the future how we will distinguish between "lyrics" (for music-gen) and "text" (for text-to-speech). For now there's only 1 model so let's do it this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, same issue with replicate for this task 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
Similar to huggingface/huggingface.js#1148.
Will keep it as draft for now. I mostly wanted to see how that integration would work given that it doesn't use the same parameters as we have for
text_to_speech
(has an extra"genres"
parameters). For now I added it to the signature + docstring but it's not compliant with https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/src/tasks/text-to-speech/spec/input.json.Another possibility is to add a
text-to-audio
ortext-to-music
but that seems premature given it's a single model, single provider and still experimental. Will have to wait more example before an harmonization.Working code example:
DnwXm1UGLGJZGPPFGbnL.mp4
(what a masterpiece, I know)
Process took 594s (~10min) to run on fal.ai. This means it will fail if we go through HF proxy as there is a 60s timeout. For now only works when passing a FAL_AI key directly. This can be fixed using async/queuing mechanism but out of scope for this PR.