RAVE icon indicating copy to clipboard operation
RAVE copied to clipboard

Rave 2.3.1 doesn't work on my Ubuntu

Open Federico8691 opened this issue 1 year ago • 45 comments

Dear everyone, I am sorry for bothering everyone again but I really do not know where to hit my head in order to solve these kinds of questions being no computer scientist. Since I updated Rave to its latest version (2.3.1) it doesn't work anymore. Here is a screenshot of the kind of errors I get when I try to run the training over an already preprocessed dataset. Any possible help would be welcomed and thanks for your time.

best,

Federico linux

Federico8691 avatar Dec 19 '23 17:12 Federico8691

This is what is happening when I try to start my training now.image image

Any solution ?

thanks

Federico

Federico8691 avatar Dec 20 '23 14:12 Federico8691

Now I am not even able to preprocess the audiofiles. These is my user path image image

Sorry for pressing you over all of this, but I am working with this tool and now I am stuck.

Many thanks,

Federico

Federico8691 avatar Dec 20 '23 14:12 Federico8691

You should roll back rave to a version that worked for you if you need to use it urgently !Le 20 déc. 2023 à 15:32, Federico8691 @.***> a écrit : Now I am not even able to preprocess the audiofiles. These is my user path image.png (view on web) image.png (view on web) Sorry for pressing you over all of this, but I am working with this tool and now I am stuck. Many thanks, Federico

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

caillonantoine avatar Dec 20 '23 14:12 caillonantoine

Hi Antoine, thanks for your kind reply. Maybe I could move back to v1. I made many models with that version. How should I proceed. No idea about how to do it. Many thanks !

Federico

Federico8691 avatar Dec 20 '23 14:12 Federico8691

On the website it states:

The original implementation of the RAVE model can be restored using

git checkout v1

What odes it means?

thanks

Federico

Federico8691 avatar Dec 20 '23 15:12 Federico8691

you can get back to a previous version using pip install acids-rave==2.1.1

Le mer. 20 déc. 2023 à 16:01, Federico8691 @.***> a écrit :

On the website it states:

The original implementation of the RAVE model can be restored using

git checkout v1

What odes it means?

thanks

Federico

— Reply to this email directly, view it on GitHub https://github.com/acids-ircam/RAVE/issues/273#issuecomment-1864624086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH2A3QGQ4IDXF25MV7ETBWDYKL4VBAVCNFSM6AAAAABA3Q3DESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUGYZDIMBYGY . You are receiving this because you commented.Message ID: @.***>

-- Antoine Caillon 0606927077

caillonantoine avatar Dec 20 '23 15:12 caillonantoine

Hi Antoine,

Just moved back to 2.1.1. I am still getting the same error message. image

Federico8691 avatar Dec 20 '23 15:12 Federico8691

I do not understand. Everything seems ok. It was working until this morning.

Federico8691 avatar Dec 20 '23 15:12 Federico8691

It looks like it is trying to access that directory but nothing is in there. I am using the same files I was using in my last training session. Here my path: image

So it makes no sense to me.
Any possible way out?

Federico8691 avatar Dec 20 '23 15:12 Federico8691

What I do not get is the (no such file or directory), but it is there, in front of my eyes. Maybe it is a problem with the installation of Rave inside miniconda3. A directory mismatch?

Federico8691 avatar Dec 20 '23 15:12 Federico8691

When I abort the process, I get tons of lines of error but at the end here is what is printed. image

Federico8691 avatar Dec 20 '23 15:12 Federico8691

Is there any way to get my hands on v1 on my linux machine? It was working so well. My best models have been done with v1.

Federico8691 avatar Dec 20 '23 15:12 Federico8691

Any help, suggestion?

Federico8691 avatar Dec 20 '23 15:12 Federico8691

You can follow the instructions at https://github.com/acids-ircam/RAVE/tree/v1

Le mer. 20 déc. 2023 à 16:48, Federico8691 @.***> a écrit :

Any help, suggestion?

— Reply to this email directly, view it on GitHub https://github.com/acids-ircam/RAVE/issues/273#issuecomment-1864716531, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH2A3QEKAVENAE7LUW5CLALYKMCDPAVCNFSM6AAAAABA3Q3DESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUG4YTMNJTGE . You are receiving this because you commented.Message ID: @.***>

-- Antoine Caillon 0606927077

caillonantoine avatar Dec 20 '23 16:12 caillonantoine

