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

ImportError: cannot import name 'CommitOperationAdd' from 'huggingface_hub' #14

Open
EsawaAzusa opened this issue Mar 27, 2023 · 0 comments

Comments

@EsawaAzusa
Copy link

在使用样例音频作为情感合成的那一步出错了
依赖包版本:
absl-py 1.4.0
aiohttp 3.8.1
aiosignal 1.3.1
alabaster 0.7.13
anyio 3.5.0
appdirs 1.4.4
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
arrow 1.2.3
asttokens 2.0.5
async-generator 1.10
async-timeout 4.0.2
atomicwrites 1.4.1
attrs 22.2.0
audioread 3.0.0
Babel 2.12.1
backcall 0.2.0
beautifulsoup4 4.11.1
black 23.1.0
bleach 4.1.0
Bottleneck 1.3.5
brotlipy 0.7.0
cachetools 5.3.0
cchardet 2.1.7
certifi 2022.12.7
cffi 1.15.1
chardet 5.1.0
charset-normalizer 3.1.0
click 8.1.3
clldutils 3.19.0
cn2an 0.5.19
colorama 0.4.6
colorlog 6.7.0
comm 0.1.2
contourpy 1.0.7
cryptography 39.0.1
csvw 3.1.3
curio 1.6
cycler 0.11.0
Cython 0.29.33
dataclasses 0.8
datasets 2.10.1
debugpy 1.5.1
decorator 5.1.1
defusedxml 0.7.1
dill 0.3.6
dlinfo 1.2.1
docrepr 0.2.0
docutils 0.18.1
entrypoints 0.4
exceptiongroup 1.1.1
executing 0.8.3
fastjsonschema 2.16.2
filelock 3.10.6
flit_core 3.8.0
fonttools 4.39.2
fqdn 1.5.1
frozenlist 1.3.3
fsspec 2023.3.0
future 0.18.3
google-auth 2.16.3
google-auth-oauthlib 0.4.6
grpcio 1.51.3
huggingface-hub 0.11.0
idna 3.4
imagesize 1.4.1
importlib-metadata 6.1.0
importlib-resources 5.12.0
iniconfig 2.0.0
ipykernel 6.19.2
ipyparallel 8.5.0
ipython 8.11.0
ipython-genutils 0.2.0
ipywidgets 8.0.4
isodate 0.6.1
isoduration 20.11.0
jedi 0.18.1
jieba 0.42.1
Jinja2 3.1.2
joblib 1.2.0
json5 0.9.6
jsonpointer 2.3
jsonschema 4.17.3
jupyter 1.0.0
jupyter_client 8.1.0
jupyter-console 6.6.3
jupyter_core 5.3.0
jupyter-events 0.6.3
jupyter_server 2.5.0
jupyter_server_terminals 0.4.4
jupyterlab-pygments 0.2.2
jupyterlab-widgets 3.0.6
kiwisolver 1.4.4
language-tags 1.2.0
lazy_loader 0.2
librosa 0.10.0.post2
llvmlite 0.39.1
lxml 4.9.2
Markdown 3.4.3
MarkupSafe 2.1.2
matplotlib 3.7.1
matplotlib-inline 0.1.6
mistune 0.8.4
mkl-service 2.4.0
mpmath 1.3.0
msgpack 1.0.5
multidict 6.0.2
multiprocess 0.70.14
mypy-extensions 1.0.0
nbclassic 0.5.2
nbclient 0.5.13
nbconvert 6.5.4
nbformat 5.7.0
nest-asyncio 1.5.6
networkx 3.0
notebook 6.5.2
notebook_shim 0.2.2
numba 0.56.4
numexpr 2.8.4
numpy 1.23.5
oauthlib 3.2.2
outcome 1.2.0
packaging 23.0
pandas 1.5.3
pandocfilters 1.5.0
parso 0.8.3
pathspec 0.11.1
phonemizer 3.2.1
pickleshare 0.7.5
Pillow 9.4.0
pip 23.0.1
pkgutil_resolve_name 1.3.10
platformdirs 2.5.2
pluggy 1.0.0
ply 3.11
pooch 1.6.0
proces 0.1.4
prometheus-client 0.14.1
prompt-toolkit 3.0.36
protobuf 4.22.1
psutil 5.9.0
pure-eval 0.2.2
py 1.11.0
pyarrow 8.0.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.21
Pygments 2.14.0
pylatexenc 2.10
pyopenjtalk 0.3.0
pyOpenSSL 23.0.0
pyparsing 3.0.9
pypinyin 0.48.0
PyQt5 5.15.7
PyQt5-sip 12.11.0
pyrsistent 0.19.3
PySocks 1.7.1
pytest 6.2.5
pytest-asyncio 0.20.3
python-dateutil 2.8.2
python-json-logger 2.0.7
pytz 2023.2
pywin32 305.1
pywinpty 2.0.10
PyYAML 6.0
pyzmq 25.0.2
qtconsole 5.4.0
QtPy 2.2.0
rdflib 6.3.1
regex 2023.3.23
requests 2.28.2
requests-oauthlib 1.3.1
responses 0.18.0
rfc3339-validator 0.1.4
rfc3986 1.5.0
rfc3986-validator 0.1.1
rsa 4.9
sacremoses 0.0.53
scikit-learn 1.2.2
scipy 1.10.1
segments 2.2.1
Send2Trash 1.8.0
setuptools 65.6.3
sip 6.6.2
six 1.16.0
sniffio 1.2.0
snowballstemmer 2.2.0
sortedcontainers 2.4.0
soundfile 0.12.1
soupsieve 2.3.2.post1
soxr 0.3.4
Sphinx 6.1.3
sphinx-rtd-theme 1.2.0
sphinxcontrib-applehelp 1.0.4
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.1
sphinxcontrib-jquery 4.1
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.5
stack-data 0.2.0
sympy 1.11.1
tabulate 0.9.0
tensorboard 2.12.0
tensorboard-data-server 0.7.0
tensorboard-plugin-wit 1.8.1
terminado 0.17.1
testpath 0.6.0
threadpoolctl 3.1.0
tinycss2 1.2.1
tokenizers 0.13.2
toml 0.10.2
tomli 2.0.1
torch 2.0.0+cu118
torchaudio 2.0.1+cu118
torchvision 0.15.1
tornado 6.2
tqdm 4.65.0
traitlets 5.7.1
transformers 4.27.3
trio 0.22.0
typing_extensions 4.5.0
Unidecode 1.3.6
uri-template 1.2.0
uritemplate 4.1.1
urllib3 1.26.15
wcwidth 0.2.5
webcolors 1.12
webencodings 0.5.1
websocket-client 0.58.0
Werkzeug 2.2.3
wheel 0.38.4
widgetsnbextension 4.0.5
win-inet-pton 1.1.0
wincertstore 0.2
xxhash 0.0.0
yarl 1.7.2
zipp 3.15.0
完整报错:
Cell In[41], line 4
2 txt = "疲れた?甘ったれたこと言ってんじゃないわよ!"
3 txtr=get_roma(txt, hps)
----> 4 tts(txtr, torch.LongTensor([1]), emotion="./short normal.wav", roma=True, length_scale = 1)

