seanghay / uvr-mdx-infer

Ultimate Vocal Remover Inference CLI
33 stars 6 forks source link

UVR_MDXNET_Main Not Support Yet? #4

Closed dogdie233 closed 6 months ago

dogdie233 commented 6 months ago

When running the command python separate.py test.wav -m Models/UVR_MDXNET_Main.onnx -o UVRCache, an exception was threw

Traceback (most recent call last):
  File "D:\Python\Tools\separate.py", line 212, in <module>
    main()
  File "D:\Python\Tools\separate.py", line 206, in main
    vocals, no_vocals, sampling_rate = predictor.predict(file_path)
  File "D:\Python\Tools\separate.py", line 180, in predict
    sources = self.demix(mix.T)
  File "D:\Python\Tools\separate.py", line 108, in demix
    sources = self.demix_base(segmented_mix, margin_size=margin)
  File "D:\Python\Tools\separate.py", line 141, in demix_base
    -_ort.run(None, {"input": -spek.cpu().numpy()})[0] * 0.5
  File "C:\Users\qwqwqwq\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 220, in run
    return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Got invalid dimensions for input: input for the following indices
 index: 2 Got: 2048 Expected: 3072
 Please fix either the inputs or the model.

However, when I replaced the model with UVR_MDXNET_KARA_2.onnx, the program worked.

seanghay commented 6 months ago

@dogdie233 Try specifying the flag

python separate.py test.wav -m Models/UVR_MDXNET_Main.onnx -f 3072 -o UVRCache

You can read more about flags with python separate.py --help

dogdie233 commented 6 months ago

@dogdie233 Try specifying the flag

python separate.py test.wav -m Models/UVR_MDXNET_Main.onnx -f 3072 -o UVRCache

You can read more about flags with python separate.py --help

It work. Thanks you.