acids-ircam / rave_vst

Other
184 stars 28 forks source link

c10::Error: Method 'encode_amortized' is not defined. #39

Open nagra00 opened 1 year ago

nagra00 commented 1 year ago

I have compiled RAVE VST for MacOS according to the instructions from the readme.

When I load the model nasa.ts I get the error:

"c10::Error: Method 'encode_amortized' is not defined."

This is the case with both the automatically downloaded libtorch and a local source build of libtorch-1.11. Looks like a missing module, but I couldn't find any information about it.

I appreciate any hints on the problem.

nagra00 commented 1 year ago

Have located the problem.

According to torch::jit::model.dump_to_str() "encode_amortized" is defined, but torch::jit::model.find_method() returns nothing. It seems to be a problem in the torch jit parser. I will check this next week.

Fortunately, other models work and with CUDA backend RAVE VST literally flies under MacOS 10.13. With the smallest possible buffer (2048), for example, 'vintage.ts' has a moderate GPU utilization of just about 20 percent. Cool thing!

nagra00 commented 1 year ago

I have now looked at it again and "nasa.ts" does not contain a top level method 'encode_amortized' . The method found by grep is in a submodule.

My question now is: how can I create or convert a model for RAVE-VST?

I have the current version of RAVE 2, but the exporter does not create a model with an 'encode_amortized' method, there is no code to register such a function.

usdivad commented 1 year ago

It looks like encode_amortized() was removed in this commit from just over a year ago: https://github.com/acids-ircam/RAVE/commit/f8d2e3a14bbcde09bca91e36391a64b999b9f73a#diff-2ab48c355b95d4670280afc6ec8db3237a57eac01751bf3fce30ef46b7014b89L136-L155

I wonder if just calling encode() instead of encode_amortized() here https://github.com/acids-ircam/rave_vst/blob/main/source/PluginProcessorProcessing.cpp#L35 might work -- would have to do some modifications to the code that follows since there would no longer be a mean or std. I'll try some stuff out and see!