acids-ircam / rave_vst

Other
184 stars 28 forks source link

c10::error ~ Trying to create tensor with negative dimension -16: [1, -16, 1] #23

Open jreus opened 2 years ago

jreus commented 2 years ago

Heya. I'm hitting a frustrating error trying to compile on Ubuntu (20.04). The stand-alone is giving me an error Trying to create tensor with negative dimension -16: [1, -16, 1]

Could it be my model? I've trained it using latency adjustment, and exported with:

python export_rave.py --run ../models/rave/chorala1rt/2M17.ckpt --stereo true --name chorala1rt_2M17

Here's the dump from the command line!

[-] Network - No API response
[ ] RAVE - Model successfully loaded: /home/jcr/.config/ACIDS/RAVE/chorala1rt_2M17_stereo.ts.ts
        Encode parameters:     1
    1
   16
 2048
[ CPULongType{4} ]
        Decode parameters:    16
 2048
    2
    1
[ CPULongType{4} ]
        Full latent size: 0
        Ratio: 2048
to low; setting rate to : 11
terminate called after throwing an instance of 'c10::Error'
  what():  Trying to create tensor with negative dimension -16: [1, -16, 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 (0x7f0e376777ab in /home/jcr/Dev/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 (0x7f0e3767315e in /home/jcr/Dev/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 (0x7f0e38b40b1c in /home/jcr/Dev/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 (0x7f0e38b41ae5 in /home/jcr/Dev/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 (0x7f0e38b41b69 in /home/jcr/Dev/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 (0x7f0e39068da3 in /home/jcr/Dev/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #6: <unknown function> + 0x1d0c673 (0x7f0e397d8673 in /home/jcr/Dev/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 (0x7f0e39567db5 in /home/jcr/Dev/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #8: <unknown function> + 0x1cf1f78 (0x7f0e397bdf78 in /home/jcr/Dev/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 (0x7f0e395a73d8 in /home/jcr/Dev/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #10: at::empty(c10::ArrayRef<long>, c10::TensorOptions, c10::optional<c10::MemoryFormat>) + 0x101 (0x7f0e38ce20d1 in /home/jcr/Dev/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 (0x7f0e3906e7c9 in /home/jcr/Dev/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 (0x7f0e3906e951 in /home/jcr/Dev/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #13: <unknown function> + 0x1ef0d6d (0x7f0e399bcd6d in /home/jcr/Dev/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 (0x7f0e3935e753 in /home/jcr/Dev/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #15: <unknown function> + 0x1cf0ebe (0x7f0e397bcebe in /home/jcr/Dev/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 (0x7f0e393a5ce5 in /home/jcr/Dev/rave_vst/build/torch/libtorch/lib/libtorch_cpu.so)
frame #17: <unknown function> + 0x27848c (0x558f61de848c in ./RAVE)
frame #18: <unknown function> + 0x7615b (0x558f61be615b in ./RAVE)
frame #19: <unknown function> + 0xd6de4 (0x7f0e37530de4 in /lib/x86_64-linux-gnu/libstdc++.so.6)
frame #20: <unknown function> + 0x8609 (0x7f0e376c9609 in /lib/x86_64-linux-gnu/libpthread.so.0)
frame #21: clone + 0x43 (0x7f0e379cf133 in /lib/x86_64-linux-gnu/libc.so.6)

Aborted (core dumped)
iorhythm commented 2 years ago

Apologies in advance for the vague reply - I think I was hitting a similar error when the model hadn't done loading yet or no model would successfully load. As such, the function modelPerform() would throw an exception. Again, this may be irrelevant to your case.

If it helps, I've done lots of changes to this repository in my fork and a Windows standalone works with no exceptions (but at 95% CPU with the VCTK model, and it also produces lots of glitches). https://github.com/iorhythm/rave_vst