Alter 4Band_ens_inference.py to prevent crashing

This change should prevent 4Band_ens_inference.py from crashing or only partially completing all the inference rounds when the window size is set below 320.
The NewLayer models fail when the size is below 320, so this change simply sets a lower limit of 320 for those rounds.
This commit is contained in:
Nerdy314159265 2021-05-16 04:30:37 -05:00 committed by GitHub
parent 59a08e668c
commit cb076dfc80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -632,7 +632,7 @@ def main():
print('done')
vr = VocalRemover(model, device, args.window_size)
vr = VocalRemover(model, device, max(args.window_size,320))
if args.tta:
pred, X_mag, X_phase = vr.inference_tta(X_spec_m, {'value': args.aggressiveness, 'split_bin': mp.param['band'][1]['crop_stop']})
@ -747,7 +747,7 @@ def main():
print('done')
vr = VocalRemover(model, device, args.window_size)
vr = VocalRemover(model, device, max(args.window_size,320))
if args.tta:
pred, X_mag, X_phase = vr.inference_tta(X_spec_m, {'value': args.aggressiveness, 'split_bin': mp.param['band'][1]['crop_stop']})
@ -862,7 +862,7 @@ def main():
print('done')
vr = VocalRemover(model, device, args.window_size)
vr = VocalRemover(model, device, max(args.window_size,320))
if args.tta:
pred, X_mag, X_phase = vr.inference_tta(X_spec_m, {'value': args.aggressiveness, 'split_bin': mp.param['band'][1]['crop_stop']})