Start by cloning RAVE v1 (git clone https://github.com/acids-ircam/RAVE.git --branch v1) Then follow the instructions at https://github.com/acids-ircam/RAVE/tree/v1

caillonantoine avatar Dec 20 '23 16:12 caillonantoine

Using this in the terminal?

git clone https://github.com/acids-ircam/RAVE cd RAVE pip install -r requirements.txt

and then ..

You can now use python cli_helper.py to start a new training !

thanks!

Federico8691 avatar Dec 20 '23 16:12 Federico8691

I am running this on Google Colab with the command below and using acids-rave==2.1.1:

!rave train --config "v2" --db_path '/content/dataset' --name "testRave" --val_every 2500

It worked for me after I addressed an issue with the second --config flag, which is for the regularization method. By removing this flag, the training started normally.

vidalfer avatar Dec 20 '23 16:12 vidalfer

I am running this on Google Colab with the command below and using acids-rave==2.1.1:

!rave train --config "v2" --db_path '/content/dataset' --name "testRave" --val_every 2500

It worked for me after I addressed an issue with the second --config flag, which is for the regularization method. By removing this flag, the training started normally.

Hi, I am running all of this on Linux with a 3090 Nvidia, but for some reason unknown to me I am not able to let it work again. Version 2.1.1 was ok until I installed the update 2.3.1 , a very very bad idea. Using Colab is mostly impossible, it takes ages to train a model :-D

Federico8691 avatar Dec 20 '23 16:12 Federico8691

Obviously you have a problem with your data paths, no influence of RAVE version here. Double check the paths of your input folder (dragging / dropping into the console to retrieve that path maybe).

Just a precision : since 2.3.1 RAVE is not constraining torch to be 1.13, in order to be compatible with new devices. I just advised you to update your libraries :)

domkirke avatar Dec 20 '23 17:12 domkirke

Axel wrote:

Obviously you have a problem with your data paths, no influence of RAVE version here. Double check the paths of your input folder (dragging / dropping into the console to retrieve that path maybe).

This is exactly what I do as you can see from this image:

image

I have the miniconda3 folder (where Rave is then installed) and two additional folder; the Blippo_dataset contains the audio files and the other the preprocessed one called myDataset, plus the runs folder. So in order to preprocess what I do is to run the command with this two paths inside.

rave preprocess --input_path 'Blippo_dataset..' --output_path 'myDataset'

Then when I run it I get this:

image

Just a precision : since 2.3.1 RAVE is not constraining torch to be 1.13, in order to be compatible with new devices. I just advised you to update your libraries :)

I followed your suggestion as you wrote me.

Maybe it is a problem where Rave is installed? When I run the command pip install acids-RAVE from which directory should be performed this command? Does Rave needs to be in miniconda3 folder. Because everything I make an installation it has been put there.

Thanks for your kind help

Federico8691 avatar Dec 20 '23 20:12 Federico8691

So dear friends, I spent all night trying to get Rave working on my Ubuntu machine with no success. Probably it is a problem with my miniconda installation or some directory conflict. I have no idea. I tried both 2.1.1 and the most recent one 2.3.1. image I followed all your instructions step by step. I know Rave is ok, but I find myself in a very difficult position. I am professor at Saint Louis College of Music, I need tools for my work, I am an Ircam Forum subscriber since 1996, and I've been a strong supporter and endorser of Rave since the very beginning (until last week, where I made a full presentation of its potentials at Institute of Sonology in Den Haag). Without any support from you I cannot bring my commitment further. It is a pity because its potential, so the only thing I can do is to offer money for an online support to anyone of good will. This is my last effort because I really cannot spend days and nights wandering without any reference material, tutorials, anything to put the final user in the position to be autonomous.

Looking forward to an answer.

best to you,

Federico

Federico8691 avatar Dec 21 '23 11:12 Federico8691

Federico, as written in the FAQ (https://github.com/acids-ircam/RAVE?tab=readme-ov-file#frequently-asked-question-faq), and as I remembered in other issues, this problem is due to the facts that your sounds are not long enough to feed a casual training configuration of RAVE. The classic preprocessing pipeline requires at least 2 * n_signal (default: 131072) audio files, hence about 5 seconds.

Please refer to the FAQ for the answers and let me know.

PS : Regarding python environments, I think you wouldn't loose time (especially if you use it on a daily basis) reading basic python environment handling with Internet resources (https://realpython.com/python-virtual-environments-a-primer/). Environements can be painful even for advanced users, so I would strongly advise you to get in touch with familiar commands if you really need it.

domkirke avatar Dec 21 '23 11:12 domkirke

Hi Axel,

thanks for your kind answer. This is strange because I was training the same dataset (6 hours of material) with 2.1.1 with no problem. The preprocessing went very well and so did the training. So this is new to me. I will try to make adjustment this evening when I am back from the UNI. Could we arrange a google meet for tomorrow afternoon around 5 pm. We can discuss arrangements in private then. It would be of great help. Many thanks!

Federico8691 avatar Dec 21 '23 13:12 Federico8691

There was actually a bug in 2.1 that prevented random cropping during training, pertaining overfitting problems. This problem was fixed. I redirect you to how to solve the problem in the FAQ (that you read, I imagine) https://github.com/acids-ircam/RAVE?tab=readme-ov-file#frequently-asked-question-faq try with a sample size of 65536, it will come back to the RAVEv1 behaviour.

domkirke avatar Dec 21 '23 13:12 domkirke

Getting the same error message (working on colab). Trying with v2.3.0 (installed with !/content/miniconda/bin/pip install acids-rave==2.3). Using --config v2 --config default. All steps preprocessing, training and exporting used to work fine using the same dataset three days ago.

/content /content/drive/MyDrive/AI/RAVE/vivaZweiTraining/2023-12-17 dataset length: 0:19:13.195828: : 195it [00:10, 19.29it/s] /content/miniconda/lib/python3.9/site-packages/torch/nn/init.py:412: UserWarning: Initializing zero-element tensors is a no-op warnings.warn("Initializing zero-element tensors is a no-op") /content/miniconda/lib/python3.9/site-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm. warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.") Traceback (most recent call last): File "/content/miniconda/bin/rave", line 8, in <module> sys.exit(main()) File "/content/miniconda/lib/python3.9/site-packages/scripts/main_cli.py", line 30, in main app.run(train.main) File "/content/miniconda/lib/python3.9/site-packages/absl/app.py", line 308, in run _run_main(main, args) File "/content/miniconda/lib/python3.9/site-packages/absl/app.py", line 254, in _run_main sys.exit(main(argv)) File "/content/miniconda/lib/python3.9/site-packages/scripts/train.py", line 159, in main model = rave.RAVE(n_channels=FLAGS.channels) File "/content/miniconda/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/content/miniconda/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.__traceback__) from None File "/content/miniconda/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/content/miniconda/lib/python3.9/site-packages/rave/model.py", line 188, in __init__ self.decoder = decoder(n_channels=n_channels) File "/content/miniconda/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/content/miniconda/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.__traceback__) from None File "/content/miniconda/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/content/miniconda/lib/python3.9/site-packages/gin/config.py", line 516, in meta_call_wrapper return cls_meta.__call__(new_cls, *args, **kwargs) File "/content/miniconda/lib/python3.9/site-packages/rave/blocks.py", line 675, in __init__ waveform_module = normalization( File "/content/miniconda/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/content/miniconda/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.__traceback__) from None File "/content/miniconda/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/content/miniconda/lib/python3.9/site-packages/rave/blocks.py", line 20, in normalization return weight_norm(module) File "/content/miniconda/lib/python3.9/site-packages/torch/nn/utils/weight_norm.py", line 132, in weight_norm WeightNorm.apply(module, name, dim) File "/content/miniconda/lib/python3.9/site-packages/torch/nn/utils/weight_norm.py", line 50, in apply module.register_parameter(name + '_g', Parameter(norm_except_dim(weight, 2, dim).data)) RuntimeError: cannot reshape tensor of 0 elements into shape [0, -1] because the unspecified dimension size -1 can be any value and is ambiguous In call to configurable 'normalization' (<function normalization at 0x7df9d8429e50>) In call to configurable 'GeneratorV2' (<class 'rave.blocks.GeneratorV2'>) In call to configurable 'RAVE' (<class 'rave.model.RAVE'>)

chrizzlemadizzle avatar Dec 21 '23 13:12 chrizzlemadizzle

Are you resuming a checkpoint? I cannot reproduce this bug from a fresh training

domkirke avatar Dec 21 '23 18:12 domkirke

also getting this same error when using 2.3.1 on fresh training

install + preprocess worked fine then training caused

