suno-ai / bark

🔊 Text-Prompted Generative Audio Model
MIT License
36.32k stars 4.27k forks source link

Segmentation fault: 11 when running model = load_codec_model(use_gpu=True if device == 'cuda' else False) #388

Open artificialnouveau opened 1 year ago

artificialnouveau commented 1 year ago

When I run the clone_voice.ipynb (on a mac), specially this code:

import os os.environ['KMP_DUPLICATE_LIB_OK']='True'

from bark.generation import load_codec_model, generate_text_semantic from encodec.utils import convert_audio

import torchaudio import torch

from hubert.hubert_manager import HuBERTManager hubert_manager = HuBERTManager() hubert_manager.make_sure_hubert_installed() hubert_manager.make_sure_tokenizer_installed()

device = 'cuda' #'cuda' # or 'cpu' model = load_codec_model(use_gpu=True if device == 'cuda' else False)

I get the following error: Segmentation fault: 11

Do you know how to deal with this?

tongbaojia commented 1 year ago

Hi @artificialnouveau , I am pretty sure you are using a fork. You should re-post your question in the forked repo discussions.

But, the segmentation fault feels like some models aren't downloaded properly. Or, you down' have cuda on your mac -- device shouldn't be cuda if you are using a mac. Change it to cpu or mps instead.