YuE2 trainer: notes from four runs on Windows (step-time collapse fix, CUDA-graph sampling crash) + a question about high-frequency "burn" on small sets
Thanks for the YuE2 support. The joint planner + decoder LoRA gives clearly better voice identity than what we had before, and we have published several LoRAs trained with it. Below is what we ran into over four runs, in case it is useful, plus one question.
Setup: Windows 11, RTX 5090 32 GB, ai-toolkit 0.13.16 (Pinokio install), arch: yue2 on the Comfy-Org int8 ConvRot checkpoint, rank 32, lr 5e-5, ar_lr_multiplier 0.6, ar_kl_weight 0.2, cot: full, abc_dropout 0.5, ar_max_tokens 4000, train_window_frames 1500, batch 1, adamw8bit, sampling disabled. Datasets of 15 to 34 songs.
1. Step time collapses from ~4 s to 100+ s on Windows (fix found)
Steps start at 2 to 5 s, then degrade to 100+ s within a few hundred steps while "Shared GPU memory" grows to ~20 GB. It looks like caching-allocator fragmentation from the variable song lengths. On Windows the driver's system-memory fallback means there is never an OOM, so the cache never gets flushed and everything pages over PCIe. PYTORCH_ALLOC_CONF=garbage_collection_threshold did not help.
What fixed it: a torch.cuda.empty_cache() right after self._note_train_call() in get_noise_prediction (extensions_built_in/audio_models/yue2/yue2_model.py). VRAM went from pinned at 32 GB to about 18 GB and steps stayed at 3 to 7 s for whole runs. Happy to send a PR if you want it (maybe behind a model_kwarg).
2. In-training sampling with CUDA graphs crashes the next train step
With sampling enabled and the default AR CUDA graphs, the first train step after a sample fails with Offset increment outside graph capture. Workaround: ar_cuda_graphs: false in model_kwargs (eager samples then take about 6 minutes each), or disable sampling.
3. Minor: first start dies after the MERT download
The first launch can die with the hf_hub error "client has been closed" right after the long MERT download. Restarting the job works.
4. Question: high-frequency "burn" that grows with passes per song
By ear, renders from later checkpoints pick up a gritty, burnt high end on noise-like sounds: inhales, whispered lines, "s" sounds and cymbal swells. Sung tone stays clean. It scales with passes per song rather than with raw step count:
| set | items | clean by ear | burned by ear |
|---|---|---|---|
| A | 15 | steps 300 to 350 (20 to 23 passes) | step 400 onward, obvious at 500 to 650 (33 to 43 passes) |
| B | 33 | up to 650 (20 passes) | not reached |
| C | 34 | up to 600 (18 passes), faint traces | not reached |
Lowering the planner strength does not change it, which points at the decoder half. The mean loss/ar_kl for set A at step 650 was 1.55 versus 0.95 to 1.18 for the larger sets, so the planner drifts faster on the small set too, but the KL anchor only covers the AR expert.
- Is this a known behaviour of the NAR/flow half on small sets?
- Is there a recommended way to restrain the decoder the way
ar_kl_weightrestrains the planner (a lower decoder LR multiplier, a different timestep distribution, fewer decoder-targeted modules)? - We could not confirm it with simple meters (HF band energy and frame-to-frame flicker did not separate clean from burned renders), so this is an ear report. We can share paired renders (same seed and score, different checkpoint) if useful.
One unproven suspect on our side: part of the training audio came from lossy sources, and these are exactly the sounds lossy codecs damage. The renders do not reproduce a codec lowpass, so we cannot show it.
Source: ostris/ai-toolkit