Nodes/ComfyUI-FL-YuE2/FL YuE2 · Train Config
ComfyUI Node

FL YuE2 · Train Config

Twelve dials, and the three that actually change your LoRA

By filliptm·Created 6 days ago·Updated about 14 hours ago· 96
FL YuE2 · Train Config
    • YUE2_TRAIN_CONFIG
    rank64
    learning_rate0.0001
    generated_fraction0.50
    cursor_weight0.08
    sequence_tokens12288
    allow_truncationfalse
    steps1600
    save_every200
    schedule_steps3000
    warmup_steps50
    accumulation2
    seed42
    train_acousticfalse

    What it is and why you'd reach for it

    Train Config produces nothing you can see or hear. It's a settings node: you set the numbers once, wire its single output into the LoRA Trainer, and forget it's there. Its output type is YUE2_TRAIN_CONFIG, and its whole body is a bundle of training hyperparameters tagged as an AR run.

    That AR detail matters, because it's the pack's own scope statement. The docs are blunt that training here supports AR song-generation LoRAs only - NAR/joint training was removed. The acoustic model and VAE still exist and still render your songs; they just aren't what you're training. So no, you can't fine-tune the decoder with this pack, and the node won't pretend otherwise.

    The dials that matter

    steps (default 1600) is where you'll spend your first decision. That's the total optimizer steps, counted cumulatively when you resume - so resuming a 1600-step run doesn't add another 1600, it finishes the same run. For a handful of your own songs, 1600 is a reasonable first swing; if your previews are getting worse past step 1000, that's signal, not noise.

    rank (1–128, default 64) is the capacity knob, and it's much higher than the image-LoRA instinct. The KB's training doc has the general lesson worth repeating: rank tables do not port across architectures - the latent space, the encoder and the target modules all differ - so don't copy "rank 16 for a character" into a music adapter. 64 default and 128 ceiling is the pack's own calibration for these attention and MLP projections.

    save_every (default 200) is honestly the most valuable field on the node, because the last checkpoint is usually not the best one. Every save writes both a LoRA and a resumable training checkpoint, and the final step always saves. Combined with checkpoint previews in the trainer, this is how you end up picking step 800 instead of step 1600 by ear instead of by faith.

    The rest, briefly and honestly

    learning_rate - default 0.0001, range 1e-7 to 0.01. Raising it learns faster and destabilizes faster. This is the parameter most likely to be blamed and least likely to be the problem; leave it alone until steps and rank have been explored.

    generated_fraction (default 0.5, range 0.01–0.99) is the regularizer mix. It's the probability that any given training example comes from the precomputed pack of generated music rather than your recordings - the straight-up equivalent of regularization images in image training, except someone already generated them for you. At 0.5 your recordings and the regularizer get equal time. Drop it toward 0 if the adapter isn't learning your style strongly enough; push it up if the base model's general competence is falling apart.

    cursor_weight (default 0.08, range 0–1) weights the auxiliary lyric-position loss. Set it to 0 for instrumentals, and seriously consider 0 when your lyric transcript is uncertain - including after a Gemini pass over processed vocals. You're weighting a signal against noisy labels.

    sequence_tokens (default 12288, max 24576) is the training sequence budget, and it's the VRAM lever. Full songs need larger values and more VRAM. Long prompts, long songs and a high rank all pull on the same resource.

    allow_truncation (default false) decides what happens when a song exceeds that budget. Left off, an oversized example fails rather than silently losing its ending. That's the right default and an unusually honest design choice: a dataset where half your outros got chopped trains a model that fades out early, and you'd never know why.

    schedule_steps (default 3000) is the length of the cosine LR decay. Keep it unchanged when resuming - the tooltip says so, and it's the kind of thing that quietly changes your run's shape if you fiddle with it mid-flight.

    warmup_steps (50), accumulation (2, i.e. examples accumulated before each optimizer update without batching them all into VRAM), and seed (42, controls both example selection and LoRA initialization - fix it for reproducible comparisons) round out the node.

    Wiring and install

    One output, one consumer:

    Training Models → LoRA Trainer (assets)
    Prepare Dataset → LoRA Trainer (dataset)
    Train Config    → LoRA Trainer (config)
    

    The trainer requires all three when action is train; leave the prep side out and you get pointed error messages rather than a crash.

    Install is the pack install plus the training requirements, since this node is useless without the trainer next to it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/filliptm/ComfyUI-FL-YuE2.git
    cd ComfyUI-FL-YuE2
    python -m pip install -r requirements.txt
    python -m pip install -r requirements-training.txt
    

    Or ComfyUI Manager, search ComfyUI-FL-YuE2. Restart with ComfyUI's interpreter.

    The trap to avoid

    These settings are baked into a run's resume state. Resuming with a different config - different rank, different steps, different sequence budget - is not a supported experiment; the trainer expects matching data, assets and settings. If you want to compare, change output_name and train a second run. Which is also the answer to the single most destructive default on the trainer: a blank resume with an unchanged name overwrites the previous run and its checkpoints. Old checkpoints are cheap. Change the name.

    CategoryFL YuE2/Training

    Inputs (13)

    NameTypeDefaultDescription
    rankINT641–128LoRA rank controls adapter capacity and size. Higher ranks use more training memory and can learn more detail.
    learning_rateFLOAT0.00011e-7–0.01Optimizer update size. Higher values learn faster but can destabilize training or overfit.
    generated_fractionFLOAT0.500.01–0.99Probability of training on a regularizer example instead of your recordings. 0.5 gives each source an equal chance.
    cursor_weightFLOAT0.080–1Weight of the auxiliary lyric-position loss. Set to 0 to disable it, especially for instrumental data.
    sequence_tokensINT12288256–24576Maximum training sequence length in tokens. Full songs need larger values and more VRAM.
    allow_truncationBOOLEANfalseAllow sequences longer than sequence_tokens to be cut short. Disabled makes oversized examples fail instead of silently losing their endings.
    stepsINT16001–100000Total optimizer steps to reach, including steps already completed when resuming.
    save_everyINT2001–5000Save a LoRA and resumable training checkpoint every this many optimizer steps. The final step is also saved.
    schedule_stepsINT30001–100000Length of the learning-rate decay schedule. Keep unchanged when resuming to preserve the schedule.
    warmup_stepsINT500–10000Initial optimizer steps over which the learning rate rises to its configured value.
    accumulationINT21–64Training examples accumulated before each optimizer update. Higher values increase work per step without batching them all in VRAM.
    seedINT420–2147483647Random seed for training example selection and LoRA initialization. Keep fixed for reproducible comparisons.
    train_acousticoptBOOLEANfalseAlso train a token-to-audio acoustic companion from your recordings. Adds VAE target preparation and decoder training; source audio is not needed for generation. Checkpoints automatically include both adapters.

    Outputs (1)

    NameTypeDescription
    YUE2_TRAIN_CONFIGYUE2_TRAIN_CONFIG