-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Export ONNX Complete Code for v1, v2, v2pro, v2proplus #2586
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
Open
zpeng11
wants to merge
40
commits into
RVC-Boss:main
Choose a base branch
from
zpeng11:export_v2pp_onnx_pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…odo:solve dependancy in playground runs
…n from pure input data
…utput under deterministic random, fixed topk to 15
… todo:clean code and try v3v4
…l to unify first and following step
牛的,期待完成 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
重写了T2S 模型的部分ONNX运行方法,实现了v1,v2,v2pro,v2proplus 的ONNX导出。使用deterministic random在wsl本地测试验证过数值符合先前实现。




欢迎交流或提出建议。
请详见
GPT_SoVITS/AR/models/t2s_model_onnx.py
和GPT_SoVITS/AR/modules/patched_mha_with_cache_onnx.py
将python动态kvcache prefill逻辑转为计算图运行时判断,实现了prefill和step统一接口,统一导出。将kv cache 增长或开辟的实现逻辑交给模型调用者上层。将kvcache增长维度改为第0维,允许线性空间增长。增加采样参数输入。GSV 本体模型导出为
xxx_t2s_init_stage.onnx
,xxx_t2s_stage_decoder.onnx
, 和xxx_vits.onnx
。在全精度v2下大约分别11MB, 300MB, 158MBinit_stage 模型处理输入准备autoregressive需要参数:
stage_decoder 模型进行autoregressive
vits模型:
同时为音频处理的hubert模型和sv模型和傅里叶变换准备了
xxx_audio_preprocess.onnx
并且准备了roberta模型的onnx导出script
GPT_SoVITS/export_roberta_onnx.py
ONNXRuntime 使用可以参考本人playground
已知问题:
进行中工作: