home/ atoms/ custom-bag-of-models-source-separation

Custom separation model bags let you combine multiple checkpoints with per-source weights

After training individual Demucs checkpoints with Dora, you can combine them into a custom BagOfModels by creating a YAML file modelled on demucs/remote/mdx.yaml. The YAML lists model signatures and weights (a list of lists: outer list is over models, inner list is over sources), allowing different models to contribute more or less to each stem. This is how the official htdemucs_ft and mdx bags are built. You can then run the bag with demucs --repo ./release_models -n my_bag track.mp3. This technique is also used to combine time-domain and hybrid-domain models, which are complementary in the frequency bands they model well.

Examples

# Export trained checkpoints first:
python3 -m tools.export 9357e12e e312f349

# Then define a bag in release_models/my_bag.yaml
# and use it:
demucs --repo ./release_models -n my_bag track.mp3

Assessment

Why might you want different per-source weights in a model bag rather than equal weights for all sources and all models?

“If you want to combine multiple models, potentially with different weights for each source, you can copy `demucs/remote/mdx.yaml` to `./release_models/my_bag.yaml`.”
corpus · demucs-music-source-stem-separation · chunk 76