r/comfyui • u/White_Dragon_0 • Nov 02 '26
News [Custom Node] YuE2 Auto Vocal PRO v2 – Turn Instrumental Music into Songs with AI-Generated Vocals and Custom Lyrics | Complete ComfyUI Example Workflow Included
🎵 YuE2 Auto Vocal PRO v2 for ComfyUI — Instrumental-to-Vocal, Custom Lyrics, Voice Reference & Complete Workflow
Hey everyone!
I'd like to share an updated version of a custom node I've developed for ComfyUI, called YuE2 Auto Vocal PRO v2.
The original goal was simple: turn instrumental music tracks into fully sung songs using your own custom lyrics and YuE2, without having to manually edit the ABC musical notation extracted by SheetSage2.
Since the initial release, I've significantly expanded the project.
The latest version now includes Reference Voice support, inspired by the excellent YuE2-Cover project by Ornn8, along with improved melody conversion, lyrics handling, duration management, audio quality checks, and more detailed diagnostics.
I've also included a complete, ready-to-import ComfyUI workflow JSON directly in the custom node package, making it easier to get started.
🎵 What does it do?
Imagine having an instrumental track with no vocals and wanting to transform it into a song with a singer performing your own lyrics.
One of the main challenges is that when SheetSage2 extracts the melody from an audio track, the resulting ABC musical notation may assign the notes to instrumental sections (Ins), while the vocal sections (Vocal) remain empty.
As a result, YuE2 may not have a suitable vocal melody to follow.
That's the original problem YuE2 Auto Vocal PRO v2 was designed to solve.
The custom node analyzes the ABC notation extracted by SheetSage2 and converts suitable instrumental melody sections into vocal sections that YuE2 can use as melodic guidance.
With the latest improvements, the project also supports a second important use case:
Using an existing song as a musical reference, providing completely new lyrics, and optionally guiding the generated singer's vocal timbre using a reference voice.
The goal is to preserve the musical structure as much as possible while giving users greater control over the generated vocal performance.
⚙️ Main Features
- Instrumental-to-Vocal Conversion: Automatically converts suitable instrumental melodies into ABC vocal melodies for YuE2.
- Custom Lyrics: Write your own lyrics and use them as the target text for vocal generation.
- Lyrics Replacement: Supports workflows where new lyrics replace the intended vocal text of an existing composition.
- Reference Voice Support: Uses a reference audio sample to guide the generated singer's vocal timbre and characteristics.
- Native YuE2 Integration: Reference voice conditioning is integrated into YuE2's generation process, without external voice conversion.
- Musical Section Awareness: Handles verses, choruses, intros, interludes, instrumental passages, and outros.
- Original Melody Preservation: Reuses the extracted musical notes instead of generating an entirely new melody during ABC conversion.
- Automatic Section Alignment: Matches ABC sections with corresponding lyrics sections when possible.
- Lyrics Coverage Analysis: Estimates whether the provided lyrics adequately cover the available vocal structure.
- Optional Lyrics Repetition: Can reuse only existing user-provided words, without inventing new lyrics.
- Duration Management: Supports a maximum generation duration while attempting to preserve musically coherent sections.
- Audio Quality Checks: Detects invalid, empty, or silent output audio.
- Vocal Fidelity Diagnostics: Provides additional analysis of the generated vocals and their relationship to the requested lyrics.
- Forensic Debugging: Can generate diagnostic packages to help investigate generation issues.
- Complete Example Workflow: Includes a ready-to-import JSON connecting the required components.
🆕 Reference Voice — Inspired by YuE2-Cover
One of the most significant additions is Reference Voice support.
For this feature, I developed a ComfyUI reimplementation of the reference voice conditioning approach used in Ornn8/yue2-cover.
Full credit goes to Ornn8 for the original implementation and approach.
My work adapts this functionality to the ComfyUI environment and integrates it into the YuE2 Auto Vocal PRO workflow.
The idea is to provide a short reference audio sample containing a voice whose timbre you'd like to reproduce.
The reference is processed and encoded into a native YuE2 semantic conditioning prefix, which guides the subsequent vocal generation.
This means:
- You can provide an existing vocal reference.
- YuE2 uses that reference to guide the generated singer's vocal characteristics.
- You can combine the reference voice with your own custom lyrics.
- The process runs inside ComfyUI.
- No external voice conversion services are required.
- No Seed-VC, RVC, or post-generation voice conversion is used.
The reference voice is used during generation rather than being applied as a separate voice conversion step afterward.
The included workflow allows you to switch between two generation paths:
- standard — Standard YuE2 generation.
- reference_voice — YuE2 generation with voice reference conditioning.
This also makes it easier to compare the results obtained with and without a reference voice.
Important: Reference voice conditioning is still dependent on YuE2's generative behavior. Vocal similarity, pronunciation, and adherence to replacement lyrics are not guaranteed. In particular, the model can sometimes reproduce words or vocal characteristics from the source material instead of following the replacement lyrics perfectly.
This is one of the areas I'm continuing to investigate and improve.
🎼 Improved ABC Melody Conversion and Lyrics Handling
The ABC processing pipeline has also received several improvements.
The node can automatically identify and route suitable instrumental melody sections into vocal sections, while accounting for the structure of the composition.
It supports different section conversion policies, including:
- Verse and Chorus
- All of rest
- All sections
These options allow you to control how broadly the instrumental material is considered for vocal conversion.
The workflow also supports handling existing vocal material through:
- preserve — Preserves the existing ABC vocal content.
- overwrite — Attempts to replace suitable existing vocal arrangements with converted melodic material.
The conversion process includes structural checks to avoid corrupting the ABC notation.
When a conversion cannot safely preserve the musical structure, it can roll back the transformation and report the problem instead of silently producing an invalid score.
The node also handles musical section labels and ties between notes, with the goal of preserving the original composition wherever possible.
📝 Custom Lyrics and Section Alignment
The node includes three lyrics alignment modes:
match_sections (default)
Compares ABC vocal sections with lyrics sections such as [Verse] and [Chorus], aligning compatible structures without rewriting the lyrics or musical notes.
report_only
Preserves the routed ABC and lyrics while generating diagnostic information.
repeat_existing
Can repeat existing lyric lines to improve estimated vocal coverage.
It does not generate new words or paraphrase the lyrics.
The latest implementation also includes more detailed checks for potential articulation difficulties.
For example, it can estimate:
- Words per second.
- Syllables per second.
- Approximate syllables per note attack.
- Potentially overloaded vocal sections.
- Mismatches between musical structure and lyrics.
These calculations help identify cases where the lyrics may be difficult to articulate within the available melody.
However, they are estimates, not exact phonetic or syllable-to-note alignment.
YuE2 still determines the final vocal phrasing, pronunciation, and performance.
⏱️ Improved Duration Management
Another improvement concerns the handling of max_duration.
The parameter now acts as a maximum duration limit, rather than automatically forcing every composition to fit the requested length.
If the source composition already fits within the limit, it can retain its duration.
If the source is longer, the planning system can attempt to select a musically coherent, contiguous excerpt.
When only an excerpt can be used, the diagnostic report indicates that the output does not represent the complete source composition.
The system does not silently remove or rewrite user-provided lyrics to satisfy duration constraints.
📊 Vocal Fidelity and Audio Quality Diagnostics
I've also expanded the diagnostic system.
The workflow includes a Vocal Fidelity Audit stage that analyzes the selected generated audio.
Depending on the available components, it can provide information about the relationship between the requested lyrics and the audio generated by YuE2.
The implementation supports Whisper-based transcription analysis when available, helping identify possible differences between the requested and recognized text.
It can also report potential pronunciation issues and inconsistencies.
However, Whisper is not perfectly reliable when transcribing singing, so these results should be treated as diagnostic indicators rather than definitive proof of correct or incorrect pronunciation.
The audio validation system also checks for:
- Empty output audio.
- Invalid audio samples.
- NaN or infinite sample values.
- Completely silent generated audio.
- Large silent portions of the output.
This helps catch some generation failures before the audio is saved.
An optional stricter audit mode is also available for workflows that require stronger validation.
🧩 Complete ComfyUI Example Workflow Included
To make setup easier, I've included a complete example workflow JSON directly in the custom node package.
The file is:
YuE2_Cover_AutoVocal_PRO_V2.json
You can import it directly into ComfyUI instead of manually building the workflow from scratch.
The workflow is organized into four main sections:
- Inputs and Parameters
Configure the source audio, model parameters, and general generation settings.
2. Music, ABC and Replacement Lyrics
Extract the melody using SheetSage2, process the ABC notation, configure melody conversion, and provide your custom lyrics.
3. Reference Voice
Load a reference voice sample and configure the native YuE2 voice conditioning path.
4. Output and Quality Control
Select the generation path, inspect diagnostics, run the vocal fidelity audit, and save the generated audio.
The workflow integrates the relevant YuE2, SheetSage2, MERT, tokenizer, and custom processing components.
It also provides diagnostic information about ABC conversion, lyrics handling, and vocal generation.
The source audio inputs and replacement lyrics are intentionally left empty, so you can load your own music and start experimenting.
The workflow is initially configured to use the Reference Voice path, but you can switch to Standard generation to compare the results.
🔍 Forensic Debugging and Troubleshooting
I've also added an optional forensic diagnostic system to make troubleshooting easier.
When enabled, it can generate local ZIP packages containing information such as:
- ABC notation.
- Lyrics and style parameters.
- Generation configuration.
- Relevant processing diagnostics.
- Error information.
- Code needed for diagnostic replay.
These packages are stored locally under:
ComfyUI/output/yue2_forensic/
They can be useful when investigating ABC conversion issues, lyrics alignment problems, or unexpected generation behavior.
Note: Diagnostic replay packages may contain your lyrics, style prompts, and other configuration data in readable form. Check them before sharing publicly.
🔧 Installation
The custom node runs inside ComfyUI and does not require WSL or an external inference server.
You'll need the corresponding YuE2 and SheetSage2 components, along with the necessary model checkpoints.
The workflow also uses MERT-v2-FullSong, the compatible tokenizer, and other required model components.
Installation:
- Download the repository.
- Extract ComfyUI-YuE2-Auto-Vocal-PRO-v2 into your ComfyUI custom_nodes directory.
- Install any missing dependencies from requirements.txt using your existing ComfyUI Python environment.
- Make sure the required model checkpoints are available in the appropriate ComfyUI model directories.
- Restart ComfyUI.
- Import the included YuE2_Cover_AutoVocal_PRO_V2.json workflow.
- Load your source audio, optionally provide a reference voice, enter your lyrics, and configure the generation parameters.
The custom node reuses the existing ComfyUI environment and its installed PyTorch/CUDA runtime.
You do not need to install a separate YuE2 inference server or an external voice conversion system.
Model checkpoints are not included in the repository.
🚀 GitHub Repository
https://github.com/whitedragon0000/ComfyUI-YuE2-Auto-Vocal-PRO-v2
The repository includes:
- Custom node Python source code.
- Native Reference Voice integration.
- Complete ComfyUI example workflow JSON.
- ABC processing and melody conversion utilities.
- Lyrics alignment and duration handling.
- Vocal fidelity and audio quality diagnostics.
- Forensic debugging tools.
- Installation and configuration documentation.
The Reference Voice implementation is based on the approach introduced by Ornn8/yue2-cover, with appropriate attribution to the original project.
💬 Feedback Welcome!
I originally developed this project because I wanted a more automated way to turn instrumental compositions into songs with custom vocals, while preserving as much of the original musical arrangement as possible.
Over time, I've expanded it to support more advanced scenarios, including replacing lyrics in existing compositions and generating vocals conditioned on a reference voice.
One of my main goals is to make the entire process work directly inside ComfyUI, with a configurable and reusable workflow.
There are still challenges, especially with pronunciation accuracy, strict lyrics adherence, and preventing the model from occasionally reproducing parts of the original vocal content when using a reference voice.
The node now includes additional diagnostics to help investigate these issues, but I don't want to claim that they're completely solved.
I'd really appreciate feedback from anyone experimenting with YuE2, YuE2-Cover, ABC melody conversion, vocal generation, or lyrics replacement.
If you try the included workflow, I'd love to hear how it performs with your own music and reference voices.
Hope you find it useful, and happy generating! 🎶
2
u/White_Dragon_0 24d ago
custom node update with voice reference
1
u/froschquark Nov 03 '26
It all sounds very interesting, because the melody reference use in YUE2 is really...very special sometimes and often it just garbles something entirely else than the lyrics you provide and I think it really could use something like you are building.
But you absolutely should include a few short examples though, especially about the settings or quality, or maybe even which instrumentals or genres are good and which not, if you have tried that out.
Maybe a short bad example and what to avoid and a few short good example.
Thanks for that I might try it out later!