acids-ircam / rave_vst

Other
184 stars 28 forks source link

Standalone and VST crashes when loading a model #10

Closed jreus closed 2 years ago

jreus commented 2 years ago

Hey there. I'm still getting crashes even with the latest updates (as of 5 May 2022) on Linux (Kubuntu 20.04 LTS). I've exported a custom model using python export_rave.py --run ../models/rave/animal1/e13397.ckpt --stereo true (the exported model can be downloaded here)

And I've built rave_vst using

cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release -j 8

When I load a custom model I get this error dump from RAVE standalone:

/home/user/rave_vst/build/rave-vst_artefacts/Release/Standalone/RAVE 
/home/user/.config/ACIDS/RAVE/
[-] Network - No API response
[ ] RAVE - Encode parameters     1
    1
    8
 2048
[ CPULongType{4} ]
[ ] RAVE - Decode parameters     8
 2048
    2
    1
[ CPULongType{4} ]
[+] RAVE - Model successfully loaded: /home/user/.config/ACIDS/RAVE/animal_e13397_stereo.ts.ts
 - sr : 0
 - latent size : 0
 - full latent size : 0
 - ratio2048
to low; setting rate to : 11
terminate called after throwing an instance of 'c10::Error'
  what():  Trying to create tensor with negative dimension -8: [1, -8, 1]
Exception raised from check_size_nonnegative at ../aten/src/ATen/EmptyTensor.h:9 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x6b (0x7f8cfa0a57ab in /home/user/rave_vst/build/torch/libtorch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0xce (0x7f8cfa0a115e in /home/user/rave_vst/build/torch/libtorch/lib/libc10.so)
frame #2: at::detail::empty_generic(c10::ArrayRef<long>, c10::Allocator*, c10::DispatchKeySet, c10::ScalarType, c10::optional<c10::MemoryFormat>) + 0x44c (0x7f8cfb56ab1c in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #3: at::detail::empty_cpu(c10::ArrayRef<long>, c10::ScalarType, bool, c10::optional<c10::MemoryFormat>) + 0x55 (0x7f8cfb56bae5 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #4: at::detail::empty_cpu(c10::ArrayRef<long>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) + 0x49 (0x7f8cfb56bb69 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #5: at::native::empty_cpu(c10::ArrayRef<long>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) + 0x33 (0x7f8cfba92da3 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #6: <unknown function> + 0x1d0c673 (0x7f8cfc202673 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #7: at::_ops::empty_memory_format::redispatch(c10::DispatchKeySet, c10::ArrayRef<long>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) + 0x145 (0x7f8cfbf91db5 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #8: <unknown function> + 0x1cf1f78 (0x7f8cfc1e7f78 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #9: at::_ops::empty_memory_format::call(c10::ArrayRef<long>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, c10::optional<c10::MemoryFormat>) + 0x1f8 (0x7f8cfbfd13d8 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #10: at::empty(c10::ArrayRef<long>, c10::TensorOptions, c10::optional<c10::MemoryFormat>) + 0x101 (0x7f8cfb70c0d1 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #11: at::native::randn(c10::ArrayRef<long>, c10::optional<at::Generator>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) + 0xf9 (0x7f8cfba987c9 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #12: at::native::randn(c10::ArrayRef<long>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) + 0x51 (0x7f8cfba98951 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #13: <unknown function> + 0x1ef0d6d (0x7f8cfc3e6d6d in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #14: at::_ops::randn::redispatch(c10::DispatchKeySet, c10::ArrayRef<long>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) + 0x143 (0x7f8cfbd88753 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #15: <unknown function> + 0x1cf0ebe (0x7f8cfc1e6ebe in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #16: at::_ops::randn::call(c10::ArrayRef<long>, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>) + 0x1a5 (0x7f8cfbdcfce5 in /home/user/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #17: <unknown function> + 0x2778dc (0x556768d0d8dc in /home/user/rave_vst/build/rave-vst_artefacts/Release/Standalone/RAVE)
frame #18: <unknown function> + 0x7612b (0x556768b0c12b in /home/user/rave_vst/build/rave-vst_artefacts/Release/Standalone/RAVE)
frame #19: <unknown function> + 0xd6de4 (0x7f8cf9f5ede4 in /lib/x86_64-linux-gnu/libstdc++.so.6)
frame #20: <unknown function> + 0x8609 (0x7f8cfa0f7609 in /lib/x86_64-linux-gnu/libpthread.so.0)
frame #21: clone + 0x43 (0x7f8cfa3fa163 in /lib/x86_64-linux-gnu/libc.so.6)

Aborted (core dumped)

If it's of any help, there were also a few types of warnings thrown during the build:

Warning 1

[ 29%] Building CXX object CMakeFiles/rave-vst.dir/juce/modules/juce_core/juce_core.cpp.o
/home/user/rave_vst/source/PluginProcessorProcessing.cpp:34:14: warning: extra tokens at end of #endif directive [-Wendif-labels]
   34 |       #endif DEBUG_PERFORM
      |              ^~~~~~~~~~~~~

Warning 2

[ 35%] Building CXX object CMakeFiles/rave-vst.dir/juce/modules/juce_gui_basics/juce_gui_basics.cpp.o
In file included from /home/user/rave_vst/source/PluginEditor.h:3,
                 from /home/user/rave_vst/source/PluginProcessorMisc.cpp:2:
/home/user/rave_vst/source/PluginProcessor.h: In constructor ‘NAAudioParameterInt::NAAudioParameterInt(const juce::String&, const juce::String&, int, int, int, const juce::String&, std::function<juce::String(int, int)>, std::function<int(const juce::String&)>)’:
/home/user/rave_vst/source/PluginProcessor.h:46:29: warning: declaration of ‘defaultValue’ shadows a member of ‘NAAudioParameterInt’ [-Wshadow]
   46 |                         int defaultValue, const String &parameterLabel=String(),
      |                         ~~~~^~~~~~~~~~~~
In file included from /home/user/rave_vst/juce/modules/juce_audio_processors/juce_audio_processors.h:146,
                 from /home/user/rave_vst/juce/modules/juce_audio_utils/juce_audio_utils.h:60,
                 from /home/user/rave_vst/build/rave-vst_artefacts/JuceLibraryCode/JuceHeader.h:19,
                 from /home/user/rave_vst/source/EngineUpdater.h:3,
                 from /home/user/rave_vst/source/PluginProcessor.h:4,
                 from /home/user/rave_vst/source/PluginEditor.h:3,
                 from /home/user/rave_vst/source/PluginProcessorMisc.cpp:2:
/home/user/rave_vst/juce/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h:99:17: note: shadowed declaration is here
   99 |     const float defaultValue;
      |                 ^~~~~~~~~~~~

Warning 3

[100%] Linking CXX shared module rave-vst_artefacts/Release/VST3/RAVE.vst3/Contents/x86_64-linux/RAVE.so
In member function ‘write’,
    inlined from ‘charToString’ at /home/user/rave_vst/juce/modules/juce_core/text/juce_String.cpp:370:13:
/home/user/rave_vst/juce/modules/juce_core/text/juce_CharPointer_UTF8.h:344:25: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  344 |                 *data++ = (CharType) (0x80 | (0x3f & (c >> (numExtraBytes * 6))));
      |                         ^```
ZodiacFRA commented 2 years ago

Hi, we are in the process of the handling of this specific error. however your model does not seem functional, as you can see your sampling rate, latent size and full latent sizes are all equal to 0. We suggest you use the cli_helper script provided in the RAVE repository to train your model and export it, to get a functional model