Generate Music Faster Than It Plays With YuE2
Hey David, is the quality of your
audio generation going down?
In Suno, people are
certainly feeling that way.
They are leaving Suno because they feel
that version 6 is worse than version 5.
Yeah, it looks like they're saying that
the songs they're getting are
soulless garbage.
Yep, and so that on top
of the fact that, of course,
Suno's involved in some
significant lawsuits,
makes you wonder what
alternatives are there for me.
So, people are upset at Suno, they're
leaving, what can they do about it?
Well, here is a great alternative.
It's open-weights, you can
use it right on your machine.
It's YuE2.
And so this is a collaboration across a
variety of different organizations,
including Stanford, NYU, and the Hong
Kong University of Science and Tech.
The performance of this is
competitive with Suno V5 and V6.
So you can also get soulless
garbage out of this?
You can get soulless
garbage really quickly.
Yes, that's right.
So it's a new model.
I see some very high-profile names
there who have collaborated on this.
What have they figured
out that's different?
So, what's different is that it generates
basically the sheet music first,
and then it uses that as scaffolding
to generate the finished song.
Okay, that's interesting.
So, Suno isn't doing that.
It's just generating the
song directly, I guess.
Well, we don't know that.
It's a closed model, but presumably
it's going straight to the end.
So here's how YuE2
performs versus Suno.
So you can see here, here's YuE, right?
And the further to the right,
the better it is in terms of song quality.
And you can see it outperforming
Suno V5, and then of course,
you know, V6 being worse is
a little bit further to the left.
And in both cases, you have
YuE outperforming this.
So, to use YuE2,
you can come into ComfyUI,
where we do image generating and
video generating, open up the templates
menu, and then come here to audio,
or you can just simply search for YuE2.
You'll see that there are two
workflows you can choose from.
Today, we're just going
to cover text to music.
Music cover is really cool,
but that'll be for another time.
David, I got to say,
this looks shockingly simple
compared to some other
ComfyUI workflows.
It is, right?
There's only two main nodes for you to
work with, and it's really straightforward.
In fact, there's only just one
file for you to download.
So, by default, the workflow wants you to
download this 8-bit quantized version of it,
so that quantized
version is great for those
who have very little VRAM,
like 4 gigs maybe.
But if you have something
like 8 gigs of VRAM
or more, just use this one,
it's better quality.
So, once you have that downloaded,
simply refresh with the R key, right?
So you press the R key and that'll
refresh everything here so that it'll pick
up on the files, and then come here
to select what you've downloaded.
Make sure, of course, that you
downloaded it into the checkpoints folder.
So next, you need to
provide it with a prompt
on what kind of song
you want to generate.
And then also provide the lyrics.
And in the lyrics, you can say,
all right, this part
is the verse, this part is
the chorus, and so on.
Won't you get somebody singing chorus?
No, you won't.
In fact, it's pretty good at recognizing that
things in square brackets
don't need to be said.
And where are the sliders for how
soulless or generic you want it to be?
There aren't any, thankfully.
The only other thing that you need
to tinker with is this max duration.
So by default, it comes with
just two minutes max duration.
I give it a bigger number, right?
So 400 seconds is like six
minutes and change, which is
more than what you would
probably want for your music.
So if you want to regenerate this,
you can certainly do that.
However, you got to notice that the seed
here is what determines what gets made.
And here, you got to manually do that.
And I don't like to manually
do stuff with the ComfyUI.
So come into here,
into the text to music node,
and then scroll down to the
seed node and just unplug it.
Just unplug that, and then come
here and choose randomize.
What'll happen now is
that each time you run
this, it'll just generate a new random seed.
That's really good advice, David.
That'll save people a ton
of time and I'm sure some
headache trying to figure
that out the first time.
All right, let's run it as is.
All right, so we're looking for some
upbeat indie pop with some warm
female vocals, some bright electric
guitars, punchy drums, melodic bass.
Sounds like it'll be pretty good.
So, a 2-minute, 28-second song
was generated in 59 seconds.
So you can generate music in less
time than the music itself takes.
That's right. So maybe in the future you
can have infinite music.
Let's have a listen to the song.
Not bad.
Pretty good. Now available on Spotify.
Hey Ilan, that's a nice shirt.
It's reminiscent of some good old times.
Yeah, that's right.
Except for that, it's the modern times,
available now at devilwearsproduct.shop.
Nice.
So this works very well with
other genres, of course.
Let's give it a listen.
And one of the weaknesses of this
model and other music generating
models that I've tested, they want
really hard for there to be lyrics.
So even if in the lyrics
portion of the prompt,
you just say instrumental
in square brackets,
it refuses.
It'll generate gibberish,
and it'll start reading part of
the system prompt, like the
actual music style prompt.
Exactly.
That's interesting,
definitely something for
them to fix, because I was
also going to say that where
I can imagine this being
really useful would be lo-fi
hip-hop, which a lot of people
use as concentration music
when they're working,
and it's already a place where
AI is kind of taken over,
because you don't need
much for that to work.
I can imagine having an
endless lo-fi hip-hop
generator that just runs while you work.
So important to know is that this model is
shared under the Creative
Commons license.
And in the details here,
it says that it's fine to use
for non-commercial
sharing and reproduction.
But you cannot use this
for commercial use.
You're not allowed to use this for your
new ad or to generate profit on Spotify.
Good to know.
So there you have it.
Thanks, David. That's how you use YuE2.
Seems like an amazing model,
one that works super well.
We'd love to hear how people
are using it themselves.
Drop us a link.
We'll see you next time.
See you then.