diff --git a/.gitignore b/.gitignore index 82c8a7406..630c32ecb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ __pycache__ *.pyd hubert_base.pt /logs +.venv diff --git a/LICENSE b/LICENSE index 8af94bd35..d41294792 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,64 @@ -MIT License - -Copyright (c) 2023 liujing04 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2023 liujing04 +Copyright (c) 2023 源文雨 + + 本软件及其相关代码以MIT协议开源,作者不对软件具备任何控制力,使用软件者、传播软件导出的声音者自负全责。 + 如不认可该条款,则不能使用或引用软件包内任何代码和文件。 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +特此授予任何获得本软件和相关文档文件(以下简称“软件”)副本的人免费使用、复制、修改、合并、出版、分发、再授权和/或销售本软件的权利,以及授予本软件所提供的人使用本软件的权利,但须符合以下条件: +上述版权声明和本许可声明应包含在软件的所有副本或实质部分中。 +软件是“按原样”提供的,没有任何明示或暗示的保证,包括但不限于适销性、适用于特定目的和不侵权的保证。在任何情况下,作者或版权持有人均不承担因软件或软件的使用或其他交易而产生、产生或与之相关的任何索赔、损害赔偿或其他责任,无论是在合同诉讼、侵权诉讼还是其他诉讼中。 + + +The LICENCEs for related libraries are as follows. +相关引用库协议如下: + +ContentVec +https://github.com/auspicious3000/contentvec/blob/main/LICENSE +MIT License + +VITS +https://github.com/jaywalnut310/vits/blob/main/LICENSE +MIT License + +HIFIGAN +https://github.com/jik876/hifi-gan/blob/master/LICENSE +MIT License + +gradio +https://github.com/gradio-app/gradio/blob/main/LICENSE +Apache License 2.0 + +ffmpeg +https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv3 +https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2021-02-28-12-32/ffmpeg-n4.3.2-160-gfbb9368226-win64-lgpl-4.3.zip +LPGLv3 License +MIT License + +ultimatevocalremovergui +https://github.com/Anjok07/ultimatevocalremovergui/blob/master/LICENSE +https://github.com/yang123qwe/vocal_separation_by_uvr5 +MIT License + +audio-slicer +https://github.com/openvpi/audio-slicer/blob/main/LICENSE +MIT License diff --git a/MDXNet.py b/MDXNet.py index 6e996acce..19164b234 100644 --- a/MDXNet.py +++ b/MDXNet.py @@ -1,11 +1,9 @@ import soundfile as sf -import torch, pdb, time, argparse, os, warnings, sys, librosa +import torch, pdb, os, warnings, librosa import numpy as np import onnxruntime as ort -from scipy.io.wavfile import write from tqdm import tqdm import torch -import torch.nn as nn dim_c = 4 diff --git a/README.md b/README.md index 8fc27982c..a660b46d5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb) -[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt) +[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE) [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/) [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk) diff --git a/app.py b/app.py index 8688973d6..d8264b895 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,3 @@ -import io import os import torch @@ -6,14 +5,12 @@ import gradio as gr import librosa import numpy as np -import soundfile import logging from fairseq import checkpoint_utils -from my_utils import load_audio from vc_infer_pipeline import VC import traceback from config import Config -from infer_pack.models import ( +from lib.infer_pack.models import ( SynthesizerTrnMs256NSFsid, SynthesizerTrnMs256NSFsid_nono, SynthesizerTrnMs768NSFsid, diff --git a/config.py b/config.py index a59f738a3..eadbcee78 100644 --- a/config.py +++ b/config.py @@ -81,11 +81,11 @@ def device_config(self) -> tuple: or "1070" in self.gpu_name or "1080" in self.gpu_name ): - print("16|10|P40 series, force to fp32") + print("Found GPU", self.gpu_name, ", force to fp32") self.is_half = False use_fp32_config() else: - self.gpu_name = None + print("Found GPU", self.gpu_name) self.gpu_mem = int( torch.cuda.get_device_properties(i_device).total_memory / 1024 @@ -99,12 +99,12 @@ def device_config(self) -> tuple: with open("trainset_preprocess_pipeline_print.py", "w") as f: f.write(strr) elif self.has_mps(): - print("No supported Nvidia GPU, use MPS instead") + print("No supported Nvidia GPU found, use MPS instead") self.device = "mps" self.is_half = False use_fp32_config() else: - print("No supported Nvidia GPU, use CPU instead") + print("No supported Nvidia GPU found, use CPU instead") self.device = "cpu" self.is_half = False use_fp32_config() diff --git a/configs/32k.json b/configs/32k.json index d5f16d691..400b6be80 100644 --- a/configs/32k.json +++ b/configs/32k.json @@ -7,7 +7,7 @@ "betas": [0.8, 0.99], "eps": 1e-9, "batch_size": 4, - "fp16_run": true, + "fp16_run": false, "lr_decay": 0.999875, "segment_size": 12800, "init_lr_ratio": 1, diff --git a/configs/40k.json b/configs/40k.json index 4ffc87b9e..cb30b8be4 100644 --- a/configs/40k.json +++ b/configs/40k.json @@ -7,7 +7,7 @@ "betas": [0.8, 0.99], "eps": 1e-9, "batch_size": 4, - "fp16_run": true, + "fp16_run": false, "lr_decay": 0.999875, "segment_size": 12800, "init_lr_ratio": 1, diff --git a/configs/48k.json b/configs/48k.json index 2d0e05beb..687599100 100644 --- a/configs/48k.json +++ b/configs/48k.json @@ -7,7 +7,7 @@ "betas": [0.8, 0.99], "eps": 1e-9, "batch_size": 4, - "fp16_run": true, + "fp16_run": false, "lr_decay": 0.999875, "segment_size": 11520, "init_lr_ratio": 1, diff --git a/docs/Changelog_CN.md b/docs/Changelog_CN.md index 42a71ee36..eb67ba574 100644 --- a/docs/Changelog_CN.md +++ b/docs/Changelog_CN.md @@ -29,7 +29,7 @@ todolist: - 废弃32k模型的训练 ### 20230513更新 -- 清除一键包内部老版本runtime内残留的infer_pack和uvr5_pack +- 清除一键包内部老版本runtime内残留的lib.infer_pack和uvr5_pack - 修复训练集预处理伪多进程的bug - 增加harvest识别音高可选通过中值滤波削弱哑音现象,可调整中值滤波半径 - 导出音频增加后处理重采样 diff --git a/docs/Changelog_EN.md b/docs/Changelog_EN.md index 8e2a5d1d5..20fc84c86 100644 --- a/docs/Changelog_EN.md +++ b/docs/Changelog_EN.md @@ -27,7 +27,7 @@ todolist: - v1 32k model training is no more supported ### 2023-05-13 -- Clear the redundant codes in the old version of runtime in the one-click-package: infer_pack and uvr5_pack +- Clear the redundant codes in the old version of runtime in the one-click-package: lib.infer_pack and uvr5_pack - Fix pseudo multiprocessing bug in training set preprocessing - Adding median filtering radius adjustment for harvest pitch recognize algorithm - Support post processing resampling for exporting audio diff --git a/docs/Changelog_KO.md b/docs/Changelog_KO.md index 37e0891a5..52da1dfdb 100644 --- a/docs/Changelog_KO.md +++ b/docs/Changelog_KO.md @@ -33,7 +33,7 @@ ### 2023년 5월 13일 업데이트 -- 원클릭 패키지의 이전 버전 런타임 내, 불필요한 코드(infer_pack 및 uvr5_pack) 제거. +- 원클릭 패키지의 이전 버전 런타임 내, 불필요한 코드(lib.infer_pack 및 uvr5_pack) 제거. - 훈련 세트 전처리의 유사 다중 처리 버그 수정. - Harvest 피치 인식 알고리즘에 대한 중위수 필터링 반경 조정 추가. - 오디오 내보낼 때, 후처리 리샘플링 지원. diff --git a/docs/README.en.md b/docs/README.en.md index 2f950e659..40b357e1e 100644 --- a/docs/README.en.md +++ b/docs/README.en.md @@ -8,7 +8,7 @@ An easy-to-use Voice Conversion framework based on VITS.


