acids-ircam / rave_vst

Other
184 stars 28 forks source link

High CPU usage caused by `encode_amortised` #18

Open iorhythm opened 2 years ago

iorhythm commented 2 years ago

Hi there,

I forked this repository and have been working on it using a Windows 10 / VS2019 machine. Please have a look at the fork here if you like: https://github.com/iorhythm/rave_vst

I am working with a Release configuration (can't use the Debug configuration because some part of libtorch seems to be throwing an exception whilst loading the model..), and I noticed that whilst the RAVE standalone version opens fine, it uses between 75-95% CPU use (6-core Intel i5 9600K @ 3.7 GHz).

This is due to a call in RAVE::encode_amortised(). I'm not familiar with libtorch to find out why this is, or whether it can be optimised (I can only imagine there's lots of linear algebra going on in real-time, quite possibly due to the complexity of the model etc etc).

Any idea as to whether something could be done to reduce CPU usage?

Thanks in advance