from modelscope.pipelines.base import Pipeline
【报错行】pipeline(‘video-captioning’,model=model_id)
Traceback (most recent call last):
File “”, line 1, in
File “/home//anaconda3/envs/pt10_py37/lib/python3.7/site-packages/modelscope/pipelines/builder.py”, line 162, in pipeline
return build_pipeline(cfg, task_name=task)
File “/home//anaconda3/envs/pt10_py37/lib/python3.7/site-packages/modelscope/pipelines/builder.py”, line 66, in build_pipeline
cfg, PIPELINES, group_key=task_name, default_args=default_args)
File “/home/**/anaconda3/envs/pt10_py37/lib/python3.7/site-packages/modelscope/utils/registry.py”, line 215, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}’)
TypeError: VideoCaptioningPipeline: HiTeAForAllTasks: ‘NoneType’ object is not callable
这是因为您的 ModelScope 版本过低的原因,建议升级到最新版ModelScope并检查安装是否正确。
建议采用以上命令进行更新并重新加载模型,如果没有解决,请检查是否已安装 pip 的依赖库,如有缺失请补全。