Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running error on hubert-f0 process. #4

Open
TenhouYuko opened this issue Apr 9, 2023 · 5 comments
Open

Running error on hubert-f0 process. #4

TenhouYuko opened this issue Apr 9, 2023 · 5 comments

Comments

@TenhouYuko
Copy link

Loaded hubert.
0%| | 0/32 [1:10:54<?, ?it/s]
Process Process-1:
Traceback (most recent call last):
File "C:\Users\Public\anaconda3\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "C:\Users\Public\anaconda3\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self.kwargs)
File "C:\Users\Public\Sovits-4.0\preprocess_hubert_f0.py", line 44, in process_batch
process_one(filename, hmodel)
File "C:\Users\Public\Sovits-4.0\preprocess_hubert_f0.py", line 34, in process_one
f0 = utils.compute_f0_dio(wav, sampling_rate=sampling_rate, hop_length=hop_length)
File "C:\Users\Public\Sovits-4.0\utils.py", line 156, in compute_f0_dio
import pyworld
File "C:\Users\Public\anaconda3\lib\site-packages\pyworld_init
.py", line 7, in
from .pyworld import *
File "pyworld\pyworld.pyx", line 1, in init pyworld.pyworld
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

@Suhail
Copy link

Suhail commented Apr 16, 2023

Got the same problem

Is there a different version of numpy / pyworld expected than in requirements.txt?

(.venv) ➜  so-vits-svc-4.0-v2 git:(main) ✗ python preprocess_hubert_f0.py
[2]
Loading hubert for content...
load model(s) from hubert/checkpoint_best_legacy_500.pt
INFO:fairseq.tasks.text_to_speech:Please install tensorboardX: pip install tensorboardX
INFO:fairseq.tasks.hubert_pretraining:current directory is /home/ubuntu/workspace/so-vits-svc-4.0-v2
INFO:fairseq.tasks.hubert_pretraining:HubertPretrainingTask Config {'_name': 'hubert_pretraining', 'data': 'metadata', 'fine_tuning': False, 'labels': ['km'], 'label_dir': 'label', 'label_rate': 50.0, 'sample_rate': 16000, 'normalize': False, 'enable_padding': False, 'max_keep_size': None, 'max_sample_size': 250000, 'min_sample_size': 32000, 'single_target': False, 'random_crop': True, 'pad_audio': False}
INFO:fairseq.models.hubert.hubert:HubertModel Config: {'_name': 'hubert', 'label_rate': 50.0, 'extractor_mode': default, 'encoder_layers': 12, 'encoder_embed_dim': 768, 'encoder_ffn_embed_dim': 3072, 'encoder_attention_heads': 12, 'activation_fn': gelu, 'layer_type': transformer, 'dropout': 0.1, 'attention_dropout': 0.1, 'activation_dropout': 0.0, 'encoder_layerdrop': 0.05, 'dropout_input': 0.1, 'dropout_features': 0.1, 'final_dim': 256, 'untie_final_proj': True, 'layer_norm_first': False, 'conv_feature_layers': '[(512,10,5)] + [(512,3,2)] * 4 + [(512,2,2)] * 2', 'conv_bias': False, 'logit_temp': 0.1, 'target_glu': False, 'feature_grad_mult': 0.1, 'mask_length': 10, 'mask_prob': 0.8, 'mask_selection': static, 'mask_other': 0.0, 'no_mask_overlap': False, 'mask_min_space': 1, 'mask_channel_length': 10, 'mask_channel_prob': 0.0, 'mask_channel_selection': static, 'mask_channel_other': 0.0, 'no_mask_channel_overlap': False, 'mask_channel_min_space': 1, 'conv_pos': 128, 'conv_pos_groups': 16, 'latent_temp': [2.0, 0.5, 0.999995], 'skip_masked': False, 'skip_nomask': False, 'checkpoint_activations': False, 'required_seq_len_multiple': 2, 'depthwise_conv_kernel_size': 31, 'attn_type': '', 'pos_enc_type': 'abs', 'fp16': False}
Loaded hubert.
  0%|                                                                                                                                                          | 0/2 [00:08<?, ?it/s]
Process Process-1:
Traceback (most recent call last):
  File "__init__.pxd", line 943, in numpy.import_array
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/workspace/so-vits-svc-4.0-v2/preprocess_hubert_f0.py", line 44, in process_batch
    process_one(filename, hmodel)
  File "/home/ubuntu/workspace/so-vits-svc-4.0-v2/preprocess_hubert_f0.py", line 34, in process_one
    f0 = utils.compute_f0_dio(wav, sampling_rate=sampling_rate, hop_length=hop_length)
  File "/home/ubuntu/workspace/so-vits-svc-4.0-v2/utils.py", line 156, in compute_f0_dio
    import pyworld
  File "/home/ubuntu/workspace/so-vits-svc-4.0-v2/.venv/lib/python3.9/site-packages/pyworld/__init__.py", line 7, in <module>
    from .pyworld import *
  File "pyworld/pyworld.pyx", line 6, in init pyworld.pyworld
  File "__init__.pxd", line 945, in numpy.import_array
ImportError: numpy.core.multiarray failed to import

@FedeGioz
Copy link

Try to downgrade Torch

@jessdy
Copy link

jessdy commented May 7, 2023

Got the same problem

Is there a different version of numpy / pyworld expected than in requirements.txt?

(.venv) ➜  so-vits-svc-4.0-v2 git:(main) ✗ python preprocess_hubert_f0.py
[2]
Loading hubert for content...
load model(s) from hubert/checkpoint_best_legacy_500.pt
INFO:fairseq.tasks.text_to_speech:Please install tensorboardX: pip install tensorboardX
INFO:fairseq.tasks.hubert_pretraining:current directory is /home/ubuntu/workspace/so-vits-svc-4.0-v2
INFO:fairseq.tasks.hubert_pretraining:HubertPretrainingTask Config {'_name': 'hubert_pretraining', 'data': 'metadata', 'fine_tuning': False, 'labels': ['km'], 'label_dir': 'label', 'label_rate': 50.0, 'sample_rate': 16000, 'normalize': False, 'enable_padding': False, 'max_keep_size': None, 'max_sample_size': 250000, 'min_sample_size': 32000, 'single_target': False, 'random_crop': True, 'pad_audio': False}
INFO:fairseq.models.hubert.hubert:HubertModel Config: {'_name': 'hubert', 'label_rate': 50.0, 'extractor_mode': default, 'encoder_layers': 12, 'encoder_embed_dim': 768, 'encoder_ffn_embed_dim': 3072, 'encoder_attention_heads': 12, 'activation_fn': gelu, 'layer_type': transformer, 'dropout': 0.1, 'attention_dropout': 0.1, 'activation_dropout': 0.0, 'encoder_layerdrop': 0.05, 'dropout_input': 0.1, 'dropout_features': 0.1, 'final_dim': 256, 'untie_final_proj': True, 'layer_norm_first': False, 'conv_feature_layers': '[(512,10,5)] + [(512,3,2)] * 4 + [(512,2,2)] * 2', 'conv_bias': False, 'logit_temp': 0.1, 'target_glu': False, 'feature_grad_mult': 0.1, 'mask_length': 10, 'mask_prob': 0.8, 'mask_selection': static, 'mask_other': 0.0, 'no_mask_overlap': False, 'mask_min_space': 1, 'mask_channel_length': 10, 'mask_channel_prob': 0.0, 'mask_channel_selection': static, 'mask_channel_other': 0.0, 'no_mask_channel_overlap': False, 'mask_channel_min_space': 1, 'conv_pos': 128, 'conv_pos_groups': 16, 'latent_temp': [2.0, 0.5, 0.999995], 'skip_masked': False, 'skip_nomask': False, 'checkpoint_activations': False, 'required_seq_len_multiple': 2, 'depthwise_conv_kernel_size': 31, 'attn_type': '', 'pos_enc_type': 'abs', 'fp16': False}
Loaded hubert.
  0%|                                                                                                                                                          | 0/2 [00:08<?, ?it/s]
Process Process-1:
Traceback (most recent call last):
  File "__init__.pxd", line 943, in numpy.import_array
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/workspace/so-vits-svc-4.0-v2/preprocess_hubert_f0.py", line 44, in process_batch
    process_one(filename, hmodel)
  File "/home/ubuntu/workspace/so-vits-svc-4.0-v2/preprocess_hubert_f0.py", line 34, in process_one
    f0 = utils.compute_f0_dio(wav, sampling_rate=sampling_rate, hop_length=hop_length)
  File "/home/ubuntu/workspace/so-vits-svc-4.0-v2/utils.py", line 156, in compute_f0_dio
    import pyworld
  File "/home/ubuntu/workspace/so-vits-svc-4.0-v2/.venv/lib/python3.9/site-packages/pyworld/__init__.py", line 7, in <module>
    from .pyworld import *
  File "pyworld/pyworld.pyx", line 6, in init pyworld.pyworld
  File "__init__.pxd", line 945, in numpy.import_array
ImportError: numpy.core.multiarray failed to import

pip install numpy==1.23.4

@z-funfan
Copy link

z-funfan commented May 13, 2023

Loaded hubert. 0%| | 0/32 [1:10:54<?, ?it/s] Process Process-1: Traceback (most recent call last): File "C:\Users\Public\anaconda3\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Users\Public\anaconda3\lib\multiprocessing\process.py", line 108, in run self._target(*self.args, **self.kwargs) File "C:\Users\Public\Sovits-4.0\preprocess_hubert_f0.py", line 44, in process_batch process_one(filename, hmodel) File "C:\Users\Public\Sovits-4.0\preprocess_hubert_f0.py", line 34, in process_one f0 = utils.compute_f0_dio(wav, sampling_rate=sampling_rate, hop_length=hop_length) File "C:\Users\Public\Sovits-4.0\utils.py", line 156, in compute_f0_dio import pyworld File "C:\Users\Public\anaconda3\lib\site-packages\pyworld__init.py", line 7, in from .pyworld import * File "pyworld\pyworld.pyx", line 1, in init pyworld.pyworld ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Mac M1:13.3.1 (22E261)
Python: 3.9.16
numpy: 1.21.0
pyworld: 0.3.2
Exactly the same problem, is there any progress?

@z-funfan
Copy link

z-funfan commented May 13, 2023

Loaded hubert. 0%| | 0/32 [1:10:54<?, ?it/s] Process Process-1: Traceback (most recent call last): File "C:\Users\Public\anaconda3\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Users\Public\anaconda3\lib\multiprocessing\process.py", line 108, in run self._target(*self.args, **self.kwargs) File "C:\Users\Public\Sovits-4.0\preprocess_hubert_f0.py", line 44, in process_batch process_one(filename, hmodel) File "C:\Users\Public\Sovits-4.0\preprocess_hubert_f0.py", line 34, in process_one f0 = utils.compute_f0_dio(wav, sampling_rate=sampling_rate, hop_length=hop_length) File "C:\Users\Public\Sovits-4.0\utils.py", line 156, in compute_f0_dio import pyworld File "C:\Users\Public\anaconda3\lib\site-packages\pyworld__init.py", line 7, in from .pyworld import * File "pyworld\pyworld.pyx", line 1, in init pyworld.pyworld ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Mac M1:13.3.1 (22E261) Python: 3.9.16 numpy: 1.21.0 pyworld: 0.3.2 Exactly the same problem, is there any progress?

Finally, I update the dependencies, everything goes right.

Flask
Flask_Cors
gradio
numpy==1.24.3
pyworld==0.3.3
scipy==1.10.1
SoundFile==0.12.1
torch==1.13.1
torchaudio==0.13.1
tqdm
scikit-maad
praat-parselmouth
onnx
onnxsim
onnxoptimizer
fairseq==0.12.2
librosa==0.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants