Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-YuE2-Trainer

ComfyUI Extension: ComfyUI-YuE2-Trainer

Repo Name

ComfyUI-YuE2-Trainer

Author
Starnodes2024 (Account age: 817 days)
Nodes
View all nodes(3)
Latest Updated
2026-09-16
Github Stars
0.05K

How to Install ComfyUI-YuE2-Trainer

Install this extension via the ComfyUI Manager by searching for ComfyUI-YuE2-Trainer
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-YuE2-Trainer in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI-YuE2-Trainer Description

ComfyUI-YuE2-Trainer is an extension for ComfyUI that facilitates the training of machine learning models. It streamlines the process by providing an intuitive interface and tools for efficient model development and testing.

ComfyUI-YuE2-Trainer Introduction

The ComfyUI-YuE2-Trainer is an innovative extension designed to enhance your creative process by allowing you to train the YuE2 model on your own music files. Whether you're working with MP3, WAV, or FLAC formats, this extension empowers you to teach the model the unique style, instrumentation, and vocal timbre of your source audio. By using a trigger word, you can guide the model to generate music that reflects the characteristics of your input files. This tool is particularly useful for AI artists looking to personalize their music generation projects without needing extensive technical knowledge or additional caption files.

How ComfyUI-YuE2-Trainer Works

At its core, the ComfyUI-YuE2-Trainer operates by leveraging the YuE2 model, which consists of three main components: a 2.2 billion parameter autoregressive (AR) language model, a 1.5 billion parameter non-autoregressive (NAR) flow-matching branch, and a 48 kHz stereo variational autoencoder (VAE). Here's a simplified breakdown of the process:

  1. Encoding Audio Files: Your audio files are first encoded into VAE latents. This step is performed once and the results are cached to disk for efficiency.
  2. Training LoRA Adapters: The extension focuses on training LoRA (Low-Rank Adaptation) adapters specifically on the NAR branch. This is done using a flow-matching objective, conditioned on a text prefix that includes your trigger word.
  3. Saving the Model: The trained LoRA is saved in a format compatible with ComfyUI, allowing you to easily load and use it with the native YuE2 checkpoint for music generation. This approach allows you to create a style and timbre adaptation of the model, rather than a full voice clone, as the AR "composer" branch remains unchanged.

ComfyUI-YuE2-Trainer Features

The ComfyUI-YuE2-Trainer offers several features that make it a powerful tool for AI artists:

  • Audio Encoding: Efficiently encodes audio files into VAE latents, supporting various formats like MP3, WAV, and FLAC.
  • LoRA Training: Focuses on training LoRA adapters on the NAR branch, allowing for style and timbre adaptation.
  • Trigger Word Customization: Use a trigger word to influence the model's output, making it reflect the style of your input audio.
  • Native Format Compatibility: Saves the trained model in a format that is directly compatible with ComfyUI, eliminating the need for conversion.
  • Progress Monitoring: Includes a progress bar and training log to keep track of the training process.

ComfyUI-YuE2-Trainer Models

The extension utilizes the YuE2 model, which is a comprehensive music generation model. It includes:

  • AR Language Model: Plans the song and writes semantic tokens.
  • NAR Flow-Matching Branch: Renders VAE latents into sound.
  • VAE: Provides high-quality audio output at 48 kHz stereo. These components work together to enable the generation of music that aligns with the style and timbre of your input audio.

Troubleshooting ComfyUI-YuE2-Trainer

Here are some common issues you might encounter and how to resolve them:

  • Out of Memory (OOM) Errors: If you experience OOM errors, try reducing the clip_seconds setting or using the adamw_8bit optimizer to lower VRAM usage.
  • Inconsistent Results: Ensure ema_decay is set to 0.999 and use the cosine learning rate scheduler to improve consistency.
  • Trigger Word Ineffectiveness: If the trigger word doesn't seem to affect the output, consider increasing the number of training steps or the learning rate.

Learn More about ComfyUI-YuE2-Trainer

To further explore the capabilities of the ComfyUI-YuE2-Trainer, consider visiting the following resources:

  • YuE2-3B Model on Hugging Face: Learn more about the underlying model architecture and its capabilities.
  • ComfyUI GitHub Repository: Discover more about ComfyUI and its features.
  • Community Forums: Engage with other AI artists and developers to share experiences and seek advice. These resources provide valuable insights and support to help you make the most of the ComfyUI-YuE2-Trainer in your creative projects.

ComfyUI-YuE2-Trainer Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

ComfyUI-YuE2-Trainer detailed guide | ComfyUI