Kedreamix / Linly-Dubbing

智能视频多语言AI配音/翻译工具 - Linly-Dubbing — “AI赋能,语言无界”
Apache License 2.0
1.81k stars 166 forks source link

numpy版本错误问题,以及 model_name未定义,总结失败 #6

Closed neohob closed 1 month ago

neohob commented 3 months ago

python 3.10.14

  1. 安装时出现numpy版本出错: Attempting uninstall: TTS Found existing installation: TTS 0.22.0 Uninstalling TTS-0.22.0: Successfully uninstalled TTS-0.22.0 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. audiostretchy 1.3.5 requires numpy>=1.23.0, but you have numpy 1.22.0 which is incompatible. Successfully installed TTS-0.22.0 demucs-4.1.0a2 numpy-1.22.0 openai-whisper-20231117 whisperx-3.1.1

  2. model_name未定义: 2024-08-20 00:37:41.118 | WARNING | tools.step030_translation:summarize:172 - 总结失败 name 'model_name' is not defined 2024-08-20 00:37:42.134 | WARNING | tools.step030_translation:summarize:172 - 总结失败 name 'model_name' is not defined 2024-08-20 00:37:43.141 | WARNING | tools.step030_translation:summarize:172 - 总结失败 name 'model_name' is not defined 2024-08-20 00:37:44.143 | WARNING | tools.step030_translation:summarize:172 - 总结失败 name 'model_name' is not defined 2024-08-20 00:37:45.155 | WARNING | tools.step030_translation:summarize:172 - 总结失败 name 'model_name' is not defined 2024-08-20 00:37:46.163 | WARNING | tools.step030_translation:summarize:172 - 总结失败 name 'model_name' is not defined 2024-08-20 00:37:47.170 | WARNING | tools.step030_translation:summarize:172 - 总结失败 name 'model_name' is not defined 2024-08-20 00:37:48.180 | WARNING | tools.step030_translation:summarize:172 - 总结失败 name 'model_name' is not defined 2024-08-20 00:37:49.194 | WARNING | tools.step030_translation:summarize:172 - 总结失败 name 'model_name' is not defined 2024-08-20 00:37:50.196 | ERROR | tools.do_everything:process_video:60 - Error processing video abc - aaa: 总结失败

.env文件内容

OPENAI_API_KEY = '' OPENAI_API_BASE = # MODEL_NAME = 'gpt-3.5-turbo' MODEL_NAME = 'qwen/Qwen1.5-4B-Chat' # 下载模型的HF_TOKEN HF_TOKEN = 'hf_api_key(READ)'

# 火山引擎 BYTEDANCE_APPID = BYTEDANCE_ACCESS_TOKEN =

# 如果在从 huggingface 下载模型时报错,uncomment 下面的代码 # HF_ENDPOINT = 'https://hf-mirror.com' BILI_BASE64 =

jerry0908mo commented 3 months ago

问题1

问题1的原因是 版本冲突了,你给出的日志里面有体现:

audiostretchy 1.3.5 requires numpy>=1.23.0, but you have numpy 1.22.0 which is incompatible.

这个问题我也遇到过,我是重新执行了 pip install -r requirements_module.txt 命令就好了。

问题2

.env文件内容中的MODEL_NAME 你不需要修改,先保持原样,先跑起来再尝试改模型。

Kedreamix commented 3 months ago

非常感谢你提出的问题,我针对你的问题我也有重新定义了一下requirements.txt

neohob commented 3 months ago

第一个问题再次运行错误的确就没有了 第二个问题我把 evn.example 再次复制到.env,增加了个hf_token,其他都没改,但是还是出现model_name未定义错误,现在.env的内容:

OPENAI_API_KEY = 'sk-***' OPENAI_API_BASE = # MODEL_NAME = 'gpt-3.5-turbo' MODEL_NAME = 'qwen/Qwen1.5-1.8B-Chat' # 下载模型的HF_TOKEN HF_TOKEN = 'hf_token'

# 火山引擎 BYTEDANCE_APPID = BYTEDANCE_ACCESS_TOKEN =

# 如果在从 huggingface 下载模型时报错,uncomment 下面的代码 # HF_ENDPOINT = 'https://hf-mirror.com' BILI_BASE64 =

neohob commented 3 months ago

此外,(都是 windows 11 下,管理员权限启动的CMD)

3.第一次跑的时候出现translator库没有找到,我自己pip install 了一个

4.启动webui 的时候有个警告:

(linly_dubbing) F:\Linly-Dubbing>python webui.py C:\Users\lenovo\anaconda3\envs\linly_dubbing\lib\site-packages\pyannote\audio\core\io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call. torchaudio.set_audio_backend("soundfile") failed to import ttsfrd, use WeTextProcessing instead Running on local URL: http://127.0.0.1:6006

neohob commented 3 months ago

看了下代码,没办法在界面上关闭 summary,这个有什么用吗? 改OpenAI报Connection error, https://api.openai.com/v1/ 无法访问(有🪜) 改 Google translate / Bing,translate failed 改 LLM 报 model_name not defined

Kedreamix commented 3 months ago

我已经重新更新了代码了,同时我会再次测试一下

Kedreamix commented 3 months ago

我已经测试过了,一切暂时是正常的,可以重新尝试一下,如果有问题可以反馈给我 @neohob

neohob commented 3 months ago

感谢作者用心回复,但还是出问题:

2024-08-21 20:14:01.227 | WARNING | tools.step030_translation:summarize:172 - 总结失败 Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper_CUDAindex_select) 2024-08-21 20:14:02.245 | WARNING | tools.step030_translation:summarize:172 - 总结失败 Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper_CUDA__index_select) 2024-08-21 20:14:03.250 | WARNING | tools.step030_translation:summarize:172 - 总结失败 Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper_CUDAindex_select) 2024-08-21 20:14:04.267 | WARNING | tools.step030_translation:summarize:172 - 总结失败 Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper_CUDA__index_select)

Kedreamix commented 3 months ago

这个应该是cpu和cuda的问题,我之前可能全部设置了gpu,所以出现了问题,现在应该OK了,可以关注一下,或者使用api来操作

63447285 commented 2 months ago

此外,(都是 windows 11 下,管理员权限启动的CMD)

3.第一次跑的时候出现translator库没有找到,我自己pip install 了一个

4.启动webui 的时候有个警告:

(linly_dubbing) F:\Linly-Dubbing>python webui.py C:\Users\lenovo\anaconda3\envs\linly_dubbing\lib\site-packages\pyannote\audio\core\io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call. torchaudio.set_audio_backend("soundfile") failed to import ttsfrd, use WeTextProcessing instead Running on local URL: http://127.0.0.1:6006

这个警告影响正常使用吗?我也出现了

Kedreamix commented 2 months ago

不影响使用的,应该都是正常的 @63447285