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

Fresh installation of Bark Infinity gives "ValueError: mutable default <class 'fairseq.dataclass.configs.CommonConfig'> for field common is not allowed: use default_factory" #105

Open
ChamathDilanka opened this issue Sep 9, 2023 · 2 comments

Comments

@ChamathDilanka
Copy link

Hi All,

I tried Bark Infinity as per instructed in https://www.youtube.com/watch?v=tvH_n-vwUA0

Installation went fine. Also Bark_WebUI works fine.

Problem rise when using bark infinity. Command I used is as following.
"python bark_perform.py --use_smaller_models --text_prompt "Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe." --split_by_lines"

It gives me following error:

UserWarning: No audio backend is available.
warnings.warn("No audio backend is available.")
Traceback (most recent call last):
File " [root dir]\bark_infinity\bark\bark_perform.py", line 6, in
from bark_infinity import config
File " [root dir]\bark_infinity\bark\bark_infinity_init_.py", line 1, in
from .api import generate_audio, text_to_semantic, semantic_to_waveform, save_as_prompt
File " [root dir]\bark_infinity\bark\bark_infinity\api.py", line 30, in
from .clonevoice import wav_to_semantics, generate_fine_from_wav, quick_clone
File " [root dir]\bark_infinity\bark\bark_infinity\clonevoice.py", line 33, in
from bark_infinity.hubert.pre_kmeans_hubert import CustomHubert
File " [root dir]\bark_infinity\bark\bark_infinity\hubert\pre_kmeans_hubert.py", line 16, in
import fairseq
File "[user dir]\AppData\Local\Programs\Python\Python311\Lib\site-packages\fairseq_init_.py", line 20, in
from fairseq.distributed import utils as distributed_utils
File "[user dir]\AppData\Local\Programs\Python\Python311\Lib\site-packages\fairseq\distributed_init_.py", line 7, in
from .fully_sharded_data_parallel import (
File "[user dir]\AppData\Local\Programs\Python\Python311\Lib\site-packages\fairseq\distributed\fully_sharded_data_parallel.py", line 10, in
from fairseq.dataclass.configs import DistributedTrainingConfig
File "[user dir]\AppData\Local\Programs\Python\Python311\Lib\site-packages\fairseq\dataclass_init_.py", line 6, in
from .configs import FairseqDataclass
File "[user dir]\AppData\Local\Programs\Python\Python311\Lib\site-packages\fairseq\dataclass\configs.py", line 1104, in
@DataClass
^^^^^^^^^
File "[user dir]\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1223, in dataclass
return wrap(cls)
^^^^^^^^^
File "[user dir]\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1213, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[user dir]\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[user dir]\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'fairseq.dataclass.configs.CommonConfig'> for field common is not allowed: use default_factory

I haven't done any changes and all installations went without any errors.

Can someone suggest me what to do?

Thanks!

@JonathanFly
Copy link
Owner

JonathanFly commented Sep 18, 2023

Hmn, some kind of fairseq error. Can you try using the full install .bat file version?

You've got it installed in Python 3.11 which I'm not sure works with fairseq. If you can work through your manual install and change Python 3.11 to Python 3.10, that alone may fix it as well.

@Milor123
Copy link

Milor123 commented Jan 15, 2024

Hmn, some kind of fairseq error. Can you try using the full install .bat file version?

You've got it installed in Python 3.11 which I'm not sure works with fairseq. If you can work through your manual install and change Python 3.11 to Python 3.10, that alone may fix it as well.

SOLVED the problem N1

Yes correct the Python 3.11 cause the problem, I've installed in Archlinux python 3.10 using pyenv and creating a virtualenv, and it solved my problem.
Thank you very much

but now i have a warning:

fairseq 0.12.2 requires hydra-core<1.1,>=1.0.7, but you have hydra-core 1.3.2 which is incompatible.
fairseq 0.12.2 requires omegaconf<2.1, but you have omegaconf 2.3.0 which is incompatible.

I've installed fairseq by default, using:
pip install fairseq
Dont forcing it to the correct version because the pip dont found it.
how should i install it in linux?

PD Bro: Did you remember me? Hahaha, Now have NVIDIA gpu not AMD 😄

EDIT 1: SOLVED the problem N2 !!!

Solved installing fairseq 0.12.4 manully with:

git clone https://github.com/Sharrnah/fairseq.git
cd fairseq
python setup.py build develop

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

3 participants