You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ~/miniconda3/lib/python3.12/site-packages/torch/_ops.py:1032, in _Ops.load_library(self, path)
1027 path = _utils_internal.resolve_library_path(path)
1028 with dl_open_guard():
1029 # Import the shared library into the process, thus running its
1030 # static (global) initialization code in order to register custom
1031 # operators with the JIT.
-> 1032 ctypes.CDLL(path)
1033 self.loaded_libraries.add(path)
Hi, it seems the problem is with the libtorchaudio installation. Which command did you use to install the pytorch?
Maybe check the official docs for reference: https://pytorch.org/get-started/locally/#with-cuda
BTW, we prefer English issues so that more people around the world can participate and it is also easier for issue search.
Oh. I use mirror on the server of AUTODL.com. I choose one 4090 GPU and pytorch==2.3.0 cuda=12.1
yuantuo666
changed the title
[BUG]: from torchaudio.functional.functional import _hz_to_mel, _mel_to_hz 报错
[BUG]: from torchaudio.functional.functional import _hz_to_mel, _mel_to_hz Error
Oct 31, 2024
It is possible to have environmental problems, so it is recommended to use conda to manage your environment and install the dependency from scratch following the provided env.sh file.
Describe the bug
运行demo代码时,在from import阶段就报错了。
How To Reproduce
from models.tts.maskgct.maskgct_utils import *
这句报错了
OSError Traceback (most recent call last)
Cell In[5], line 1
----> 1 from models.tts.maskgct.maskgct_utils import *
2 from huggingface_hub import hf_hub_download
3 import safetensors
File ~/autodl-tmp/Amphion/models/tts/maskgct/maskgct_utils.py:20
17 from utils.util import load_config
18 from tqdm import tqdm
---> 20 from models.codec.kmeans.repcodec_model import RepCodec
21 from models.tts.maskgct.maskgct_s2a import MaskGCT_S2A
22 from models.tts.maskgct.maskgct_t2s import MaskGCT_T2S
File ~/autodl-tmp/Amphion/models/codec/kmeans/repcodec_model.py:15
12 from einops import rearrange, repeat
14 from models.codec.amphion_codec.quantize import ResidualVQ
---> 15 from models.codec.kmeans.vocos import VocosBackbone
18 def init_weights(m):
19 if isinstance(m, nn.Conv1d):
File ~/autodl-tmp/Amphion/models/codec/kmeans/vocos.py:14
12 from torch import nn
13 from torch.nn.utils import weight_norm, remove_weight_norm
---> 14 from torchaudio.functional.functional import _hz_to_mel, _mel_to_hz
17 def safe_log(x: torch.Tensor, clip_val: float = 1e-7) -> torch.Tensor:
18 """
19 Computes the element-wise logarithm of the input tensor with clipping to avoid near-zero values.
20
(...)
26 Tensor: Element-wise logarithm of the input tensor with clipping applied.
27 """
File ~/miniconda3/lib/python3.12/site-packages/torchaudio/init.py:2
1 # Initialize extension and backend first
----> 2 from . import _extension # noqa # usort: skip
3 from ._backend import ( # noqa # usort: skip
4 AudioMetaData,
5 get_audio_backend,
(...)
10 set_audio_backend,
11 )
13 from . import ( # noqa: F401
14 compliance,
15 datasets,
(...)
23 utils,
24 )
File ~/miniconda3/lib/python3.12/site-packages/torchaudio/_extension/init.py:38
36 _IS_ALIGN_AVAILABLE = False
37 if _IS_TORCHAUDIO_EXT_AVAILABLE:
---> 38 _load_lib("libtorchaudio")
40 import torchaudio.lib._torchaudio # noqa
42 _check_cuda_version()
File ~/miniconda3/lib/python3.12/site-packages/torchaudio/_extension/utils.py:60, in _load_lib(lib)
58 if not path.exists():
59 return False
---> 60 torch.ops.load_library(path)
61 return True
File ~/miniconda3/lib/python3.12/site-packages/torch/_ops.py:1032, in _Ops.load_library(self, path)
1027 path = _utils_internal.resolve_library_path(path)
1028 with dl_open_guard():
1029 # Import the shared library into the process, thus running its
1030 # static (global) initialization code in order to register custom
1031 # operators with the JIT.
-> 1032 ctypes.CDLL(path)
1033 self.loaded_libraries.add(path)
File ~/miniconda3/lib/python3.12/ctypes/init.py:379, in CDLL.init(self, name, mode, handle, use_errno, use_last_error, winmode)
376 self._FuncPtr = _FuncPtr
378 if handle is None:
--> 379 self._handle = _dlopen(self._name, mode)
380 else:
381 self._handle = handle
OSError: /root/miniconda3/lib/python3.12/site-packages/torchaudio/lib/libtorchaudio.so: undefined symbol: _ZNK3c105Error4whatEv
Environment Information
linux 环境 在autodl上运行的。
Additional context
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered: