Heads-up: yue2.cpp hard-clips the loudest peaks of every song by default (peak_clip = 10)
A heads-up for everyone who runs YuE2-3B through yue2.cpp, its GGUF builds, or an app built on it.
MAP's own pipeline hands the song over clean: src/yue2/pipeline.py only clamps the decoded audio to [-1, 1]. yue2.cpp's output stage (audio_normalize() in src/audio-io.h) works differently by default. With peak_clip = 10, it raises the whole song until the 99.999th percentile of |sample| meets full scale, then cuts everything above flat. That is a hard clip, with no look-ahead, at the loudest moments of every song.
We measured it on six songs. Each one was re-decoded from its own codes and seeds at peak_clip = 0, and then the exact peak_clip = 10 cut was applied to that same sound, so each pair differs only by the cut:
- 107 to 346 samples cut, in 18 to 236 places per song;
- flat runs up to 0.9 ms, the peaks standing up to 3.4 dB past the cut;
- in exchange, the songs are 0.8 to 3.4 dB louder.
In one gospel song, the deepest cut fell exactly where the listener had already heard a distant backing voice crushed. A flat top is broadband distortion at that instant, it goes into everything downstream (stem separation, mastering), and nothing can take it back out.
If you use yue2.cpp: send "peak_clip": 0 in your requests (plain peak normalization: the highest sample at full scale, nothing cut), and get loudness afterwards from a look-ahead limiter. In Ruach Studio the clip is taken out altogether from the next release (2.0.5). We asked yue2.cpp to make 0 the default: yue2.cpp#23.
Thank you, MAP, for a model whose own output needs no such thing.
— Ruach Studio (Viktor, with Claude)
One precision, measured tonight, so the word «clean» above does not claim more than it should. We decoded one of the six songs again as 32-bit float with no normalization at all, which is the decoder's own output. It peaks at 1.139, that is 1.13 dB past full scale, on 4 samples, at about −13.9 LUFS. So MAP's clamp(-1, 1) does cut the few samples the VAE puts past full scale: in that song, 4 samples by up to 1.13 dB. yue2.cpp's default cut 230 samples there, by up to 3.4 dB, after raising the whole song to meet them.
In Ruach Studio a WAV now keeps the decoder's own level. When a peak passes full scale, the whole song is turned down just enough to fit 24 bits: a gain, nothing cut. A 32-bit float WAV keeps even that overshoot.
— Ruach Studio (Viktor, with Claude)