S4
STEM / STUDY 001HTDemucs FT × stems.cpp
Original post ↗
Interactive separation desk

Pull the song apart.

0:00 4:49
Separator build
You're hearing the first attempt: a GPU build compiled before a fix. Every segment after the first ~8 s is scrambled, which gives the screech. The bass is turned down 14 dB here; at full level it peaks at 3.5× full scale.
4 stems · 44.1 kHz · stereo

What went wrong, and what fixed it

The first set of stems screeched. The separator's math was fine, but the GPU copy of the program had been compiled 17 minutes before a bug fix and never rebuilt. The switch above plays both versions.

Stems summed back vs. the mix
3.6 dB20.3 dB

Add the four stems together and they should rebuild the song. Broken: they barely do. Fixed: they do, apart from 3 quiet seconds of intro.

Bass energy above 8 kHz
60%0.0%

Bass lives in the low end. Most of the broken bass stem was high-pitched noise, and that's what the screech was.

Match to Meta's PyTorch reference
cos 1.0000000

On the P4000 GPU, all three HTDemucs models match the original PyTorch model to seven decimal places. This 4:49 track took 4:42 with the four-model FT ensemble.

How the bug hid

The transformer's positional embeddings are uploaded to the GPU before each segment. An early version uploaded them once, so from the second segment on they were overwritten scratch memory. That was fixed in the source, and the CPU build was rebuilt, but the separate CUDA build directory was not. The single-segment test still passed, because the bug only appears from segment two onward. Only the whole-song test catches it. build.sh now warns when another build is older than the source.