asteroid
asteroid copied to clipboard
Quick fix for XUMX in torch 2.0
Hello!
I know we should ideally rewrite the XUMX model to work with the new torch's complex type, but it is possible to workaround this by just converting the new type to the old format just after calling torch.stft
using torch.view_as_real
and then converting it back to the new type with torch.view_as_complex
before calling to torch.istft
(#662) . This is not the ideal solution but I think it would be useful to allow people to keep using XUMX till the model is fully rewrited.
Best, David
Thank you very much for the PR !
@r-sawata, do you agree ?
Yea I confirmed this PR and actually tried to run it on my local. It looks having no any problems and will be suitable for future update of PyTorch, so I totally agree with this PR.
Thank you so much for your PR, @DavidDiazGuerra.
Could you merge this to master if you're fine, @mpariente?