Cell In[38], line 13, in tts(txt, sid, emotion, roma, length_scale)
11 x_tst = stn_tst.unsqueeze(0)
12 x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
---> 13 import emotion_extract
14 emo = torch.FloatTensor(emotion_extract.extract_wav(emotion))
15 # sid = torch.LongTensor([0])
16 # if type(emotion) ==int:
17 # emo = torch.FloatTensor(all_emotions[emotion]).unsqueeze(0)
(...)
27 # else:
28 # emo = torch.FloatTensor(all_emotions[emotion_dict[emotion]]).unsqueeze(0)

File D:\VITS\emotional-vits-main\emotion_extract.py:3
1 import torch
2 import torch.nn as nn
----> 3 from transformers import Wav2Vec2Processor
4 from transformers.models.wav2vec2.modeling_wav2vec2 import (
5 Wav2Vec2Model,
6 Wav2Vec2PreTrainedModel,
7 )
8 import os

File D:\Anaconda3\envs\vits\lib\site-packages\transformers_init_.py:26
23 from typing import TYPE_CHECKING
25 # Check the dependencies satisfy the minimal versions required.
---> 26 from . import dependency_versions_check
27 from .utils import (
28 OptionalDependencyNotAvailable,
29 _LazyModule,
(...)
42 logging,
43 )
46 logger = logging.get_logger(name) # pylint: disable=invalid-name

File D:\Anaconda3\envs\vits\lib\site-packages\transformers\dependency_versions_check.py:36
33 if pkg in deps:
34 if pkg == "tokenizers":
35 # must be loaded here, or else tqdm check may fail
---> 36 from .utils import is_tokenizers_available
38 if not is_tokenizers_available():
39 continue # not required, check version only if installed

File D:\Anaconda3\envs\vits\lib\site-packages\transformers\utils_init_.py:56
22 from .doc import (
23 add_code_sample_docstrings,
24 add_end_docstrings,
(...)
28 replace_return_docstrings,
29 )
30 from .generic import (
31 ContextManagers,
32 ExplicitEnum,
(...)
54 working_or_temp_dir,
55 )
---> 56 from .hub import (
57 CLOUDFRONT_DISTRIB_PREFIX,
58 DISABLE_TELEMETRY,
59 HF_MODULES_CACHE,
60 HUGGINGFACE_CO_PREFIX,
61 HUGGINGFACE_CO_RESOLVE_ENDPOINT,
62 PYTORCH_PRETRAINED_BERT_CACHE,
63 PYTORCH_TRANSFORMERS_CACHE,
64 S3_BUCKET_PREFIX,
65 TRANSFORMERS_CACHE,
66 TRANSFORMERS_DYNAMIC_MODULE_NAME,
67 EntryNotFoundError,
68 PushToHubMixin,
69 RepositoryNotFoundError,
70 RevisionNotFoundError,
71 cached_file,
72 default_cache_path,
73 define_sagemaker_information,
74 download_url,
75 extract_commit_hash,
76 get_cached_models,
77 get_file_from_repo,
78 get_full_repo_name,
79 has_file,
80 http_user_agent,
81 is_offline_mode,
82 is_remote_url,
83 move_cache,
84 send_example_telemetry,
85 )
86 from .import_utils import (
87 ENV_VARS_TRUE_AND_AUTO_VALUES,
88 ENV_VARS_TRUE_VALUES,
(...)
166 torch_version,
167 )
170 WEIGHTS_NAME = "pytorch_model.bin"

File D:\Anaconda3\envs\vits\lib\site-packages\transformers\utils\hub.py:32
30 import huggingface_hub
31 import requests
---> 32 from huggingface_hub import (
33 CommitOperationAdd,
34 create_commit,
35 create_repo,
36 get_hf_file_metadata,
37 hf_hub_download,
38 hf_hub_url,
39 whoami,
40 )
41 from huggingface_hub.file_download import REGEX_COMMIT_HASH, http_get
42 from huggingface_hub.utils import (
43 EntryNotFoundError,
44 LocalEntryNotFoundError,
(...)
48 hf_raise_for_status,
49 )

ImportError: cannot import name 'CommitOperationAdd' from 'huggingface_hub' (D:\Anaconda3\envs\vits\lib\site-packages\huggingface_hub_init_.py)

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

1 participant