jianchang512 / pyvideotrans

Translate the video from one language to another and add dubbing. 将视频从一种语言翻译为另一种语言,并添加配音
https://pyvideotrans.com
GNU General Public License v3.0
8.14k stars 902 forks source link

识别完字幕后闪退 #430

Closed bailitingqin closed 1 month ago

bailitingqin commented 1 month ago

复现方式: 1.版本:1.89(含patch) 2.语言:日译中 3.模型尝试:large-v3,tiny,small,medium都尝试了 4.环境:4090 laptop 5.参数设定:为防止是显存问题,temperature已经设成0,beam_size=1,best_of=1,condition_on_previous_text=false。 6.其它:设置cuda加速。

视频文件为2小时,最初用largev3时确实是显存问题,但是采用分割/使用小模型/改参数等方法之后,显存都用不满,但无一例外的都是识别完字幕后闪退。

cuda已经正确配置。 Cuda compilation tools, release 12.5, V12.5.40

cudnn等dll也已经copy到system32,后来尝试复现的时候还copy了一份到exe目录。

补充: 关闭cuda加速后,能够完成视频翻译。

jianchang512 commented 1 month ago

打开 videotrans/set.ini ,搜索 temperature=1 改为 temperature=0 重启软件再试

bailitingqin commented 1 month ago

额……可能是我字写的太多了吧,复现的第五点已经写了呀,temperature已经设定成0了。

jianchang512 commented 1 month ago

这是 faster-whisper存在的问题,在执行完卸载时可能会闪退,

参考 https://github.com/SYSTRAN/faster-whisper/issues/71

jianchang512 commented 1 month ago

或者源码部署,使用整体识别模式

打开 videotrans/recognition/all.py 搜索 del model,然后将该代码全部删掉,再试试

bailitingqin commented 1 month ago

哦……那感觉只能源码部署试试了。

python --version Python 3.12.3

这个python版本没问题吧?应该是兼容3.10的吧。

或者我可以尝试一下打断自动化步骤,音视频转字幕->翻译字幕->字幕嵌入视频,试试。

jianchang512 commented 1 month ago

兼容3.10

bailitingqin commented 1 month ago

好的,谢谢