From 1a6c021cd102b48b44e006decebc165062df8a95 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Mon, 3 Apr 2023 12:22:51 +0900 Subject: [PATCH] feat: add quickvc, fix usage of ContentVec, remove onnx support (#197) BREAKING CHANGE: The module structure has been completely changed, and some of the default values for configurations have also been changed. --- .idea/workspace.xml | 89 ++- LICENSE | 201 ++++++ README.md | 65 +- src/so_vits_svc_fork/__main__.py | 60 +- src/so_vits_svc_fork/data_utils.py | 4 +- src/so_vits_svc_fork/f0.py | 237 ++++++++ src/so_vits_svc_fork/gui.py | 21 +- src/so_vits_svc_fork/hparams.py | 38 ++ src/so_vits_svc_fork/hubert/hubert_model.py | 223 ------- .../hubert/hubert_model_onnx.py | 219 ------- .../hubert/put_hubert_ckpt_here | 0 .../inference/{infer_tool.py => core.py} | 88 +-- .../{inference_main.py => inference/main.py} | 2 +- src/so_vits_svc_fork/models.py | 519 ---------------- .../{hubert => modules/decoders}/__init__.py | 0 src/so_vits_svc_fork/modules/decoders/f0.py | 45 ++ .../modules/decoders/hifigan/__init__.py | 3 + .../decoders/hifigan/_models.py} | 361 +---------- .../modules/decoders/hifigan/_utils.py | 15 + .../modules/decoders/mb_istft/__init__.py | 15 + .../modules/decoders/mb_istft/_generators.py | 376 ++++++++++++ .../modules/decoders/mb_istft/_loss.py | 11 + .../modules/decoders/mb_istft/_pqmf.py | 130 ++++ .../modules/decoders/mb_istft/_stft.py | 248 ++++++++ .../modules/decoders/mb_istft/_stft_loss.py | 142 +++++ .../modules/descriminators.py | 177 ++++++ src/so_vits_svc_fork/modules/encoders.py | 136 +++++ src/so_vits_svc_fork/modules/flows.py | 48 ++ .../modules/mel_processing.py | 4 +- src/so_vits_svc_fork/modules/synthesizers.py | 233 +++++++ src/so_vits_svc_fork/onnx_export.py | 65 -- src/so_vits_svc_fork/onnxexport/model_onnx.py | 404 ------------ .../{onnxexport => preprocessing}/__init__.py | 0 .../config_templates/quickvc.json | 69 +++ .../so-vits-svc-4.0v1-legacy.json} | 0 .../config_templates/so-vits-svc-4.0v1.json | 62 ++ .../preprocess_flist_config.py | 6 +- .../preprocess_hubert_f0.py | 63 +- .../preprocess_resample.py | 0 .../preprocess_speaker_diarization.py | 0 .../{ => preprocessing}/preprocess_split.py | 0 .../{ => preprocessing}/preprocess_utils.py | 0 src/so_vits_svc_fork/spec_gen.py | 23 - src/so_vits_svc_fork/train.py | 157 +++-- src/so_vits_svc_fork/utils.py | 575 ++++++------------ src/so_vits_svc_fork/vdecoder/__init__.py | 0 .../vdecoder/hifigan/__init__.py | 0 src/so_vits_svc_fork/vdecoder/hifigan/env.py | 15 - .../vdecoder/hifigan/nvSTFT.py | 162 ----- .../vdecoder/hifigan/utils.py | 71 --- tests/test_main.py | 30 +- 51 files changed, 2736 insertions(+), 2676 deletions(-) create mode 100644 src/so_vits_svc_fork/f0.py create mode 100644 src/so_vits_svc_fork/hparams.py delete mode 100644 src/so_vits_svc_fork/hubert/hubert_model.py delete mode 100644 src/so_vits_svc_fork/hubert/hubert_model_onnx.py delete mode 100644 src/so_vits_svc_fork/hubert/put_hubert_ckpt_here rename src/so_vits_svc_fork/inference/{infer_tool.py => core.py} (91%) rename src/so_vits_svc_fork/{inference_main.py => inference/main.py} (99%) delete mode 100644 src/so_vits_svc_fork/models.py rename src/so_vits_svc_fork/{hubert => modules/decoders}/__init__.py (100%) create mode 100644 src/so_vits_svc_fork/modules/decoders/f0.py create mode 100644 src/so_vits_svc_fork/modules/decoders/hifigan/__init__.py rename src/so_vits_svc_fork/{vdecoder/hifigan/models.py => modules/decoders/hifigan/_models.py} (50%) create mode 100644 src/so_vits_svc_fork/modules/decoders/hifigan/_utils.py create mode 100644 src/so_vits_svc_fork/modules/decoders/mb_istft/__init__.py create mode 100644 src/so_vits_svc_fork/modules/decoders/mb_istft/_generators.py create mode 100644 src/so_vits_svc_fork/modules/decoders/mb_istft/_loss.py create mode 100644 src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py create mode 100644 src/so_vits_svc_fork/modules/decoders/mb_istft/_stft.py create mode 100644 src/so_vits_svc_fork/modules/decoders/mb_istft/_stft_loss.py create mode 100644 src/so_vits_svc_fork/modules/descriminators.py create mode 100644 src/so_vits_svc_fork/modules/encoders.py create mode 100644 src/so_vits_svc_fork/modules/flows.py create mode 100644 src/so_vits_svc_fork/modules/synthesizers.py delete mode 100644 src/so_vits_svc_fork/onnx_export.py delete mode 100644 src/so_vits_svc_fork/onnxexport/model_onnx.py rename src/so_vits_svc_fork/{onnxexport => preprocessing}/__init__.py (100%) create mode 100644 src/so_vits_svc_fork/preprocessing/config_templates/quickvc.json rename src/so_vits_svc_fork/{configs_template/config_template.json => preprocessing/config_templates/so-vits-svc-4.0v1-legacy.json} (100%) create mode 100644 src/so_vits_svc_fork/preprocessing/config_templates/so-vits-svc-4.0v1.json rename src/so_vits_svc_fork/{ => preprocessing}/preprocess_flist_config.py (92%) rename src/so_vits_svc_fork/{ => preprocessing}/preprocess_hubert_f0.py (60%) rename src/so_vits_svc_fork/{ => preprocessing}/preprocess_resample.py (100%) rename src/so_vits_svc_fork/{ => preprocessing}/preprocess_speaker_diarization.py (100%) rename src/so_vits_svc_fork/{ => preprocessing}/preprocess_split.py (100%) rename src/so_vits_svc_fork/{ => preprocessing}/preprocess_utils.py (100%) delete mode 100644 src/so_vits_svc_fork/spec_gen.py delete mode 100644 src/so_vits_svc_fork/vdecoder/__init__.py delete mode 100644 src/so_vits_svc_fork/vdecoder/hifigan/__init__.py delete mode 100644 src/so_vits_svc_fork/vdecoder/hifigan/env.py delete mode 100644 src/so_vits_svc_fork/vdecoder/hifigan/nvSTFT.py delete mode 100644 src/so_vits_svc_fork/vdecoder/hifigan/utils.py diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7b269da5..73a840f7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,62 +2,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -65,6 +39,9 @@