I1221 20:56:26.757378 140430877622912 resource_reader.py:50] system_path_file_exists:v3.gin E1221 20:56:26.757585 140430877622912 resource_reader.py:55] Path not found: v3.gin I1221 20:56:26.757645 140430877622912 resource_reader.py:50] system_path_file_exists:/opt/conda/lib/python3.10/site-packages/rave/v3.gin E1221 20:56:26.757689 140430877622912 resource_reader.py:55] Path not found: /opt/conda/lib/python3.10/site-packages/rave/v3.gin I1221 20:56:26.757906 140430877622912 resource_reader.py:50] system_path_file_exists:configs/v2.gin E1221 20:56:26.758018 140430877622912 resource_reader.py:55] Path not found: configs/v2.gin I1221 20:56:26.758452 140430877622912 resource_reader.py:50] system_path_file_exists:configs/v1.gin E1221 20:56:26.758562 140430877622912 resource_reader.py:55] Path not found: configs/v1.gin I1221 20:56:26.774069 140430877622912 resource_reader.py:50] system_path_file_exists:configs/adain.gin E1221 20:56:26.774199 140430877622912 resource_reader.py:55] Path not found: configs/adain.gin I1221 20:56:26.775029 140430877622912 resource_reader.py:50] system_path_file_exists:configs/snake.gin E1221 20:56:26.775145 140430877622912 resource_reader.py:55] Path not found: configs/snake.gin I1221 20:56:26.779302 140430877622912 resource_reader.py:50] system_path_file_exists:configs/descript_discriminator.gin E1221 20:56:26.779419 140430877622912 resource_reader.py:55] Path not found: configs/descript_discriminator.gin /opt/conda/lib/python3.10/site-packages/torch/nn/init.py:412: UserWarning: Initializing zero-element tensors is a no-op warnings.warn("Initializing zero-element tensors is a no-op") /opt/conda/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm. warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.") Traceback (most recent call last): File "/opt/conda/bin/rave", line 8, in sys.exit(main()) File "/opt/conda/lib/python3.10/site-packages/scripts/main_cli.py", line 30, in main app.run(train.main) File "/opt/conda/lib/python3.10/site-packages/absl/app.py", line 308, in run _run_main(main, args) File "/opt/conda/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main sys.exit(main(argv)) File "/opt/conda/lib/python3.10/site-packages/scripts/train.py", line 159, in main model = rave.RAVE(n_channels=FLAGS.channels) File "/opt/conda/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/opt/conda/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.traceback) from None File "/opt/conda/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/opt/conda/lib/python3.10/site-packages/rave/model.py", line 188, in init self.decoder = decoder(n_channels=n_channels) File "/opt/conda/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/opt/conda/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.traceback) from None File "/opt/conda/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/opt/conda/lib/python3.10/site-packages/gin/config.py", line 516, in meta_call_wrapper return cls_meta.call(new_cls, *args, **kwargs) File "/opt/conda/lib/python3.10/site-packages/rave/blocks.py", line 675, in init waveform_module = normalization( File "/opt/conda/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/opt/conda/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.traceback) from None File "/opt/conda/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/opt/conda/lib/python3.10/site-packages/rave/blocks.py", line 20, in normalization return weight_norm(module) File "/opt/conda/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py", line 132, in weight_norm WeightNorm.apply(module, name, dim) File "/opt/conda/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py", line 50, in apply module.register_parameter(name + '_g', Parameter(norm_except_dim(weight, 2, dim).data)) RuntimeError: cannot reshape tensor of 0 elements into shape [0, -1] because the unspecified dimension size -1 can be any value and is ambiguous In call to configurable 'normalization' (<function normalization at 0x7fb7e8931b40>) In call to configurable 'GeneratorV2' (<class 'rave.blocks.GeneratorV2'>) In call to configurable 'RAVE' (<class 'rave.model.RAVE'>)

augustross3 avatar Dec 21 '23 21:12 augustross3

Can you please give

  • your system, torch / torch audio version
  • full preprocess command
  • train preprocess command and, if a folder is created, the .gin inside summarizing the architecture of the training

I tried with v2 and v3, and on GitHub Actions these configurations pass the test. There must be something wrong in your config or in your databaae

domkirke avatar Dec 21 '23 22:12 domkirke

Hi domkirke

My system is an RTX 3090 24GB/AMD EPYC 7551P/32GB ram/Torch = 2.1.2/Torchaudio = 2.1.2 Operating System: Linux 5.15.0-83-generic #92~20.04.1-Ubuntu SMP Mon Aug 21 14:00:49 UTC 2023

Steps from a completely clean system install

  1. pip install acids-rave Successful
  2. conda install ffmpeg Successful
  3. Grabbed audio for training
  4. rave preprocess --input_path audio/ --output_path dataset/ dataset length: 0:57:15.810249: : 579it [00:03, 148.08it/s] Successful
  5. rave train --config v3 --db_path dataset/ --out_path model/ --name brute --val_every 2500 (the exact same error as posted above) Fails

You mentioned "if a folder is created, the .gin inside summarizing the architecture of the training". I'm not sure where this folder would be located. If you're referring to the dataset folder from step 4, the resulting folder did not have a .gin file inside it.

If you need anymore information please let me know. Thanks in advance.

augustross3 avatar Dec 21 '23 22:12 augustross3

Ok, got that ; it is a problem with the default amount of audio channels. Meanwhile, Please add --channels X (X being your number of channels: 1 for mono, 2 for stereo, etc). Will add that to the README.md, and fix that in the next version. Does it work? Thanks!

domkirke avatar Dec 21 '23 23:12 domkirke