home/ atoms/ bag-of-models-ensemble

Demucs uses a weighted ensemble (BagOfModels) of individually trained checkpoints for best performance

The default named models (e.g. htdemucs_ft, mdx) are not single checkpoints but BagOfModels: a list of independently trained models whose per-stem outputs are weighted-averaged. For htdemucs_ft, this is four per-source fine-tuned variants. This is model ensembling at inference: it reduces variance at the cost of N× memory and compute. Custom bags can be defined in a YAML file and used with --repo flag.

Examples

from demucs.pretrained import get_model
bag = get_model('htdemucs_ft')   # returns a BagOfModels
print(bag.models)                # list of 4 individual models

Assessment

What is the advantage of per-source fine-tuned models in a bag vs a single multi-stem model? What is the computational cost?

“Represents a bag of models with specific weights.”
corpus · demucs-music-source-stem-separation · chunk 12