ZFTurbo / Music-Source-Separation-Training

Repository for training models for music source separation.
MIT License
491 stars 68 forks source link

Fixed: Demixing full directory slows to a crawl #80

Closed Cortexelus closed 1 month ago

Cortexelus commented 1 month ago

Problem

Running on a full directory, with --instrumental flag, will start fast but then slow to a crawl.

What is happening is the list of instruments to save to WAV files keeps getting an extra "instrumental" appended. So by the 100th track in the directory, track100_instrumental.wav is being saved redundantly 100 times

Solution

The offending line: https://github.com/ZFTurbo/Music-Source-Separation-Training/blob/67af6a467fc9b4c4c35f6a4e9414ec13f61c6b92/inference.py#L97

Should be

if "instrumental" not in instruments:
   instruments.append('instrumental')
ZFTurbo commented 1 month ago

I added fix in repo