svc-develop-team / so-vits-svc

SoftVC VITS Singing Voice Conversion
GNU Affero General Public License v3.0
25.26k stars 4.74k forks source link

[Bug]: 4.0下如果数据集过多生成F0会导致爆显存 #356

Closed HoshikawaYoru closed 1 year ago

HoshikawaYoru commented 1 year ago

系统平台版本号

Windows11 22H2

GPU 型号

NVIDIA GeForce RTX 3060

Python版本

3.8.17

PyTorch版本

2.0.1+cu118

sovits分支

4.0(默认)

数据集来源(用于判断数据集质量)

UVR处理过的人物干声

出现问题的环节或执行的命令

python preprocess_hubert_f0.py

情况描述

在4.0中,如果数据集过多时(约1.6GB,1178条音频)生成f0就会爆显存,并且貌似没有什么解决方法

日志

https://pastebin.com/1gh6SaUf

补充说明

No response

ms903x1 commented 1 year ago

无法复现该错误,我曾经尝试过在22g显存的显卡上(nvidia a10 开启ecc),预处理总大小超过30g的数据,并没有发现爆显存问题。

ms903x1 commented 1 year ago

”torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 3.61 GiB (GPU 0; 12.00 GiB total capacity; 4.33 GiB already allocated; 0 bytes free; 7.98 GiB reserved in total by PyTorch) “ 能否检查下数据集里有没有过长切片?预处理过程中一次申请超过3g的显存很不正常。

HoshikawaYoru commented 1 year ago

我看看

HoshikawaYoru commented 1 year ago

好吧,我发现了十个左右没有被正确切片的音频,其他数据集倒是没问题

ms903x1 commented 1 year ago

推荐的切片时长范围是:2-15秒,过短的切片会导致hubert编码效果不佳,过长的切片会导致爆显存。

HoshikawaYoru commented 1 year ago

明白了

HoshikawaYoru commented 1 year ago

建议可以增加一个音频切片脚本,这样用户也可以不用自己摸索了

ms903x1 commented 1 year ago

推荐使用audio-slicer切片机进行切片,这个切片机使用静音检测进行切片的,不过这个切片机切完以后,可能仍然存在过短和过长的切片,需要手工筛选。 你这种情况可能需要一个强制切片脚本,但是强制切片可能会切在音素和呼吸上,所以优先级不高。 audio-slicer

HoshikawaYoru commented 1 year ago

我准备写一个强制切片脚本,然后提个PR


From: ms903x1 @.> Sent: Monday, July 31, 2023 1:16 PM To: svc-develop-team/so-vits-svc @.> Cc: 星川よる @.>; State change @.> Subject: Re: [svc-develop-team/so-vits-svc] [Bug]: 4.0下如果数据集过多生成F0会导致爆显存 (Issue #356)

推荐使用audio-slicer切片机进行切片,这个切片机使用静音检测进行切片的,不过这个切片机切完以后,可能仍然存在过短和过长的切片,需要手工筛选。 你这种情况可能需要一个强制切片脚本,但是强制切片可能会切在音素和呼吸上,所以优先级不高。 audio-slicerhttps://github.com/openvpi/audio-slicer

― Reply to this email directly, view it on GitHubhttps://github.com/svc-develop-team/so-vits-svc/issues/356#issuecomment-1657622493, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7ZRWVHLD3KLVVRQ3QN5YA3XS45TZANCNFSM6AAAAAA25V5ILY. You are receiving this because you modified the open/close state.Message ID: @.***>

ms903x1 commented 1 year ago

你可以参考rvc的强制切片,在每个切点的前后各添加0.3秒的交叉淡化,可能会改善切在音素和呼吸上的问题。

相关链接: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/trainset_preprocess_pipeline_print.py