Repository navigation
Add support for Yue2 #691
Replies: 48 comments
|
ah checked a few days ago and the last update was a year ago. I will take this. |
|
The demos sounds amazing, esp. Suno V6 is restricting. |
|
Add the GitHub repo link of YuE2 here in case anyone doesn't find it: https://github.com/multimodal-art-projection/YuE |
|
Call it a day and continue optimizing tomorrow. Now RTF is cpp 0.3 vs python 0.31. ~14G VRAM. using the official example https://huggingface.co/m-a-p/YuE2-3B/blob/main/examples/tonight-awake.json. Update: in dev now. yue2_demo.mp4 |
|
I think Q4_0 is safe. Added Q4_0 demos to the HF repo. Current perf:
|
|
@IIIIIllllIIIIIlllll Let me know if it can run on AMD :). This model is pretty impressive. Check this out: heavy metal jingle bells |
no problem ;) |
|
Do you also plan to add support for https://huggingface.co/m-a-p/SheetSage2 - their model for creating ABC sheets to support cover functionality? |
is this on windows? can you upload it? |
|
@tianshuo @prookyon Yue2 on SheetSage 2 inference has been implemented https://github.com/0xShug0/audio.cpp/blob/dev/src/framework/midi/sheetsage2_runtime.cpp. It will be exposed as a standalone model later. |
|
@overallbit Building now! Once finished, you can find them in the “Artifacts” section on this page: https://github.com/0xShug0/audio.cpp/actions/runs/34642627647 (default step is 32. 8 is good enough) |
|
Love this one so far using Windows, but if I use ABC score feature to generate a song, my system drive's remaining space would shrunk to less than 200 MB from 8 gigs left in usual. Also, can you adapt the Cover feature from YuE 2's original WebUI into this project with SheetSage2 and MERT2? |
The same prompt: https://huggingface.co/m-a-p/YuE2-3B/blob/main/examples/tonight-awake.json BF16 weight + F32 vae RTF: ~0.5 It's so big I can't upload. Are there any other prompts I can test?
|
|
@IIIIIllllIIIIIlllll Nice! You can convert it to 128k mp3. Or use one of the demo prompts from https://map-yue2.github.io/ |
SheetSage2 has been added in the dev as a model runtime. I will look at UI carefully latter (not a UI person, and already introduced regression in UI in my commit yesterday) |
@napa3um check the video here #499 (comment) if you open the ABC section you can provide the the audio and extract and edit them. |
https://github.com/multimodal-art-projection/YuE/blob/main/docs/generation.md#save-and-inspect-a-plan-before-synthesis - As I understand it, YuE2 has the ability to generate an ABC plan without generating the final result. |
|
@napa3um We do have the ABC export feature, but it currently requires running the full generation pipeline once. It exports the ABC token IDs as readable ABC text rather than as raw integer token IDs. |
|
@napa3um You should now be able to skip generating the full song and just export the ABC or semantic tokens. Kudos to @engival! |
|
YuE2 on Apple Silicon: M5 Max 128 GB,
Wall is
Two questions:
|
|
@nazeshinjite Thanks for testing! For your two questions: (1) That patch may no longer be needed given the recent ggml Metal changes. (2) Yes. 8 is intended for main for a quick smoke run. Once it’s merged into main, the dev release will become stale and won’t be updated unless there's something new to test. But I recent found a better default could be cfg = 1.0 and 32 NAR steps. |
|
I got it running, compared to the original python from the model authors I almost feel like this implementation struggles more with instrumentals and getting the length correct (mostly unwanted vocals, but maybe I just lucky with random seeds and settings with the python). All of this is based off of a low sample size doing covers with sheetsage. It's almost as if sheetsage2 with the original python captured layered instruments better. (edit: probably not this) Also, some of my instrumental gens, like the attached were with totally empty lyrics (no tags whatsoever), but the web UI forbids that. edit: I tired using the same seed, abc file, caption, parameters, etc. as the python. It's hard to be say anything objective about it since it's expected to be different. But to my ear the 2x audiocpp gens I tried are missing a lot of information that the python version successfully reproduced. instrumental cover generated with original python |
|
@incf-ai Did you test Python and audio.cpp with the same weight dtype? Could you please share the cmd, seed, abc file etc you used? Also, you mentioned a “missing score” issue with SheetSage2 but never followed up with details. I haven’t been able to reproduce it, so I’d appreciate more information on that as well. If you are using https://huggingface.co/Mothersuperior/YuE2-instrumental-cot-full-loras, the prompt needs to be at least "[instrumental]". Update: BTW you can check https://github.com/0xShug0/audio.cpp/tree/main/tests/yue2 these are the parity test scripts. One thing we can’t fully control is the randomness in generation, but you can pass noise or semantic tokens generated by the Python implementation into audio.cpp |
|
Let me know if I missed anything or can provide anything else, I'd be happy to answer any questions.
yes
see json in zip file below, and screenshot below
The missing score appears to have been an issue on my end with not specifying the correct vulkan device number and it possibly erroring out when loading sheetsage but not the main music model
No Lora was used with either the python or audio.cpp -- Using the following to inspect the safetensor files audiocpp vae: FP32 Python input/output folders - include json describing the exact parameters input audio also available upon request |
|
@incf-ai Thanks! These give us something to work from. Could you also share the input audio? |
|
python input: irdd-faexoptim-cyclemagic.mp3 |
|
I'll see if I can find any issues and fix them in time for tomorrow’s release. Let’s get YuE2 as close to perfect as we can! |
|
@incf-ai I removed the empty-string check and used the Python parameters to generate this WAV (converted to 128 kbps for sharing). The empty check is incorrect and shouldn't be enforced, otherwise vocals can leak through. I will fix this. Your logs show that Python used PyTorch 2.8.0 with ROCm 6.4 on an AMD GPU, while audio.cpp used Vulkan. This can change both numerical results and the random sampling trajectory, so the same seed does not guarantee identical output across the two backends. And if you replay the same semantic tokens and noise in C++, the C++ and Python outputs are highly similar (CUDA): Check out the outpus: |
|
They do sound similar and the similarity scores your present are high. Seems good. I hadn't even thought to control for ROCM vs Vulkan. I had halfway expected random seeds to not be reproducible due to the complexity and differences between the python and cpp engines. |
|
Moved to Discussion. In case you’re interested, this branch has additional VRAM optimizations that let YuE2 fit in just 1.7 GB of memory on an iPhone. Yue2_ios_demo_20x.MP4 |


Uh oh!
There was an error while loading. Please reload this page.
A new music generation model was released today:
https://map-yue2.github.io/
All reactions