maum-ai / nuwave2

NU-Wave 2: A General Neural Audio Upsampling Model for Various Sampling Rates @ INTERSPEECH 2022
https://mindslab-ai.github.io/nuwave2
BSD 3-Clause "New" or "Revised" License
278 stars 21 forks source link

Added compatibility with Torch 2.0 #17

Open DarrenAbramson opened 1 year ago

DarrenAbramson commented 1 year ago

I've inserted view as real after setting the return_complex values to true because PyTorch 2.0 deprecates the return_complex into runtime errors.

This allows for use on Mac with cpu. After Sonoma and some PyTorch versions maybe this will also allow for mps, but for now the view_as operators aren't implemented in mps and can't be shifted to cpu fallback.