-
Notifications
You must be signed in to change notification settings - Fork 5.1k
内存泄露问题 #1218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@LonelyTaker 正常推理之后没有释放显存吗? |
不是显存,内存未被释放 |
随着推理请求的增多,占用内存会不断增加,即使释放模型,也无法释放掉占用的内存 |
了解了 |
在推理完成之后,使用gc控制器对内存进行回收。 RVC-Boss#1218
请问这个问题有解决吗 |
没 |
@LonelyTaker 可以試試設定 TORCH_CUDNN_V8_API_DISABLED=1,我自己測試加上該環境變數後就沒有出現記憶體增長的現象 。 我自己做開發時發現在 torch 2.2.1 的版本下,在做 Conv1d 時會有 memory leak 的現象,查閱相關文章後發現可能是 torch 會對卷積層的計算結果做 cache。 然後該 cache 機制是在 CUDNN V8 版本才有的,可以透過上述環境變數停用該機制。 |
_batch_audio_fragment = (self.vits_model.decode( all_pred_semantic, _batch_phones, refer_audio_spec ).detach()[0, 0, :])
目前定位到这条语句存在明显的内存泄露现象。想请问下是什么原因导致?
The text was updated successfully, but these errors were encountered: