maxrmorrison / torchcrepe

Pytorch implementation of the CREPE pitch tracker
MIT License
407 stars 63 forks source link

Fix median filter issue #24

Closed RVC-Boss closed 1 year ago

RVC-Boss commented 1 year ago

https://github.com/maxrmorrison/torchcrepe/issues/23

pytorch version: 1.10.0 torchcrepe version: 0.0.19

File "/root/miniconda3/lib/python3.9/site-packages/torchcrepe/filter.py", line 90, in median x_masked = torch.where(mask.bool(), x, float("inf")) RuntimeError: expected scalar type float but found double

(Pdb) x.dtype torch.float32

pd = torchcrepe.filter.median(pd, 3) pd.dtype is float32

maxrmorrison commented 1 year ago

Thanks for catching this. It looks like your commit may have changed, e.g., the line endings of the file, such that all lines are being changed, rather than just the line that needs to be fixed. Could you add a new commit that addresses this?