Diffusion-VITS:VITS与Grad-TTS的融合

Grad-TTS的核心思想:把diffusion当做一个postnet(或者Plug-In)用于特征增强。因此,它可以是一种通用模块应用于任何网络中,典型的作为FastSpeech2的后处理模块。这里,作者以VITS的SVC场景为例,提供Grad-TTS融合进VITS的思想和代码。

思想:

1,训练原始VITS模型

具体实现,略~~~

2,训练插件Diffusion模型

1)冻结原始VITS模型所有参数

2)训练Diffusion模型学习Flow推理结果与wave后验编码结果Z之间的noise

3,Diffusion可以减少Flow推理结果与真值之间的Gap,可以减缓过平滑问题

代码:

VITS歌声转换中实现Plug-In-Diffsuion的代码(语音合成同样适用):

https://github.com/PlayVoice/so-vits-svc-5.0/tree/plug-in-diffusion

满足MIT协议下,该代码的使用无限制

下面是架构原理图,与操作步骤

Plug-in diffusion based on Grad-TTS from HUAWEI Noah's Ark Lab

Base framework ~~~

Plug-In-Diffusion

Notices

It looks like it's useless, but it seems to be somewhat useful

好像没啥用,好像有点用

训练

  1. Complete the training of the bigvgan-mix-v2 master model

    完成 bigvgan-mix-v2 主模型的训练

  2. Create a working path and pull the branch codes: different from the bigvgan-mix-v2

    创建工作路径,拉取分支代码:与 bigvgan-mix-v2 不同

  3. install additional dependencies for diffusion:

    为 diffusion 安装额外依赖:

    pip install einops

  4. Copy bigvgan-mix-v2 training data data_svc and files to the current working directory: same as bigvgan-mix-v2 training data

    拷贝 bigvgan-mix-v2 的训练数据 data_svc 与 files 到当前工作目录:与 bigvgan-mix-v2 训练数据一样

  5. Specify the master model path in configs/base.yaml:

    在 configs/base.yaml 中指定主模型路径:

    pretrain: "bigvgan-mix-v2/chkpt/sovits5.0/sovits5.0_0500.pt"

  6. Start train

    启动训练

    python svc_trainer.py --config configs/base.yaml --name plug

Check the log to be sure: your master model is loaded

复制代码
python svc_trainer.py --config configs/base.yaml --name plug
Batch size per GPU : 8
----------10----------
2023-09-06 06:31:23,136 - INFO - Start from 32k pretrain model: sovits5.0_1100. pt
plug.estimator.spk_mlp.0.weight is not in the checkpoint
plug.estimator.spk_mlp.0.bias is not in the checkpoint
plug.estimator.spk_mlp.2.weight is not in the checkpoint
plug.estimator.spk_mlp.2.bias is not in the checkpoint
plug.estimator.mlp.0.weight is not in the checkpoint
plug.estimator.mlp.0.bias is not in the checkpoint
plug.estimator.mlp.2.weight is not in the checkpoint
plug.estimator.mlp.2.bias is not in the checkpoint
plug.estimator.downs.0.0.mlp.1.weight is not in the checkpoint
plug.estimator.downs.0.0.mlp.1.bias is not in the checkpoint
plug.estimator.downs.0.0.block1.block.0.weight is not in the checkpoint
plug.estimator.downs.0.0.block1.block.0.bias is not in the checkpoint

Inference

复制代码
python svc_inference.py --config configs/base.yaml --model chkpt/plug/plug_***.pt --spk ./data_svc/singer/your_singer.spk.npy --wave test.wav

svc_inference.py has a small changes from bigvgan-mix-v2

相关推荐
DogDaoDao1 小时前
用PyTorch实现多类图像分类:从原理到实际操作
图像处理·人工智能·pytorch·python·深度学习·分类·图像分类
小和尚同志1 小时前
450 star 的神级提示词管理工具 AI-Gist,让提示词不再吃灰
人工智能·aigc
金井PRATHAMA2 小时前
大脑的藏宝图——神经科学如何为自然语言处理(NLP)的深度语义理解绘制新航线
人工智能·自然语言处理
大学生毕业题目2 小时前
毕业项目推荐:28-基于yolov8/yolov5/yolo11的电塔危险物品检测识别系统(Python+卷积神经网络)
人工智能·python·yolo·cnn·pyqt·电塔·危险物品
星期天要睡觉2 小时前
深度学习——卷积神经网络CNN(原理:基本结构流程、卷积层、池化层、全连接层等)
人工智能·深度学习·cnn
哈基鑫3 小时前
支持向量机(SVM)学习笔记
人工智能·机器学习·支持向量机
fsnine3 小时前
深度学习——优化函数
人工智能·深度学习·cnn
2501_924877214 小时前
强逆光干扰漏检率↓78%!陌讯多模态融合算法在光伏巡检的实战优化
大数据·人工智能·算法·计算机视觉·目标跟踪
算家计算4 小时前
多模态融合新纪元:Ovis2.5 本地部署教程,实现文本、图像与代码的深度协同推理
人工智能·开源
算家计算4 小时前
全球AI百强榜发布!中国产品占据移动端半壁江山
人工智能·资讯·deepseek