Closed rogermiranda1000 closed 2 months ago
Download the zip from releases folder. baseline.pth is included there.
I think that the program searches for ./models/baseline.pth
@hykilpikonna what I mean is that you have to run the script in the same folder
if you run python3 vocal-remover/inference.py --input ... it won't work
The problem lies on the torch load (line 127), as it's a relative path.
Changing it for something like this should work: model.load_state_dict(torch.load( os.path.join(os.path.dirname(os.path.abspath(__file__)), args.pretrained_model) , map_location=device))
我认为该程序搜索。/ models/baseline.pth,所以如果你运行
python3 vocal-remover/inference.py --input ...
,它将不起作用。
所以运行的时候报这个错误应该怎么解决?
Download the zip from releases folder. baseline.pth is included there.从releases文件夹下载zip。baseline.pth包含在其中。
where is release folder?
@tsurumeso I think this issue has been misleading... I'm not complaining about "not being able to find the .pth"; as others said, you have to download it from the release. I'm complaining about "the program can't find the .pth, if it's not launched from the same base folder".
You can try to go one directory up, and run python3 vocal-remover/inference.py --input ...
you'll get an error. The PR https://github.com/tsurumeso/vocal-remover/pull/138 should fix that issue.
I think that the program searches for ./models/baseline.pth, so if you run
python3 vocal-remover/inference.py --input ...
it won't work.