Skip to content

python funclip/launch.py报错:AttributeError: module 'torch' has no attribute '_utils' #28

@ditl-liudengpan

Description

@ditl-liudengpan

Notice: ffmpeg is not installed. torchaudio is used to load audio
If you want to use ffmpeg backend to load audio, please install it by:
sudo apt install ffmpeg # ubuntu
# brew install ffmpeg # mac
2024-04-25 15:48:05,179 - modelscope - INFO - PyTorch version 2.3.0 Found.
2024-04-25 15:48:05,180 - modelscope - INFO - Loading ast index from C:\Users\33787.cache\modelscope\ast_indexer
2024-04-25 15:48:05,253 - modelscope - INFO - Loading done! Current index file version is 1.14.0, with md5 84bbff1b93e4bc20c6d5e3e3f4d4927d and a total number of 976 components indexed
2024-04-25 15:48:05,609 - modelscope - INFO - Use user-specified model revision: v2.0.4
ckpt: C:\Users\33787.cache\modelscope\hub\iic\speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch\model.pt
Traceback (most recent call last):
File "D:\study\code-space\FunClip\funclip\launch.py", line 7, in
funasr_model = AutoModel(model="iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
File "C:\Users\33787\AppData\Local\Programs\Python\Python39\lib\site-packages\funasr\auto\auto_model.py", line 107, in init
model, kwargs = self.build_model(**kwargs)
File "C:\Users\33787\AppData\Local\Programs\Python\Python39\lib\site-packages\funasr\auto\auto_model.py", line 205, in build_model
load_pretrained_model(
File "C:\Users\33787\AppData\Local\Programs\Python\Python39\lib\site-packages\funasr\train_utils\load_pretrained_model.py", line 67, in load_pretrained_model
src_state = torch.load(path, map_location=map_location)
File "C:\Users\33787\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\serialization.py", line 1025, in load
return _load(opened_zipfile,
File "C:\Users\33787\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\serialization.py", line 1446, in _load
result = unpickler.load()
File "C:\Users\33787\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\serialization.py", line 1415, in persistent_load
nbytes = numel * torch._utils.element_size(dtype)
File "C:\Users\33787\AppData\Local\Programs\Python\Python39\lib\site-packages\torch_init
.py", line 2003, in getattr
raise AttributeError(f"module '{name}' has no attribute '{name}'")
AttributeError: module 'torch' has no attribute '_utils'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions