Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SUC-DriverOld committed Sep 22, 2024
1 parent 8c5625e commit 9978389
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions configs_backup/single_stem_models/config_apollo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ augmentations:
enable: false # enable or disable all augmentations (to fast disable if needed)

inference:
batch_size: 4
num_overlap: 4
batch_size: 1
num_overlap: 2
6 changes: 3 additions & 3 deletions data_backup/msst_model_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,19 @@
},
{
"name": "Apollo_LQ_MP3_restoration.ckpt",
"config_path": "configs_backup/single_stem_models/config_apollo.yaml",
"config_path": "configs/single_stem_models/config_apollo.yaml",
"model_type": "apollo",
"link": "https://huggingface.co/Sucial/Music_Source_Sepetration_Models/resolve/main/Apollo_LQ_MP3_restoration.ckpt"
},
{
"name": "aspiration_mel_band_roformer_sdr_18.9845.ckpt",
"config_path": "configs_backup/single_stem_models/config_aspiration_mel_band_roformer.yaml",
"config_path": "configs/single_stem_models/config_aspiration_mel_band_roformer.yaml",
"model_type": "mel_band_roformer",
"link": "https://huggingface.co/Sucial/Aspiration_Mel_Band_Roformer/resolve/main/aspiration_mel_band_roformer_sdr_18.9845.ckpt"
},
{
"name": "aspiration_mel_band_roformer_less_aggr_sdr_18.1201.ckpt",
"config_path": "configs_backup/single_stem_models/config_aspiration_mel_band_roformer.yaml",
"config_path": "configs/single_stem_models/config_aspiration_mel_band_roformer.yaml",
"model_type": "mel_band_roformer",
"link": "https://huggingface.co/Sucial/Aspiration_Mel_Band_Roformer/resolve/main/aspiration_mel_band_roformer_less_aggr_sdr_18.1201.ckpt"
}
Expand Down
1 change: 1 addition & 0 deletions models/look2hear/apollo.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ def forward(self, input):
this_RI = self.output[i](feature[:, i]).view(B * nch, 2, self.band_width[i], -1)
est_spec.append(torch.complex(this_RI[:, 0], this_RI[:, 1]))
est_spec = torch.cat(est_spec, 1)
est_spec = est_spec.to(dtype=torch.complex64)
output = torch.istft(est_spec, n_fft=self.win, hop_length=self.stride,
window=torch.hann_window(self.win).to(input.device), length=nsample).view(B, nch, -1)

Expand Down
6 changes: 3 additions & 3 deletions webUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,11 @@ def save_config(selected_model, batch_size, dim_t, num_overlap, normalize):
_, config_path, _, _ = get_msst_model(selected_model)
config = load_configs(config_path)
if config.inference.get('batch_size'):
config.inference['batch_size'] = int(batch_size) if batch_size.isdigit() else None
config.inference['batch_size'] = int(batch_size)
if config.inference.get('dim_t'):
config.inference['dim_t'] = int(dim_t) if dim_t.isdigit() else None
config.inference['dim_t'] = int(dim_t)
if config.inference.get('num_overlap'):
config.inference['num_overlap'] = int(num_overlap) if num_overlap.isdigit() else None
config.inference['num_overlap'] = int(num_overlap)
if config.inference.get('normalize'):
config.inference['normalize'] = normalize
save_configs(config, config_path)
Expand Down

0 comments on commit 9978389

Please sign in to comment.