[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb) -[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt) +[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE) [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/) [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk) diff --git a/docs/README.ja.md b/docs/README.ja.md index 55a25a49b..26ce3af19 100644 --- a/docs/README.ja.md +++ b/docs/README.ja.md @@ -8,7 +8,7 @@ VITSに基づく使いやすい音声変換(voice changer)framework


[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb) -[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt) +[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE) [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/) [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk) diff --git a/docs/README.ko.han.md b/docs/README.ko.han.md index 7eba87c66..cac9d70c4 100644 --- a/docs/README.ko.han.md +++ b/docs/README.ko.han.md @@ -8,7 +8,7 @@ VITS基盤의 簡單하고使用하기 쉬운音聲變換틀


[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb) -[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt) +[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE) [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/) [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk) diff --git a/docs/README.ko.md b/docs/README.ko.md index 261a80911..abea8e6a2 100644 --- a/docs/README.ko.md +++ b/docs/README.ko.md @@ -8,7 +8,7 @@ VITS 기반의 간단하고 사용하기 쉬운 음성 변환 프레임워크.
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI.ipynb) -[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/%E4%BD%BF%E7%94%A8%E9%9C%80%E9%81%B5%E5%AE%88%E7%9A%84%E5%8D%8F%E8%AE%AE-LICENSE.txt) +[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion-WebUI?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/LICENSE) [![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/) [![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HcsmBBGyVk) diff --git a/extract_f0_print.py b/extract_f0_print.py index bd6303e06..4610d954e 100644 --- a/extract_f0_print.py +++ b/extract_f0_print.py @@ -4,7 +4,6 @@ sys.path.append(now_dir) from my_utils import load_audio import pyworld -from scipy.io import wavfile import numpy as np, logging logging.getLogger("numba").setLevel(logging.WARNING) diff --git a/gui.py b/gui.py index 1e5e5d90b..e946dd550 100644 --- a/gui.py +++ b/gui.py @@ -31,7 +31,7 @@ # import matplotlib.pyplot as plt -from infer_pack.models import ( +from lib.infer_pack.models import ( SynthesizerTrnMs256NSFsid, SynthesizerTrnMs256NSFsid_nono, SynthesizerTrnMs768NSFsid, diff --git a/i18n/en_US.json b/i18n/en_US.json index 88d88d55a..3fdef9742 100644 --- a/i18n/en_US.json +++ b/i18n/en_US.json @@ -7,7 +7,7 @@ "step3a:正在训练模型": "Step 3a: Model training started", "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Training complete. You can check the training logs in the console or the 'train.log' file under the experiment folder.", "全流程结束!": "All processes have been completed!", - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录使用需遵守的协议-LICENSE.txt.": "This software is open source under the MIT license. The author does not have any control over the software. Users who use the software and distribute the sounds exported by the software are solely responsible.
If you do not agree with this clause, you cannot use or reference any codes and files within the software package. See the root directory Agreement-LICENSE.txt for details.", + "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "This software is open source under the MIT license. The author does not have any control over the software. Users who use the software and distribute the sounds exported by the software are solely responsible.
If you do not agree with this clause, you cannot use or reference any codes and files within the software package. See the root directory Agreement-LICENSE.txt for details.", "模型推理": "Model Inference", "推理音色": "Inferencing voice:", "刷新音色列表和索引路径": "Refresh voice list and index path", diff --git a/i18n/es_ES.json b/i18n/es_ES.json index 971f719fd..073629b9b 100644 --- a/i18n/es_ES.json +++ b/i18n/es_ES.json @@ -7,7 +7,7 @@ "step3a:正在训练模型": "Paso 3a: Entrenando el modelo", "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Entrenamiento finalizado, puede ver el registro de entrenamiento en la consola o en el archivo train.log en la carpeta del experimento", "全流程结束!": "¡Todo el proceso ha terminado!", - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录使用需遵守的协议-LICENSE.txt.": "Este software es de código abierto bajo la licencia MIT, el autor no tiene ningún control sobre el software, y aquellos que usan el software y difunden los sonidos exportados por el software son los únicos responsables.
Si no está de acuerdo con esta cláusula , no puede utilizar ni citar ningún código ni archivo del paquete de software Consulte el directorio raíz Agreement-LICENSE.txt para obtener más información.", + "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "Este software es de código abierto bajo la licencia MIT, el autor no tiene ningún control sobre el software, y aquellos que usan el software y difunden los sonidos exportados por el software son los únicos responsables.
Si no está de acuerdo con esta cláusula , no puede utilizar ni citar ningún código ni archivo del paquete de software Consulte el directorio raíz Agreement-LICENSE.txt para obtener más información.", "模型推理": "inferencia del modelo", "推理音色": "inferencia de voz", "刷新音色列表和索引路径": "Actualizar la lista de timbres e índice de rutas", diff --git a/i18n/ja_JP.json b/i18n/ja_JP.json index e08393fd3..cb36c5ba1 100644 --- a/i18n/ja_JP.json +++ b/i18n/ja_JP.json @@ -7,7 +7,7 @@ "step3a:正在训练模型": "step3a:トレーニング中のモデル", "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "トレーニング終了時に、トレーニングログやフォルダ内のtrain.logを確認することができます", "全流程结束!": "全工程が完了!", - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录使用需遵守的协议-LICENSE.txt.": "本ソフトウェアはMITライセンスに基づくオープンソースであり、製作者は本ソフトウェアに対していかなる責任を持ちません。本ソフトウェアの利用者および本ソフトウェアから派生した音源(成果物)を配布する者は、本ソフトウェアに対して自身で責任を負うものとします。
この条項に同意しない場合、パッケージ内のコードやファイルを使用や参照を禁じます。詳しくは使用需遵守的协议-LICENSE.txtをご覧ください。", + "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "本ソフトウェアはMITライセンスに基づくオープンソースであり、製作者は本ソフトウェアに対していかなる責任を持ちません。本ソフトウェアの利用者および本ソフトウェアから派生した音源(成果物)を配布する者は、本ソフトウェアに対して自身で責任を負うものとします。
この条項に同意しない場合、パッケージ内のコードやファイルを使用や参照を禁じます。詳しくはLICENSEをご覧ください。", "模型推理": "モデル推論", "推理音色": "音源推論", "刷新音色列表和索引路径": "音源リストとインデックスパスの更新", diff --git a/i18n/zh_CN.json b/i18n/zh_CN.json index 26ed4ec3a..ad4e79033 100644 --- a/i18n/zh_CN.json +++ b/i18n/zh_CN.json @@ -7,7 +7,7 @@ "step3a:正在训练模型": "step3a:正在训练模型", "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log", "全流程结束!": "全流程结束!", - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录使用需遵守的协议-LICENSE.txt.": "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录使用需遵守的协议-LICENSE.txt.", + "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.", "模型推理": "模型推理", "推理音色": "推理音色", "刷新音色列表和索引路径": "刷新音色列表和索引路径", diff --git a/i18n/zh_HK.json b/i18n/zh_HK.json index 820e888cc..ed365354f 100644 --- a/i18n/zh_HK.json +++ b/i18n/zh_HK.json @@ -7,7 +7,7 @@ "step3a:正在训练模型": "step3a:正在训练模型", "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log", "全流程结束!": "全流程结束!", - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录使用需遵守的协议-LICENSE.txt.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。
如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄使用需遵守的協議-LICENSE.txt。", + "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。
如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄使用需遵守的協議-LICENSE.txt。", "模型推理": "模型推理", "推理音色": "推理音色", "刷新音色列表和索引路径": "刷新音色列表和索引路徑", diff --git a/i18n/zh_SG.json b/i18n/zh_SG.json index 820e888cc..ed365354f 100644 --- a/i18n/zh_SG.json +++ b/i18n/zh_SG.json @@ -7,7 +7,7 @@ "step3a:正在训练模型": "step3a:正在训练模型", "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log", "全流程结束!": "全流程结束!", - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录使用需遵守的协议-LICENSE.txt.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。
如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄使用需遵守的協議-LICENSE.txt。", + "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。
如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄使用需遵守的協議-LICENSE.txt。", "模型推理": "模型推理", "推理音色": "推理音色", "刷新音色列表和索引路径": "刷新音色列表和索引路徑", diff --git a/i18n/zh_TW.json b/i18n/zh_TW.json index 820e888cc..ed365354f 100644 --- a/i18n/zh_TW.json +++ b/i18n/zh_TW.json @@ -7,7 +7,7 @@ "step3a:正在训练模型": "step3a:正在训练模型", "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log", "全流程结束!": "全流程结束!", - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录使用需遵守的协议-LICENSE.txt.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。
如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄使用需遵守的協議-LICENSE.txt。", + "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "本軟體以MIT協議開源,作者不對軟體具備任何控制力,使用軟體者、傳播軟體導出的聲音者自負全責。
如不認可該條款,則不能使用或引用軟體包內任何程式碼和檔案。詳見根目錄使用需遵守的協議-LICENSE.txt。", "模型推理": "模型推理", "推理音色": "推理音色", "刷新音色列表和索引路径": "刷新音色列表和索引路徑", diff --git a/infer-web.py b/infer-web.py index adc0ced23..ca80dbd76 100644 --- a/infer-web.py +++ b/infer-web.py @@ -25,15 +25,14 @@ from config import Config from fairseq import checkpoint_utils from i18n import I18nAuto -from infer_pack.models import ( +from lib.infer_pack.models import ( SynthesizerTrnMs256NSFsid, SynthesizerTrnMs256NSFsid_nono, SynthesizerTrnMs768NSFsid, SynthesizerTrnMs768NSFsid_nono, ) -from infer_pack.models_onnx import SynthesizerTrnMsNSFsidM +from lib.infer_pack.models_onnx import SynthesizerTrnMsNSFsidM from infer_uvr5 import _audio_pre_, _audio_pre_new -from MDXNet import MDXNetDereverb from my_utils import load_audio from train.process_ckpt import change_info, extract_small_model, merge, show_info from vc_infer_pipeline import VC @@ -44,7 +43,7 @@ tmp = os.path.join(now_dir, "TEMP") shutil.rmtree(tmp, ignore_errors=True) -shutil.rmtree("%s/runtime/Lib/site-packages/infer_pack" % (now_dir), ignore_errors=True) +shutil.rmtree("%s/runtime/Lib/site-packages/lib.infer_pack" % (now_dir), ignore_errors=True) shutil.rmtree("%s/runtime/Lib/site-packages/uvr5_pack" % (now_dir), ignore_errors=True) os.makedirs(tmp, exist_ok=True) os.makedirs(os.path.join(now_dir, "logs"), exist_ok=True) @@ -328,6 +327,7 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format save_root_ins.strip(" ").strip('"').strip("\n").strip('"').strip(" ") ) if model_name == "onnx_dereverb_By_FoxJoy": + from MDXNet import MDXNetDereverb pre_fun = MDXNetDereverb(15) else: func = _audio_pre_ if "DeEcho" not in model_name else _audio_pre_new @@ -1301,7 +1301,7 @@ def export_onnx(ModelPath, ExportedPath): with gr.Blocks() as app: gr.Markdown( value=i18n( - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录使用需遵守的协议-LICENSE.txt." + "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE." ) ) with gr.Tabs(): diff --git a/infer_batch_rvc.py b/infer_batch_rvc.py index 311fe912b..3635d5ec5 100644 --- a/infer_batch_rvc.py +++ b/infer_batch_rvc.py @@ -8,8 +8,6 @@ now_dir = os.getcwd() sys.path.append(now_dir) -import argparse -import glob import sys import torch import tqdm as tq @@ -112,7 +110,7 @@ def device_config(self) -> tuple: now_dir = os.getcwd() sys.path.append(now_dir) from vc_infer_pipeline import VC -from infer_pack.models import ( +from lib.infer_pack.models import ( SynthesizerTrnMs256NSFsid, SynthesizerTrnMs256NSFsid_nono, SynthesizerTrnMs768NSFsid, diff --git a/infer_uvr5.py b/infer_uvr5.py index 884c841dd..0ffdb5da0 100644 --- a/infer_uvr5.py +++ b/infer_uvr5.py @@ -10,12 +10,12 @@ import numpy as np import hashlib, math from tqdm import tqdm -from uvr5_pack.lib_v5 import spec_utils -from uvr5_pack.utils import _get_name_params, inference -from uvr5_pack.lib_v5.model_param_init import ModelParameters +from lib.uvr5_pack.lib_v5 import spec_utils +from lib.uvr5_pack.utils import _get_name_params, inference +from lib.uvr5_pack.lib_v5.model_param_init import ModelParameters import soundfile as sf -from uvr5_pack.lib_v5.nets_new import CascadedNet -from uvr5_pack.lib_v5 import nets_61968KB as nets +from lib.uvr5_pack.lib_v5.nets_new import CascadedNet +from lib.uvr5_pack.lib_v5 import nets_61968KB as nets class _audio_pre_: @@ -31,7 +31,7 @@ def __init__(self, agg, model_path, device, is_half): "agg": agg, "high_end_process": "mirroring", } - mp = ModelParameters("uvr5_pack/lib_v5/modelparams/4band_v2.json") + mp = ModelParameters("lib/uvr5_pack/lib_v5/modelparams/4band_v2.json") model = nets.CascadedASPPNet(mp.param["bins"] * 2) cpk = torch.load(model_path, map_location="cpu") model.load_state_dict(cpk) @@ -195,7 +195,7 @@ def __init__(self, agg, model_path, device, is_half): "agg": agg, "high_end_process": "mirroring", } - mp = ModelParameters("uvr5_pack/lib_v5/modelparams/4band_v3.json") + mp = ModelParameters("lib/uvr5_pack/lib_v5/modelparams/4band_v3.json") nout = 64 if "DeReverb" in model_path else 48 model = CascadedNet(mp.param["bins"] * 2, nout) cpk = torch.load(model_path, map_location="cpu") diff --git a/infer_pack/attentions.py b/lib/infer_pack/attentions.py similarity index 96% rename from infer_pack/attentions.py rename to lib/infer_pack/attentions.py index a5177ada7..84d5c8730 100644 --- a/infer_pack/attentions.py +++ b/lib/infer_pack/attentions.py @@ -5,9 +5,9 @@ from torch import nn from torch.nn import functional as F -from infer_pack import commons -from infer_pack import modules -from infer_pack.modules import LayerNorm +from lib.infer_pack import commons +from lib.infer_pack import modules +from lib.infer_pack.modules import LayerNorm class Encoder(nn.Module): diff --git a/infer_pack/commons.py b/lib/infer_pack/commons.py similarity index 100% rename from infer_pack/commons.py rename to lib/infer_pack/commons.py diff --git a/infer_pack/models.py b/lib/infer_pack/models.py similarity index 96% rename from infer_pack/models.py rename to lib/infer_pack/models.py index 724bd88e8..698fc8fba 100644 --- a/infer_pack/models.py +++ b/lib/infer_pack/models.py @@ -3,15 +3,15 @@ import torch from torch import nn from torch.nn import functional as F -from infer_pack import modules -from infer_pack import attentions -from infer_pack import commons -from infer_pack.commons import init_weights, get_padding +from lib.infer_pack import modules +from lib.infer_pack import attentions +from lib.infer_pack import commons +from lib.infer_pack.commons import init_weights, get_padding from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm -from infer_pack.commons import init_weights +from lib.infer_pack.commons import init_weights import numpy as np -from infer_pack import commons +from lib.infer_pack import commons class TextEncoder256(nn.Module): diff --git a/infer_pack/models_onnx.py b/lib/infer_pack/models_onnx.py similarity index 99% rename from infer_pack/models_onnx.py rename to lib/infer_pack/models_onnx.py index b0ed4a784..963e67b29 100644 --- a/infer_pack/models_onnx.py +++ b/lib/infer_pack/models_onnx.py @@ -3,15 +3,15 @@ import torch from torch import nn from torch.nn import functional as F -from infer_pack import modules -from infer_pack import attentions -from infer_pack import commons -from infer_pack.commons import init_weights, get_padding +from lib.infer_pack import modules +from lib.infer_pack import attentions +from lib.infer_pack import commons +from lib.infer_pack.commons import init_weights, get_padding from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm -from infer_pack.commons import init_weights +from lib.infer_pack.commons import init_weights import numpy as np -from infer_pack import commons +from lib.infer_pack import commons class TextEncoder256(nn.Module): diff --git a/infer_pack/modules.py b/lib/infer_pack/modules.py similarity index 95% rename from infer_pack/modules.py rename to lib/infer_pack/modules.py index 95e2ea4ee..b54dc4777 100644 --- a/infer_pack/modules.py +++ b/lib/infer_pack/modules.py @@ -9,9 +9,9 @@ from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d from torch.nn.utils import weight_norm, remove_weight_norm -from infer_pack import commons -from infer_pack.commons import init_weights, get_padding -from infer_pack.transforms import piecewise_rational_quadratic_transform +from lib.infer_pack import commons +from lib.infer_pack.commons import init_weights, get_padding +from lib.infer_pack.transforms import piecewise_rational_quadratic_transform LRELU_SLOPE = 0.1 diff --git a/infer_pack/modules/F0Predictor/DioF0Predictor.py b/lib/infer_pack/modules/F0Predictor/DioF0Predictor.py similarity index 95% rename from infer_pack/modules/F0Predictor/DioF0Predictor.py rename to lib/infer_pack/modules/F0Predictor/DioF0Predictor.py index ff1251209..b5a8e3e78 100644 --- a/infer_pack/modules/F0Predictor/DioF0Predictor.py +++ b/lib/infer_pack/modules/F0Predictor/DioF0Predictor.py @@ -1,4 +1,4 @@ -from infer_pack.modules.F0Predictor.F0Predictor import F0Predictor +from lib.infer_pack.modules.F0Predictor.F0Predictor import F0Predictor import pyworld import numpy as np diff --git a/infer_pack/modules/F0Predictor/F0Predictor.py b/lib/infer_pack/modules/F0Predictor/F0Predictor.py similarity index 100% rename from infer_pack/modules/F0Predictor/F0Predictor.py rename to lib/infer_pack/modules/F0Predictor/F0Predictor.py diff --git a/infer_pack/modules/F0Predictor/HarvestF0Predictor.py b/lib/infer_pack/modules/F0Predictor/HarvestF0Predictor.py similarity index 94% rename from infer_pack/modules/F0Predictor/HarvestF0Predictor.py rename to lib/infer_pack/modules/F0Predictor/HarvestF0Predictor.py index 17acb3d07..f8dae3040 100644 --- a/infer_pack/modules/F0Predictor/HarvestF0Predictor.py +++ b/lib/infer_pack/modules/F0Predictor/HarvestF0Predictor.py @@ -1,4 +1,4 @@ -from infer_pack.modules.F0Predictor.F0Predictor import F0Predictor +from lib.infer_pack.modules.F0Predictor.F0Predictor import F0Predictor import pyworld import numpy as np diff --git a/infer_pack/modules/F0Predictor/PMF0Predictor.py b/lib/infer_pack/modules/F0Predictor/PMF0Predictor.py similarity index 95% rename from infer_pack/modules/F0Predictor/PMF0Predictor.py rename to lib/infer_pack/modules/F0Predictor/PMF0Predictor.py index 5ee2c19b3..b70de29d0 100644 --- a/infer_pack/modules/F0Predictor/PMF0Predictor.py +++ b/lib/infer_pack/modules/F0Predictor/PMF0Predictor.py @@ -1,4 +1,4 @@ -from infer_pack.modules.F0Predictor.F0Predictor import F0Predictor +from lib.infer_pack.modules.F0Predictor.F0Predictor import F0Predictor import parselmouth import numpy as np diff --git a/infer_pack/modules/F0Predictor/__init__.py b/lib/infer_pack/modules/F0Predictor/__init__.py similarity index 100% rename from infer_pack/modules/F0Predictor/__init__.py rename to lib/infer_pack/modules/F0Predictor/__init__.py diff --git a/infer_pack/onnx_inference.py b/lib/infer_pack/onnx_inference.py similarity index 92% rename from infer_pack/onnx_inference.py rename to lib/infer_pack/onnx_inference.py index fb583a4f3..a59062736 100644 --- a/infer_pack/onnx_inference.py +++ b/lib/infer_pack/onnx_inference.py @@ -33,19 +33,19 @@ def forward(self, wav): def get_f0_predictor(f0_predictor, hop_length, sampling_rate, **kargs): if f0_predictor == "pm": - from infer_pack.modules.F0Predictor.PMF0Predictor import PMF0Predictor + from lib.infer_pack.modules.F0Predictor.PMF0Predictor import PMF0Predictor f0_predictor_object = PMF0Predictor( hop_length=hop_length, sampling_rate=sampling_rate ) elif f0_predictor == "harvest": - from infer_pack.modules.F0Predictor.HarvestF0Predictor import HarvestF0Predictor + from lib.infer_pack.modules.F0Predictor.HarvestF0Predictor import HarvestF0Predictor f0_predictor_object = HarvestF0Predictor( hop_length=hop_length, sampling_rate=sampling_rate ) elif f0_predictor == "dio": - from infer_pack.modules.F0Predictor.DioF0Predictor import DioF0Predictor + from lib.infer_pack.modules.F0Predictor.DioF0Predictor import DioF0Predictor f0_predictor_object = DioF0Predictor( hop_length=hop_length, sampling_rate=sampling_rate diff --git a/infer_pack/transforms.py b/lib/infer_pack/transforms.py similarity index 100% rename from infer_pack/transforms.py rename to lib/infer_pack/transforms.py diff --git a/uvr5_pack/lib_v5/dataset.py b/lib/uvr5_pack/lib_v5/dataset.py similarity index 99% rename from uvr5_pack/lib_v5/dataset.py rename to lib/uvr5_pack/lib_v5/dataset.py index ba0e45be1..cfd01a174 100644 --- a/uvr5_pack/lib_v5/dataset.py +++ b/lib/uvr5_pack/lib_v5/dataset.py @@ -6,7 +6,7 @@ import torch.utils.data from tqdm import tqdm -from uvr5_pack.lib_v5 import spec_utils +from . import spec_utils class VocalRemoverValidationSet(torch.utils.data.Dataset): diff --git a/uvr5_pack/lib_v5/layers.py b/lib/uvr5_pack/lib_v5/layers.py similarity index 98% rename from uvr5_pack/lib_v5/layers.py rename to lib/uvr5_pack/lib_v5/layers.py index 9835dc0f0..b82f06bb4 100644 --- a/uvr5_pack/lib_v5/layers.py +++ b/lib/uvr5_pack/lib_v5/layers.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import spec_utils +from . import spec_utils class Conv2DBNActiv(nn.Module): diff --git a/uvr5_pack/lib_v5/layers_123812KB .py b/lib/uvr5_pack/lib_v5/layers_123812KB .py similarity index 98% rename from uvr5_pack/lib_v5/layers_123812KB .py rename to lib/uvr5_pack/lib_v5/layers_123812KB .py index 9835dc0f0..b82f06bb4 100644 --- a/uvr5_pack/lib_v5/layers_123812KB .py +++ b/lib/uvr5_pack/lib_v5/layers_123812KB .py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import spec_utils +from . import spec_utils class Conv2DBNActiv(nn.Module): diff --git a/uvr5_pack/lib_v5/layers_123821KB.py b/lib/uvr5_pack/lib_v5/layers_123821KB.py similarity index 98% rename from uvr5_pack/lib_v5/layers_123821KB.py rename to lib/uvr5_pack/lib_v5/layers_123821KB.py index 9835dc0f0..b82f06bb4 100644 --- a/uvr5_pack/lib_v5/layers_123821KB.py +++ b/lib/uvr5_pack/lib_v5/layers_123821KB.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import spec_utils +from . import spec_utils class Conv2DBNActiv(nn.Module): diff --git a/uvr5_pack/lib_v5/layers_33966KB.py b/lib/uvr5_pack/lib_v5/layers_33966KB.py similarity index 99% rename from uvr5_pack/lib_v5/layers_33966KB.py rename to lib/uvr5_pack/lib_v5/layers_33966KB.py index 78e539250..a38b7bb3a 100644 --- a/uvr5_pack/lib_v5/layers_33966KB.py +++ b/lib/uvr5_pack/lib_v5/layers_33966KB.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import spec_utils +from . import spec_utils class Conv2DBNActiv(nn.Module): diff --git a/uvr5_pack/lib_v5/layers_537227KB.py b/lib/uvr5_pack/lib_v5/layers_537227KB.py similarity index 99% rename from uvr5_pack/lib_v5/layers_537227KB.py rename to lib/uvr5_pack/lib_v5/layers_537227KB.py index 78e539250..a38b7bb3a 100644 --- a/uvr5_pack/lib_v5/layers_537227KB.py +++ b/lib/uvr5_pack/lib_v5/layers_537227KB.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import spec_utils +from . import spec_utils class Conv2DBNActiv(nn.Module): diff --git a/uvr5_pack/lib_v5/layers_537238KB.py b/lib/uvr5_pack/lib_v5/layers_537238KB.py similarity index 99% rename from uvr5_pack/lib_v5/layers_537238KB.py rename to lib/uvr5_pack/lib_v5/layers_537238KB.py index 78e539250..a38b7bb3a 100644 --- a/uvr5_pack/lib_v5/layers_537238KB.py +++ b/lib/uvr5_pack/lib_v5/layers_537238KB.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import spec_utils +from . import spec_utils class Conv2DBNActiv(nn.Module): diff --git a/uvr5_pack/lib_v5/layers_new.py b/lib/uvr5_pack/lib_v5/layers_new.py similarity index 99% rename from uvr5_pack/lib_v5/layers_new.py rename to lib/uvr5_pack/lib_v5/layers_new.py index 2441f2dea..0c13e60b0 100644 --- a/uvr5_pack/lib_v5/layers_new.py +++ b/lib/uvr5_pack/lib_v5/layers_new.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import spec_utils +from . import spec_utils class Conv2DBNActiv(nn.Module): diff --git a/uvr5_pack/lib_v5/model_param_init.py b/lib/uvr5_pack/lib_v5/model_param_init.py similarity index 100% rename from uvr5_pack/lib_v5/model_param_init.py rename to lib/uvr5_pack/lib_v5/model_param_init.py diff --git a/uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json b/lib/uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json rename to lib/uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json diff --git a/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json b/lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json rename to lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json diff --git a/uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json b/lib/uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json rename to lib/uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json diff --git a/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json b/lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json rename to lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json diff --git a/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl256.json b/lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl256.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/1band_sr44100_hl256.json rename to lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl256.json diff --git a/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json b/lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json rename to lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json diff --git a/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512_cut.json b/lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512_cut.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512_cut.json rename to lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512_cut.json diff --git a/uvr5_pack/lib_v5/modelparams/2band_32000.json b/lib/uvr5_pack/lib_v5/modelparams/2band_32000.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/2band_32000.json rename to lib/uvr5_pack/lib_v5/modelparams/2band_32000.json diff --git a/uvr5_pack/lib_v5/modelparams/2band_44100_lofi.json b/lib/uvr5_pack/lib_v5/modelparams/2band_44100_lofi.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/2band_44100_lofi.json rename to lib/uvr5_pack/lib_v5/modelparams/2band_44100_lofi.json diff --git a/uvr5_pack/lib_v5/modelparams/2band_48000.json b/lib/uvr5_pack/lib_v5/modelparams/2band_48000.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/2band_48000.json rename to lib/uvr5_pack/lib_v5/modelparams/2band_48000.json diff --git a/uvr5_pack/lib_v5/modelparams/3band_44100.json b/lib/uvr5_pack/lib_v5/modelparams/3band_44100.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/3band_44100.json rename to lib/uvr5_pack/lib_v5/modelparams/3band_44100.json diff --git a/uvr5_pack/lib_v5/modelparams/3band_44100_mid.json b/lib/uvr5_pack/lib_v5/modelparams/3band_44100_mid.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/3band_44100_mid.json rename to lib/uvr5_pack/lib_v5/modelparams/3band_44100_mid.json diff --git a/uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json b/lib/uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json rename to lib/uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json diff --git a/uvr5_pack/lib_v5/modelparams/4band_44100.json b/lib/uvr5_pack/lib_v5/modelparams/4band_44100.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/4band_44100.json rename to lib/uvr5_pack/lib_v5/modelparams/4band_44100.json diff --git a/uvr5_pack/lib_v5/modelparams/4band_44100_mid.json b/lib/uvr5_pack/lib_v5/modelparams/4band_44100_mid.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/4band_44100_mid.json rename to lib/uvr5_pack/lib_v5/modelparams/4band_44100_mid.json diff --git a/uvr5_pack/lib_v5/modelparams/4band_44100_msb.json b/lib/uvr5_pack/lib_v5/modelparams/4band_44100_msb.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/4band_44100_msb.json rename to lib/uvr5_pack/lib_v5/modelparams/4band_44100_msb.json diff --git a/uvr5_pack/lib_v5/modelparams/4band_44100_msb2.json b/lib/uvr5_pack/lib_v5/modelparams/4band_44100_msb2.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/4band_44100_msb2.json rename to lib/uvr5_pack/lib_v5/modelparams/4band_44100_msb2.json diff --git a/uvr5_pack/lib_v5/modelparams/4band_44100_reverse.json b/lib/uvr5_pack/lib_v5/modelparams/4band_44100_reverse.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/4band_44100_reverse.json rename to lib/uvr5_pack/lib_v5/modelparams/4band_44100_reverse.json diff --git a/uvr5_pack/lib_v5/modelparams/4band_44100_sw.json b/lib/uvr5_pack/lib_v5/modelparams/4band_44100_sw.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/4band_44100_sw.json rename to lib/uvr5_pack/lib_v5/modelparams/4band_44100_sw.json diff --git a/uvr5_pack/lib_v5/modelparams/4band_v2.json b/lib/uvr5_pack/lib_v5/modelparams/4band_v2.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/4band_v2.json rename to lib/uvr5_pack/lib_v5/modelparams/4band_v2.json diff --git a/uvr5_pack/lib_v5/modelparams/4band_v2_sn.json b/lib/uvr5_pack/lib_v5/modelparams/4band_v2_sn.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/4band_v2_sn.json rename to lib/uvr5_pack/lib_v5/modelparams/4band_v2_sn.json diff --git a/uvr5_pack/lib_v5/modelparams/4band_v3.json b/lib/uvr5_pack/lib_v5/modelparams/4band_v3.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/4band_v3.json rename to lib/uvr5_pack/lib_v5/modelparams/4band_v3.json diff --git a/uvr5_pack/lib_v5/modelparams/ensemble.json b/lib/uvr5_pack/lib_v5/modelparams/ensemble.json similarity index 100% rename from uvr5_pack/lib_v5/modelparams/ensemble.json rename to lib/uvr5_pack/lib_v5/modelparams/ensemble.json diff --git a/uvr5_pack/lib_v5/nets.py b/lib/uvr5_pack/lib_v5/nets.py similarity index 98% rename from uvr5_pack/lib_v5/nets.py rename to lib/uvr5_pack/lib_v5/nets.py index d4c376ed8..db4c5e339 100644 --- a/uvr5_pack/lib_v5/nets.py +++ b/lib/uvr5_pack/lib_v5/nets.py @@ -2,8 +2,8 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import layers -from uvr5_pack.lib_v5 import spec_utils +import layers +from . import spec_utils class BaseASPPNet(nn.Module): diff --git a/uvr5_pack/lib_v5/nets_123812KB.py b/lib/uvr5_pack/lib_v5/nets_123812KB.py similarity index 98% rename from uvr5_pack/lib_v5/nets_123812KB.py rename to lib/uvr5_pack/lib_v5/nets_123812KB.py index ea6c45c96..becbfae85 100644 --- a/uvr5_pack/lib_v5/nets_123812KB.py +++ b/lib/uvr5_pack/lib_v5/nets_123812KB.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import layers_123821KB as layers +from . import layers_123821KB as layers class BaseASPPNet(nn.Module): diff --git a/uvr5_pack/lib_v5/nets_123821KB.py b/lib/uvr5_pack/lib_v5/nets_123821KB.py similarity index 98% rename from uvr5_pack/lib_v5/nets_123821KB.py rename to lib/uvr5_pack/lib_v5/nets_123821KB.py index ea6c45c96..becbfae85 100644 --- a/uvr5_pack/lib_v5/nets_123821KB.py +++ b/lib/uvr5_pack/lib_v5/nets_123821KB.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import layers_123821KB as layers +from . import layers_123821KB as layers class BaseASPPNet(nn.Module): diff --git a/uvr5_pack/lib_v5/nets_33966KB.py b/lib/uvr5_pack/lib_v5/nets_33966KB.py similarity index 98% rename from uvr5_pack/lib_v5/nets_33966KB.py rename to lib/uvr5_pack/lib_v5/nets_33966KB.py index d2bddb147..b8986f968 100644 --- a/uvr5_pack/lib_v5/nets_33966KB.py +++ b/lib/uvr5_pack/lib_v5/nets_33966KB.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import layers_33966KB as layers +from . import layers_33966KB as layers class BaseASPPNet(nn.Module): diff --git a/uvr5_pack/lib_v5/nets_537227KB.py b/lib/uvr5_pack/lib_v5/nets_537227KB.py similarity index 98% rename from uvr5_pack/lib_v5/nets_537227KB.py rename to lib/uvr5_pack/lib_v5/nets_537227KB.py index 1ceac4a47..a1bb530e0 100644 --- a/uvr5_pack/lib_v5/nets_537227KB.py +++ b/lib/uvr5_pack/lib_v5/nets_537227KB.py @@ -3,7 +3,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import layers_537238KB as layers +from . import layers_537238KB as layers class BaseASPPNet(nn.Module): diff --git a/uvr5_pack/lib_v5/nets_537238KB.py b/lib/uvr5_pack/lib_v5/nets_537238KB.py similarity index 98% rename from uvr5_pack/lib_v5/nets_537238KB.py rename to lib/uvr5_pack/lib_v5/nets_537238KB.py index 1ceac4a47..a1bb530e0 100644 --- a/uvr5_pack/lib_v5/nets_537238KB.py +++ b/lib/uvr5_pack/lib_v5/nets_537238KB.py @@ -3,7 +3,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import layers_537238KB as layers +from . import layers_537238KB as layers class BaseASPPNet(nn.Module): diff --git a/uvr5_pack/lib_v5/nets_61968KB.py b/lib/uvr5_pack/lib_v5/nets_61968KB.py similarity index 98% rename from uvr5_pack/lib_v5/nets_61968KB.py rename to lib/uvr5_pack/lib_v5/nets_61968KB.py index ea6c45c96..becbfae85 100644 --- a/uvr5_pack/lib_v5/nets_61968KB.py +++ b/lib/uvr5_pack/lib_v5/nets_61968KB.py @@ -2,7 +2,7 @@ from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import layers_123821KB as layers +from . import layers_123821KB as layers class BaseASPPNet(nn.Module): diff --git a/uvr5_pack/lib_v5/nets_new.py b/lib/uvr5_pack/lib_v5/nets_new.py similarity index 77% rename from uvr5_pack/lib_v5/nets_new.py rename to lib/uvr5_pack/lib_v5/nets_new.py index c9898f63e..bfaf72e48 100644 --- a/uvr5_pack/lib_v5/nets_new.py +++ b/lib/uvr5_pack/lib_v5/nets_new.py @@ -1,7 +1,7 @@ import torch from torch import nn import torch.nn.functional as F -from uvr5_pack.lib_v5 import layers_new as layers +from . import layers_new class BaseNet(nn.Module): @@ -9,19 +9,19 @@ def __init__( self, nin, nout, nin_lstm, nout_lstm, dilations=((4, 2), (8, 4), (12, 6)) ): super(BaseNet, self).__init__() - self.enc1 = layers.Conv2DBNActiv(nin, nout, 3, 1, 1) - self.enc2 = layers.Encoder(nout, nout * 2, 3, 2, 1) - self.enc3 = layers.Encoder(nout * 2, nout * 4, 3, 2, 1) - self.enc4 = layers.Encoder(nout * 4, nout * 6, 3, 2, 1) - self.enc5 = layers.Encoder(nout * 6, nout * 8, 3, 2, 1) + self.enc1 = layers_new.Conv2DBNActiv(nin, nout, 3, 1, 1) + self.enc2 = layers_new.Encoder(nout, nout * 2, 3, 2, 1) + self.enc3 = layers_new.Encoder(nout * 2, nout * 4, 3, 2, 1) + self.enc4 = layers_new.Encoder(nout * 4, nout * 6, 3, 2, 1) + self.enc5 = layers_new.Encoder(nout * 6, nout * 8, 3, 2, 1) - self.aspp = layers.ASPPModule(nout * 8, nout * 8, dilations, dropout=True) + self.aspp = layers_new.ASPPModule(nout * 8, nout * 8, dilations, dropout=True) - self.dec4 = layers.Decoder(nout * (6 + 8), nout * 6, 3, 1, 1) - self.dec3 = layers.Decoder(nout * (4 + 6), nout * 4, 3, 1, 1) - self.dec2 = layers.Decoder(nout * (2 + 4), nout * 2, 3, 1, 1) - self.lstm_dec2 = layers.LSTMModule(nout * 2, nin_lstm, nout_lstm) - self.dec1 = layers.Decoder(nout * (1 + 2) + 1, nout * 1, 3, 1, 1) + self.dec4 = layers_new.Decoder(nout * (6 + 8), nout * 6, 3, 1, 1) + self.dec3 = layers_new.Decoder(nout * (4 + 6), nout * 4, 3, 1, 1) + self.dec2 = layers_new.Decoder(nout * (2 + 4), nout * 2, 3, 1, 1) + self.lstm_dec2 = layers_new.LSTMModule(nout * 2, nin_lstm, nout_lstm) + self.dec1 = layers_new.Decoder(nout * (1 + 2) + 1, nout * 1, 3, 1, 1) def __call__(self, x): e1 = self.enc1(x) @@ -52,7 +52,7 @@ def __init__(self, n_fft, nout=32, nout_lstm=128): self.stg1_low_band_net = nn.Sequential( BaseNet(2, nout // 2, self.nin_lstm // 2, nout_lstm), - layers.Conv2DBNActiv(nout // 2, nout // 4, 1, 1, 0), + layers_new.Conv2DBNActiv(nout // 2, nout // 4, 1, 1, 0), ) self.stg1_high_band_net = BaseNet( @@ -61,7 +61,7 @@ def __init__(self, n_fft, nout=32, nout_lstm=128): self.stg2_low_band_net = nn.Sequential( BaseNet(nout // 4 + 2, nout, self.nin_lstm // 2, nout_lstm), - layers.Conv2DBNActiv(nout, nout // 2, 1, 1, 0), + layers_new.Conv2DBNActiv(nout, nout // 2, 1, 1, 0), ) self.stg2_high_band_net = BaseNet( nout // 4 + 2, nout // 2, self.nin_lstm // 2, nout_lstm // 2 diff --git a/uvr5_pack/lib_v5/spec_utils.py b/lib/uvr5_pack/lib_v5/spec_utils.py similarity index 100% rename from uvr5_pack/lib_v5/spec_utils.py rename to lib/uvr5_pack/lib_v5/spec_utils.py diff --git a/uvr5_pack/name_params.json b/lib/uvr5_pack/name_params.json similarity index 63% rename from uvr5_pack/name_params.json rename to lib/uvr5_pack/name_params.json index cb6609134..950adcf51 100644 --- a/uvr5_pack/name_params.json +++ b/lib/uvr5_pack/name_params.json @@ -4,92 +4,92 @@ "model_hash_name" : [ { "hash_name": "47939caf0cfe52a0e81442b85b971dfd", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json", "param_name": "4band_44100" }, { "hash_name": "4e4ecb9764c50a8c414fee6e10395bbe", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_v2.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2.json", "param_name": "4band_v2" }, { "hash_name": "ca106edd563e034bde0bdec4bb7a4b36", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_v2.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2.json", "param_name": "4band_v2" }, { "hash_name": "e60a1e84803ce4efc0a6551206cc4b71", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json", "param_name": "4band_44100" }, { "hash_name": "a82f14e75892e55e994376edbf0c8435", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json", "param_name": "4band_44100" }, { "hash_name": "6dd9eaa6f0420af9f1d403aaafa4cc06", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_v2_sn.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2_sn.json", "param_name": "4band_v2_sn" }, { "hash_name": "08611fb99bd59eaa79ad27c58d137727", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_v2_sn.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2_sn.json", "param_name": "4band_v2_sn" }, { "hash_name": "5c7bbca45a187e81abbbd351606164e5", - "model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json", "param_name": "3band_44100_msb2" }, { "hash_name": "d6b2cb685a058a091e5e7098192d3233", - "model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json", "param_name": "3band_44100_msb2" }, { "hash_name": "c1b9f38170a7c90e96f027992eb7c62b", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json", "param_name": "4band_44100" }, { "hash_name": "c3448ec923fa0edf3d03a19e633faa53", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json", "param_name": "4band_44100" }, { "hash_name": "68aa2c8093d0080704b200d140f59e54", - "model_params": "uvr5_pack/lib_v5/modelparams/3band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100.json", "param_name": "3band_44100" }, { "hash_name": "fdc83be5b798e4bd29fe00fe6600e147", - "model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_mid.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_mid.json", "param_name": "3band_44100_mid.json" }, { "hash_name": "2ce34bc92fd57f55db16b7a4def3d745", - "model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_mid.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_mid.json", "param_name": "3band_44100_mid.json" }, { "hash_name": "52fdca89576f06cf4340b74a4730ee5f", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json", "param_name": "4band_44100.json" }, { "hash_name": "41191165b05d38fc77f072fa9e8e8a30", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json", "param_name": "4band_44100.json" }, { "hash_name": "89e83b511ad474592689e562d5b1f80e", - "model_params": "uvr5_pack/lib_v5/modelparams/2band_32000.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_32000.json", "param_name": "2band_32000.json" }, { "hash_name": "0b954da81d453b716b114d6d7c95177f", - "model_params": "uvr5_pack/lib_v5/modelparams/2band_32000.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_32000.json", "param_name": "2band_32000.json" } @@ -97,47 +97,47 @@ "v4 Models": [ { "hash_name": "6a00461c51c2920fd68937d4609ed6c8", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json", "param_name": "1band_sr16000_hl512" }, { "hash_name": "0ab504864d20f1bd378fe9c81ef37140", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json", "param_name": "1band_sr32000_hl512" }, { "hash_name": "7dd21065bf91c10f7fccb57d7d83b07f", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json", "param_name": "1band_sr32000_hl512" }, { "hash_name": "80ab74d65e515caa3622728d2de07d23", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json", "param_name": "1band_sr32000_hl512" }, { "hash_name": "edc115e7fc523245062200c00caa847f", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json", "param_name": "1band_sr33075_hl384" }, { "hash_name": "28063e9f6ab5b341c5f6d3c67f2045b7", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json", "param_name": "1band_sr33075_hl384" }, { "hash_name": "b58090534c52cbc3e9b5104bad666ef2", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json", "param_name": "1band_sr44100_hl512" }, { "hash_name": "0cdab9947f1b0928705f518f3c78ea8f", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json", "param_name": "1band_sr44100_hl512" }, { "hash_name": "ae702fed0238afb5346db8356fe25f13", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json", "param_name": "1band_sr44100_hl1024" } ] @@ -148,113 +148,113 @@ "1 Band": [ { "hash_name": "1band_sr16000_hl512", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr16000_hl512.json", "param_name": "1band_sr16000_hl512" }, { "hash_name": "1band_sr32000_hl512", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr32000_hl512.json", "param_name": "1band_sr16000_hl512" }, { "hash_name": "1band_sr33075_hl384", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr33075_hl384.json", "param_name": "1band_sr33075_hl384" }, { "hash_name": "1band_sr44100_hl256", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl256.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl256.json", "param_name": "1band_sr44100_hl256" }, { "hash_name": "1band_sr44100_hl512", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl512.json", "param_name": "1band_sr44100_hl512" }, { "hash_name": "1band_sr44100_hl1024", - "model_params": "uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/1band_sr44100_hl1024.json", "param_name": "1band_sr44100_hl1024" } ], "2 Band": [ { "hash_name": "2band_44100_lofi", - "model_params": "uvr5_pack/lib_v5/modelparams/2band_44100_lofi.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_44100_lofi.json", "param_name": "2band_44100_lofi" }, { "hash_name": "2band_32000", - "model_params": "uvr5_pack/lib_v5/modelparams/2band_32000.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_32000.json", "param_name": "2band_32000" }, { "hash_name": "2band_48000", - "model_params": "uvr5_pack/lib_v5/modelparams/2band_48000.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/2band_48000.json", "param_name": "2band_48000" } ], "3 Band": [ { "hash_name": "3band_44100", - "model_params": "uvr5_pack/lib_v5/modelparams/3band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100.json", "param_name": "3band_44100" }, { "hash_name": "3band_44100_mid", - "model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_mid.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_mid.json", "param_name": "3band_44100_mid" }, { "hash_name": "3band_44100_msb2", - "model_params": "uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/3band_44100_msb2.json", "param_name": "3band_44100_msb2" } ], "4 Band": [ { "hash_name": "4band_44100", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100.json", "param_name": "4band_44100" }, { "hash_name": "4band_44100_mid", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_mid.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_mid.json", "param_name": "4band_44100_mid" }, { "hash_name": "4band_44100_msb", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_msb.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_msb.json", "param_name": "4band_44100_msb" }, { "hash_name": "4band_44100_msb2", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_msb2.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_msb2.json", "param_name": "4band_44100_msb2" }, { "hash_name": "4band_44100_reverse", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_reverse.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_reverse.json", "param_name": "4band_44100_reverse" }, { "hash_name": "4band_44100_sw", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_44100_sw.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_44100_sw.json", "param_name": "4band_44100_sw" }, { "hash_name": "4band_v2", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_v2.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2.json", "param_name": "4band_v2" }, { "hash_name": "4band_v2_sn", - "model_params": "uvr5_pack/lib_v5/modelparams/4band_v2_sn.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/4band_v2_sn.json", "param_name": "4band_v2_sn" }, { "hash_name": "tmodelparam", - "model_params": "uvr5_pack/lib_v5/modelparams/tmodelparam.json", + "model_params": "lib/uvr5_pack/lib_v5/modelparams/tmodelparam.json", "param_name": "User Model Param Set" } ] diff --git a/uvr5_pack/utils.py b/lib/uvr5_pack/utils.py similarity index 97% rename from uvr5_pack/utils.py rename to lib/uvr5_pack/utils.py index 1d91f9633..0fafe8793 100644 --- a/uvr5_pack/utils.py +++ b/lib/uvr5_pack/utils.py @@ -4,7 +4,7 @@ import json -def load_data(file_name: str = "./uvr5_pack/name_params.json") -> dict: +def load_data(file_name: str = "./lib/uvr5_pack/name_params.json") -> dict: with open(file_name, "r") as f: data = json.load(f) diff --git a/requirements.txt b/requirements.txt index 38252d713..cd92631e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -39,5 +39,5 @@ uvicorn>=0.21.1 colorama>=0.4.5 pyworld>=0.3.2 httpx==0.23.0 -onnxruntime-gpu +#onnxruntime-gpu torchcrepe==0.0.20 diff --git a/envfilescheck.bat b/tools/dlmodels.bat similarity index 99% rename from envfilescheck.bat rename to tools/dlmodels.bat index 547f2aef8..7130cbd6f 100644 --- a/envfilescheck.bat +++ b/tools/dlmodels.bat @@ -1,5 +1,7 @@ @echo off && chcp 65001 +cd .. + echo working dir is %cd% echo downloading requirement aria2 check. echo= diff --git a/export_onnx.py b/tools/export_onnx.py similarity index 94% rename from export_onnx.py rename to tools/export_onnx.py index 34938fe56..2d334a6fa 100644 --- a/export_onnx.py +++ b/tools/export_onnx.py @@ -1,4 +1,4 @@ -from infer_pack.models_onnx import SynthesizerTrnMsNSFsidM +from lib.infer_pack.models_onnx import SynthesizerTrnMsNSFsidM import torch if __name__ == "__main__": diff --git a/infer/infer-pm-index256.py b/tools/infer/infer-pm-index256.py similarity index 93% rename from infer/infer-pm-index256.py rename to tools/infer/infer-pm-index256.py index 506034585..d182e20a8 100644 --- a/infer/infer-pm-index256.py +++ b/tools/infer/infer-pm-index256.py @@ -9,12 +9,12 @@ import soundfile as sf # from models import SynthesizerTrn256#hifigan_nonsf -# from infer_pack.models import SynthesizerTrn256NSF as SynthesizerTrn256#hifigan_nsf -from infer_pack.models import ( +# from lib.infer_pack.models import SynthesizerTrn256NSF as SynthesizerTrn256#hifigan_nsf +from lib.infer_pack.models import ( SynthesizerTrnMs256NSFsid as SynthesizerTrn256, ) # hifigan_nsf -# from infer_pack.models import SynthesizerTrnMs256NSFsid_sim as SynthesizerTrn256#hifigan_nsf +# from lib.infer_pack.models import SynthesizerTrnMs256NSFsid_sim as SynthesizerTrn256#hifigan_nsf # from models import SynthesizerTrn256NSFsim as SynthesizerTrn256#hifigan_nsf # from models import SynthesizerTrn256NSFsimFlow as SynthesizerTrn256#hifigan_nsf diff --git a/infer/train-index -v2.py b/tools/infer/train-index-v2.py similarity index 100% rename from infer/train-index -v2.py rename to tools/infer/train-index-v2.py diff --git a/infer/train-index.py b/tools/infer/train-index.py similarity index 100% rename from infer/train-index.py rename to tools/infer/train-index.py diff --git a/infer/trans_weights.py b/tools/infer/trans_weights.py similarity index 100% rename from infer/trans_weights.py rename to tools/infer/trans_weights.py diff --git a/onnx_inference_demo.py b/tools/onnx_inference_demo.py similarity index 90% rename from onnx_inference_demo.py rename to tools/onnx_inference_demo.py index 38bc882aa..a4a949004 100644 --- a/onnx_inference_demo.py +++ b/tools/onnx_inference_demo.py @@ -1,5 +1,5 @@ import soundfile -from infer_pack.onnx_inference import OnnxRVC +from ..lib.infer_pack.onnx_inference import OnnxRVC hop_size = 512 sampling_rate = 40000 # 采样率 diff --git a/train_nsf_sim_cache_sid_load_pretrain.py b/train_nsf_sim_cache_sid_load_pretrain.py index 2949bc478..3394bdd81 100644 --- a/train_nsf_sim_cache_sid_load_pretrain.py +++ b/train_nsf_sim_cache_sid_load_pretrain.py @@ -22,7 +22,7 @@ import torch.distributed as dist from torch.nn.parallel import DistributedDataParallel as DDP from torch.cuda.amp import autocast, GradScaler -from infer_pack import commons +from lib.infer_pack import commons from time import sleep from time import time as ttime from data_utils import ( @@ -34,13 +34,13 @@ ) if hps.version == "v1": - from infer_pack.models import ( + from lib.infer_pack.models import ( SynthesizerTrnMs256NSFsid as RVC_Model_f0, SynthesizerTrnMs256NSFsid_nono as RVC_Model_nof0, MultiPeriodDiscriminator, ) else: - from infer_pack.models import ( + from lib.infer_pack.models import ( SynthesizerTrnMs768NSFsid as RVC_Model_f0, SynthesizerTrnMs768NSFsid_nono as RVC_Model_nof0, MultiPeriodDiscriminatorV2 as MultiPeriodDiscriminator, diff --git a/trainset_preprocess_pipeline_print.py b/trainset_preprocess_pipeline_print.py index 6188c866e..0b7936583 100644 --- a/trainset_preprocess_pipeline_print.py +++ b/trainset_preprocess_pipeline_print.py @@ -40,7 +40,7 @@ def __init__(self, sr, exp_dir): ) self.sr = sr self.bh, self.ah = signal.butter(N=5, Wn=48, btype="high", fs=self.sr) - self.per = 3.7 + self.per = 3.0 self.overlap = 0.3 self.tail = self.per + self.overlap self.max = 0.9 diff --git a/venv.sh b/venv.sh new file mode 100755 index 000000000..17f58bf2a --- /dev/null +++ b/venv.sh @@ -0,0 +1 @@ +python3 -m venv .venv diff --git "a/\344\275\277\347\224\250\351\234\200\351\201\265\345\256\210\347\232\204\345\215\217\350\256\256-LICENSE.txt" "b/\344\275\277\347\224\250\351\234\200\351\201\265\345\256\210\347\232\204\345\215\217\350\256\256-LICENSE.txt" deleted file mode 100644 index db2094be6..000000000 --- "a/\344\275\277\347\224\250\351\234\200\351\201\265\345\256\210\347\232\204\345\215\217\350\256\256-LICENSE.txt" +++ /dev/null @@ -1,50 +0,0 @@ -MIT License - -Copyright (c) 2023 liujing04 -Copyright (c) 2023 源文雨 - - 本软件及其相关代码以MIT协议开源,作者不对软件具备任何控制力,使用软件者、传播软件导出的声音者自负全责。 - 如不认可该条款,则不能使用或引用软件包内任何代码和文件。 - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -特此授予任何获得本软件和相关文档文件(以下简称“软件”)副本的人免费使用、复制、修改、合并、出版、分发、再授权和/或销售本软件的权利,以及授予本软件所提供的人使用本软件的权利,但须符合以下条件: -上述版权声明和本许可声明应包含在软件的所有副本或实质部分中。 -软件是“按原样”提供的,没有任何明示或暗示的保证,包括但不限于适销性、适用于特定目的和不侵权的保证。在任何情况下,作者或版权持有人均不承担因软件或软件的使用或其他交易而产生、产生或与之相关的任何索赔、损害赔偿或其他责任,无论是在合同诉讼、侵权诉讼还是其他诉讼中。 - -相关引用库协议如下: -################# -ContentVec -https://github.com/auspicious3000/contentvec/blob/main/LICENSE -MIT License -################# -VITS -https://github.com/jaywalnut310/vits/blob/main/LICENSE -MIT License -################# -HIFIGAN -https://github.com/jik876/hifi-gan/blob/master/LICENSE -MIT License -################# -gradio -https://github.com/gradio-app/gradio/blob/main/LICENSE -Apache License 2.0 -################# -ffmpeg -https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv3 -https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2021-02-28-12-32/ffmpeg-n4.3.2-160-gfbb9368226-win64-lgpl-4.3.zip -LPGLv3 License -MIT License -################# -ultimatevocalremovergui -https://github.com/Anjok07/ultimatevocalremovergui/blob/master/LICENSE -https://github.com/yang123qwe/vocal_separation_by_uvr5 -MIT License -################# -audio-slicer -https://github.com/openvpi/audio-slicer/blob/main/LICENSE -MIT License