ZFTurbo / Music-Source-Separation-Training

Repository for training models for music source separation.
MIT License
469 stars 63 forks source link

inferencing #21

Closed mcdthekid closed 7 months ago

mcdthekid commented 7 months ago

I tried to use a pretrained vocal model for bs roformer and this is the error i get, no idea how to fix it

PS C:\Users\matt\Downloads\Music-Source-Separation-Training-v.1.0.3\Music-Source-Separation-Training-v.1.0.3> python inference.py --model_type bs_roformer --config_path "C:\Users\matt\Downloads\model_bs_roformer_ep_317_sdr_12.9755.yaml.txt" --start_check_point "C:\Users\matt\Downloads\model_bs_roformer_ep_317_sdr_12.9755 (1).ckpt" --input_folder "C:\Users\matt\Downloads\input" --store_dir "C:\Users\matt\Downloads\Music" --device_ids 0

Instruments: ['vocals', 'other'] Traceback (most recent call last): File "inference.py", line 99, in proc_folder(None) File "inference.py", line 75, in proc_folder model = get_model_from_config(args.model_type, config) File "C:\Users\matt\Downloads\Music-Source-Separation-Training-v.1.0.3\Music-Source-Separation-Training-v.1.0.3\utils.py", line 28, in get_model_from_config model = BSRoformer( File "<@beartype(models.bs_roformer.bs_roformer.BSRoformer.init) at 0x24e8d24f160>", line 98, in init TypeError: init() got an unexpected keyword argument 'linear_transformer_depth'
PS C:\Users\matt\Downloads\Music-Source-Separation-Training-v.1.0.3\Music-Source-Separation-Training-v.1.0.3>

ZFTurbo commented 7 months ago

You use config with old code from this repository. Update code and try again. https://github.com/ZFTurbo/Music-Source-Separation-Training/archive/refs/heads/main.zip

mcdthekid commented 7 months ago

i got everything working but do u have a bs roformer model for extracting instrumentals? I have tried all three and so far I can only extract vocals, if i try other its also just vocals

ZFTurbo commented 7 months ago

Extract vocals and after substract vocals from original track. You will have instrumental.

mcdthekid commented 7 months ago

how do I do that? I am new to your code and have no idea how to go about doing that with inferencing

ZFTurbo commented 7 months ago

Currently it's not supported in code. But it's just a 1-2 lines to add. I will do later today.

mcdthekid commented 7 months ago

please send when you do, thank you

ZFTurbo commented 7 months ago

I updated inference.py. Use --extract_instrumental parameter to get instrumental part.