onexuan / vits-ncnn-convert-tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

介绍

这是一个将vits的pytorch权重转换为ncnn支持的格式的脚本,项目基于pnnxvits开发,配合此项目使用 https://github.com/weirdseed/Vits-Android-ncnn

使用说明

Windows

命令行输入:

.\convert_model.exe -c \path\to\config.json -m \path\to\model.pth -fp16

Linux

命令行输入

./convert_model -c /path/to/config.json -m /path/to/model.pth -fp16

python用户

1.创建虚拟环境

conda create -n vits-ncnn python=3.10
conda activate vits-ncnn

2.安装依赖

pip install -r requirements.txt

3.启动脚本

python convert_model.py -c /path/to/config.json -m /path/to/model.pth -fp16

参考

https://github.com/jaywalnut310/vits

https://github.com/pnnx/pnnx

https://github.com/Tencent/ncnn

https://github.com/CjangCjengh/MoeGoe

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%