Closed hunterhogan closed 3 months ago
I've just checked and inference.py
works normally with swin_uppernet
. I added use_amp in config to avoid errors.
args = [
'--model_type', 'swin_upernet',
"--config_path", code_path + "configs/config_vocals_swin_upernet.yaml",
"--start_check_point", code_path + "results/model_swin_upernet_ep_56_sdr_10.6703.ckpt",
"--store_dir", code_path + "results_tracks/",
"--input_folder", 'H:/',
"--device_ids", "0",
"--extract_instrumental",
]
Shape: (1, 2, 261632) seems ok because first dimension is batch size, second channels and third waveform.
@hunterhogan Check also this small edit for swin_upernet to fix the "ValueError: Make sure that the channel dimension of the pixel values match with the one set in the configuration." error message: https://github.com/ZFTurbo/Music-Source-Separation-Training/issues/6#issuecomment-1837159280
@hunterhogan Check also this small edit for swin_upernet to fix the "ValueError: Make sure that the channel dimension of the pixel values match with the one set in the configuration." error message: #6 (comment)
Thanks, I absolutely forgot about this 😭
@hunterhogan Check also this small edit for swin_upernet to fix the "ValueError: Make sure that the channel dimension of the pixel values match with the one set in the configuration." error message: #6 (comment)
Thanks, I absolutely forgot about this 😭
Editing the transformers package fixed it. I would never have thought of that!
I made a pull request for the requirements.txt.
config downloaded from releases.
split_torch_state_dict_into_shards
is included starting from huggingface-hub version 0.23.0. tokenizers 0.14.0 and 0.14.1 requires huggingface-hub<18.0 and transformers==4.35.0 requires tokenizers=0.14.*Installed by changing requirements.txt:
But:
So:
pedalboard~=0.8.1
Then:
So, a few errors later, utils.py:
Then:
ValueError: Make sure that the channel dimension of the pixel values match with the one set in the configuration.
So, I looked at:
if len(batch_data) >= batch_size or (i >= mix.shape[1]):
arr = torch.stack(batch_data, dim=0)
arr.shape = torch.Size([1, 2, 261632])I was confused, so mix.shape = torch.Size([2, 3038448]). I didn't think it would work, but I tried concatenate:
arr = torch.cat(batch_data, dim=0)
arr.shape = torch.Size([2, 261632])The value error went away, but:
I'm out of ideas now.