PaddlePaddle / PaddleSpeech

Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.
https://paddlespeech.readthedocs.io
Apache License 2.0
10.99k stars 1.83k forks source link

[TTS]使用gpu合成后显存未释放 #2908

Closed shiyv132 closed 1 year ago

shiyv132 commented 1 year ago

For support and discussions, please use our Discourse forums.

If you've found a bug then please create an issue with the following information:

Describe the bug 我使用https://zhuanlan.zhihu.com/p/587765776中的代码块在anaconda的命令行窗口进行合成,windows11,gpu是rtx3050移动端,4g显存,发现每次运行完保存完文件之后显存一直维持在近满的状态,直到关闭窗口重进或退出python环境后重置。

To Reproduce Steps to reproduce the behavior: 1.打开anaconda,进入虚拟环境,python版本3.8.16

  1. 运行更改了待合成文本的代码块
  2. 第一次合成正常,运行完后显存维持在3.7g左右,等待一两分钟无果
  3. 再次合成即报错,显示(翻译)未能分配足够(大概500m)显存,剩余0,退出重新进入合成能正常运行,但又出现以上情况

Expected behavior A clear and concise description of what you expected to happen.

Screenshots wrong

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context 我paddlespeech本来是使用源码编译安装的,会显示paddlespeech0.0.0,于是我用pip install paddlespeech==1.3重新安装的

iftaken commented 1 year ago

在命令行里面变量占用的显存在关闭前是不释放的,你把这部分的代码写在py文件里面,看看多次运行是否可以

shiyv132 commented 1 year ago

在命令行里面变量占用的显存在关闭前是不释放的,你把这部分的代码写在py文件里面,看看多次运行是否可以

感谢回复,是正常的就好,我是小白不懂写文件而且要经常合成新文本所以就重开吧,抱歉 还有就是paddlespeech源码编译安装的时候会自动安装版本0.0.0, 我是按安装说明的命令git clone https://github.com/PaddlePaddle/PaddleSpeech.git cd PaddleSpeech pip install pytest-runner pip install . 安装的,不知道什么问题,希望优化一下,没问题就没事了

iftaken commented 1 year ago

在命令行里面变量占用的显存在关闭前是不释放的,你把这部分的代码写在py文件里面,看看多次运行是否可以

感谢回复,是正常的就好,我是小白不懂写文件而且要经常合成新文本所以就重开吧,抱歉 还有就是paddlespeech源码编译安装的时候会自动安装版本0.0.0, 我是按安装说明的命令git clone https://github.com/PaddlePaddle/PaddleSpeech.git cd PaddleSpeech pip install pytest-runner pip install . 安装的,不知道什么问题,希望优化一下,没问题就没事了

这是正常的,使用源码编译的方式就是最新develop版本的0.0.0,如果是pip install paddlespeech 则会安装发行版本的,带有版本号,比如当前最新发行版本是1.3,后续会持续升级