coremltools icon indicating copy to clipboard operation
coremltools copied to clipboard

Support for iSTFT

Open ari-ruokamo opened this issue 1 year ago • 3 comments

🌱 Describe your Feature Request

I am trying to convert a Music Source Separation (MSS) Pytorch models using CoreMLTools using this guide https://apple.github.io/coremltools/docs-guides/source/convert-pytorch-workflow.html to later integrate with my inference implementation in Swift. The model uses both torch.stft and torch.istft in its functionality. The tracing stops in error of absence of iSTFT conversion functionality.

How can this feature be used?

Inverse STFT is essential functionality in MSS and other audio applications.

Describe alternatives you've considered

None yet, to work around this any pointers are appreciated.

ari-ruokamo avatar Sep 01 '24 11:09 ari-ruokamo

Our complex expert @junpeiz

Are we able to convert them given current op set, or do we need to file feature request to Core ML framework?

YifanShenSZ avatar Sep 06 '24 18:09 YifanShenSZ

There is a iSTFT implementation here: https://github.com/apple/coremltools/pull/2029

It should work for most cases, and we haven't checked in the code because there are some CI failures on the Intel machine.

junpeiz avatar Sep 06 '24 23:09 junpeiz

There is a iSTFT implementation here: #2029

It should work for most cases, and we haven't checked in the code because there are some CI failures on the Intel machine.

Thank you. Did not realize to peek into PRs - will definitely look into this one and try it.

ari-ruokamo avatar Sep 07 '24 09:09 ari-ruokamo