mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-04-30 22:52:11 +08:00
Fix Non-functional Project: Add Multi-source Pretrained Model and UVR5 Download, Enable , Colab Compatibility, and FastAPI Optimization (#2300)
* Replace the outdated link and pin dependencies * Update Colab * Add Docs * . * Update Install.sh, Support multi download source * . * modified path * Add source * Update URL * fix bugs * fix bug * fix bugs * Fix colab * update colab * Update Docs * update links
This commit is contained in:
parent
c0b46314ca
commit
b43ae64a1e
14
README.md
14
README.md
@ -64,7 +64,7 @@ If you are a Windows user (tested with win>=10), you can [download the integrate
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
bash install.sh
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### macOS
|
||||
@ -72,14 +72,12 @@ bash install.sh
|
||||
**Note: The models trained with GPUs on Macs result in significantly lower quality compared to those trained on other devices, so we are temporarily using CPUs instead.**
|
||||
|
||||
1. Install Xcode command-line tools by running `xcode-select --install`.
|
||||
2. Install FFmpeg by running `brew install ffmpeg`.
|
||||
3. Install the program by running the following commands:
|
||||
2. Install the program by running the following commands:
|
||||
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
pip install -r extra-req.txt --no-deps
|
||||
pip install -r requirements.txt
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### Install Manually
|
||||
@ -146,13 +144,13 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker
|
||||
|
||||
## Pretrained Models
|
||||
|
||||
**If `install.sh` runs successfully, you may skip No.1.**
|
||||
**If `install.sh` runs successfully, you may skip No.1,2,3**
|
||||
|
||||
**Users in China can [download all these models here](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e/dkxgpiy9zb96hob4#nVNhX).**
|
||||
|
||||
1. Download pretrained models from [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) and place them in `GPT_SoVITS/pretrained_models`.
|
||||
|
||||
2. Download G2PW models from [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip), unzip and rename to `G2PWModel`, and then place them in `GPT_SoVITS/text`.(Chinese TTS Only)
|
||||
2. Download G2PW models from [G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip), unzip and rename to `G2PWModel`, and then place them in `GPT_SoVITS/text`.(Chinese TTS Only)
|
||||
|
||||
3. For UVR5 (Vocals/Accompaniment Separation & Reverberation Removal, additionally), download models from [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) and place them in `tools/uvr5/uvr5_weights`.
|
||||
|
||||
@ -262,7 +260,7 @@ Use v2 from v1 environment:
|
||||
|
||||
3. Download v2 pretrained models from [huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main/gsv-v2final-pretrained) and put them into `GPT_SoVITS\pretrained_models\gsv-v2final-pretrained`.
|
||||
|
||||
Chinese v2 additional: [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip)(Download G2PW models, unzip and rename to `G2PWModel`, and then place them in `GPT_SoVITS/text`.)
|
||||
Chinese v2 additional: [G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip)(Download G2PW models, unzip and rename to `G2PWModel`, and then place them in `GPT_SoVITS/text`.)
|
||||
|
||||
## V3 Release Notes
|
||||
|
||||
|
@ -16,42 +16,66 @@
|
||||
"id": "_o6a8GS2lWQM"
|
||||
},
|
||||
"source": [
|
||||
"环境配置 environment"
|
||||
"# Env Setup (Run Once Only)\n",
|
||||
"# 环境配置, 只需运行一次"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 1."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "e9b7iFV3dm1f"
|
||||
},
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install -q condacolab\n",
|
||||
"# Setting up condacolab and installing packages\n",
|
||||
"%%writefile /content/setup.sh\n",
|
||||
"set -e\n",
|
||||
"cd /content\n",
|
||||
"rm -rf GPT-SoVITS\n",
|
||||
"git clone https://github.com/RVC-Boss/GPT-SoVITS.git\n",
|
||||
"cd GPT-SoVITS\n",
|
||||
"\n",
|
||||
"if conda env list | awk '{print $1}' | grep -Fxq \"GPTSoVITS\"; then\n",
|
||||
" :\n",
|
||||
"else\n",
|
||||
" conda create -n GPTSoVITS python=3.10 -y\n",
|
||||
"fi\n",
|
||||
"\n",
|
||||
"source activate GPTSoVITS\n",
|
||||
"\n",
|
||||
"bash install.sh --source HF --download-uvr5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 2."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install -q condacolab\n",
|
||||
"import condacolab\n",
|
||||
"condacolab.install_from_url(\"https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh\")\n",
|
||||
"\n",
|
||||
"%cd -q /content\n",
|
||||
"!git clone https://github.com/RVC-Boss/GPT-SoVITS\n",
|
||||
"%cd -q GPT-SoVITS\n",
|
||||
"!bash install.sh"
|
||||
"!cd /content && bash setup.sh"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "0NgxXg5sjv7z"
|
||||
},
|
||||
"outputs": [],
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# @title UVR5 Pretrained Models\n",
|
||||
"!wget https://www.modelscope.cn/models/XXXXRT/UVR5Weights4GSV/resolve/master/uvr5_weights.zip\n",
|
||||
"!unzip uvr5_weights.zip\n",
|
||||
"!rm -rf uvr5_weights.zip\n",
|
||||
"!mv uvr5_weights/* tools/uvr5/uvr5_weights\n",
|
||||
"!rm -rf uvr5_weights"
|
||||
"# Launch WebUI\n",
|
||||
"# 启动 WebUI"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -62,11 +86,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# @title launch WebUI 启动WebUI\n",
|
||||
"!/usr/local/bin/pip install ipykernel\n",
|
||||
"!sed -i '10s/False/True/' /content/GPT-SoVITS/config.py\n",
|
||||
"%cd /content/GPT-SoVITS/\n",
|
||||
"!/usr/local/bin/python webui.py"
|
||||
"!cd /content/GPT-SoVITS && source activate GPTSoVITS && export is_share=True && python webui.py"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -64,7 +64,7 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
bash install.sh
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### macOS
|
||||
@ -72,14 +72,12 @@ bash install.sh
|
||||
**注: 在 Mac 上使用 GPU 训练的模型效果显著低于其他设备训练的模型, 所以我们暂时使用 CPU 进行训练.**
|
||||
|
||||
1. 运行 `xcode-select --install` 安装 Xcode command-line tools.
|
||||
2. 运行 `brew install ffmpeg` 安装 FFmpeg.
|
||||
3. 完成上述步骤后, 运行以下的命令来安装本项目:
|
||||
2. 运行以下的命令来安装本项目:
|
||||
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
pip install -r extra-req.txt --no-deps
|
||||
pip install -r requirements.txt
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### 手动安装
|
||||
@ -148,13 +146,13 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker
|
||||
|
||||
## 预训练模型
|
||||
|
||||
**若成功运行`install.sh`可跳过 No.1**
|
||||
**若成功运行`install.sh`可跳过 No.1,2,3**
|
||||
|
||||
**中国地区的用户可以[在此处下载这些模型](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e/dkxgpiy9zb96hob4#nVNhX).**
|
||||
|
||||
1. 从 [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) 下载预训练模型, 并将其放置在 `GPT_SoVITS/pretrained_models` 目录中.
|
||||
|
||||
2. 从 [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) 下载模型, 解压并重命名为 `G2PWModel`, 然后将其放置在 `GPT_SoVITS/text` 目录中. (仅限中文 TTS)
|
||||
2. 从 [G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip) 下载模型, 解压并重命名为 `G2PWModel`, 然后将其放置在 `GPT_SoVITS/text` 目录中. (仅限中文 TTS)
|
||||
|
||||
3. 对于 UVR5 (人声/伴奏分离和混响移除, 额外功能), 从 [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) 下载模型, 并将其放置在 `tools/uvr5/uvr5_weights` 目录中.
|
||||
|
||||
@ -264,7 +262,7 @@ python webui.py
|
||||
|
||||
3. 需要从[huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main/gsv-v2final-pretrained) 下载预训练模型文件放到 GPT_SoVITS\pretrained_models\gsv-v2final-pretrained 下
|
||||
|
||||
中文额外需要下载[G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) (下载 G2PW 模型,解压并重命名为`G2PWModel`,将其放到`GPT_SoVITS/text`目录下)
|
||||
中文额外需要下载[G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip) (下载 G2PW 模型,解压并重命名为`G2PWModel`,将其放到`GPT_SoVITS/text`目录下)
|
||||
|
||||
## V3 更新说明
|
||||
|
||||
|
@ -58,7 +58,7 @@ Windows ユーザー: (Windows 10 以降でテスト済み)、[統合パッケ
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
bash install.sh
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### macOS
|
||||
@ -66,14 +66,12 @@ bash install.sh
|
||||
**注: Mac で GPU を使用して訓練されたモデルは、他のデバイスで訓練されたモデルと比較して著しく品質が低下するため、当面は CPU を使用して訓練することを強く推奨します.**
|
||||
|
||||
1. `xcode-select --install` を実行して、Xcode コマンドラインツールをインストールします.
|
||||
2. `brew install ffmpeg` を実行して FFmpeg をインストールします.
|
||||
3. 上記の手順を完了した後、以下のコマンドを実行してこのプロジェクトをインストールします.
|
||||
2. 以下のコマンドを実行してこのプロジェクトをインストールします.
|
||||
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
pip install -r extra-req.txt --no-deps
|
||||
pip install -r requirements.txt
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### 手動インストール
|
||||
@ -140,11 +138,11 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker
|
||||
|
||||
## 事前訓練済みモデル
|
||||
|
||||
**`install.sh`が正常に実行された場合、No.1はスキップしてかまいません.**
|
||||
**`install.sh`が正常に実行された場合、No.1,2,3 はスキップしてかまいません.**
|
||||
|
||||
1. [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) から事前訓練済みモデルをダウンロードし、`GPT_SoVITS/pretrained_models` ディレクトリに配置してください.
|
||||
|
||||
2. [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) からモデルをダウンロードし、解凍して `G2PWModel` にリネームし、`GPT_SoVITS/text` ディレクトリに配置してください. (中国語 TTS のみ)
|
||||
2. [G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip) からモデルをダウンロードし、解凍して `G2PWModel` にリネームし、`GPT_SoVITS/text` ディレクトリに配置してください. (中国語 TTS のみ)
|
||||
|
||||
3. UVR5 (ボーカル/伴奏 (BGM 等) 分離 & リバーブ除去の追加機能) の場合は、[UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) からモデルをダウンロードし、`tools/uvr5/uvr5_weights` ディレクトリに配置してください.
|
||||
|
||||
@ -252,7 +250,7 @@ V1 環境から V2 を使用するには:
|
||||
|
||||
3. [huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main/gsv-v2final-pretrained)から V2 の事前学習モデルをダウンロードし、それらを`GPT_SoVITS\pretrained_models\gsv-v2final-pretrained`に配置
|
||||
|
||||
中国語 V2 追加: [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) (G2PW モデルをダウンロードし、解凍して`G2PWModel`にリネームし、`GPT_SoVITS/text`に配置します)
|
||||
中国語 V2 追加: [G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip) (G2PW モデルをダウンロードし、解凍して`G2PWModel`にリネームし、`GPT_SoVITS/text`に配置します)
|
||||
|
||||
## V3 リリースノート
|
||||
|
||||
|
@ -58,7 +58,7 @@ Windows 사용자라면 (win>=10에서 테스트됨), [통합 패키지를 다
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
bash install.sh
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### macOS
|
||||
@ -66,14 +66,12 @@ bash install.sh
|
||||
**주의: Mac에서 GPU로 훈련된 모델은 다른 OS에서 훈련된 모델에 비해 품질이 낮습니다. 해당 문제를 해결하기 전까지 MacOS에선 CPU를 사용하여 훈련을 진행합니다.**
|
||||
|
||||
1. `xcode-select --install`을 실행하여 Xcode 커맨드라인 도구를 설치하세요.
|
||||
2. `brew install ffmpeg` 명령어를 실행하여 FFmpeg를 설치합니다.
|
||||
3. 위의 단계를 완료한 후, 다음 명령어를 실행하여 이 프로젝트를 설치하세요.
|
||||
2. 다음 명령어를 실행하여 이 프로젝트를 설치하세요.
|
||||
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
pip install -r extra-req.txt --no-deps
|
||||
pip install -r requirements.txt
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### 수동 설치
|
||||
@ -145,11 +143,11 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker
|
||||
|
||||
## 사전 학습된 모델
|
||||
|
||||
**`install.sh`가 성공적으로 실행되면 No.1은 건너뛰어도 됩니다.**
|
||||
**`install.sh`가 성공적으로 실행되면 No.1,2,3 은 건너뛰어도 됩니다.**
|
||||
|
||||
1. [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) 에서 사전 학습된 모델을 다운로드하고, `GPT_SoVITS/pretrained_models` 디렉토리에 배치하세요.
|
||||
|
||||
2. [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) 에서 모델을 다운로드하고 압축을 풀어 `G2PWModel`로 이름을 변경한 후, `GPT_SoVITS/text` 디렉토리에 배치하세요. (중국어 TTS 전용)
|
||||
2. [G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip) 에서 모델을 다운로드하고 압축을 풀어 `G2PWModel`로 이름을 변경한 후, `GPT_SoVITS/text` 디렉토리에 배치하세요. (중국어 TTS 전용)
|
||||
|
||||
3. UVR5 (보컬/반주 분리 & 잔향 제거 추가 기능)의 경우, [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) 에서 모델을 다운로드하고 `tools/uvr5/uvr5_weights` 디렉토리에 배치하세요.
|
||||
|
||||
@ -257,7 +255,7 @@ V1 환경에서 V2를 사용하려면:
|
||||
|
||||
3. [huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main/gsv-v2final-pretrained)에서 V2 사전 학습 모델을 다운로드하여 `GPT_SoVITS\pretrained_models\gsv-v2final-pretrained`에 넣으십시오.
|
||||
|
||||
중국어 V2 추가: [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) (G2PW 모델을 다운로드하여 압축을 풀고 `G2PWModel`로 이름을 변경한 다음 `GPT_SoVITS/text`에 배치합니다.)
|
||||
중국어 V2 추가: [G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip) (G2PW 모델을 다운로드하여 압축을 풀고 `G2PWModel`로 이름을 변경한 다음 `GPT_SoVITS/text`에 배치합니다.)
|
||||
|
||||
## V3 릴리스 노트
|
||||
|
||||
|
@ -60,7 +60,7 @@ Eğer bir Windows kullanıcısıysanız (win>=10 ile test edilmiştir), [entegre
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
bash install.sh
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### macOS
|
||||
@ -68,14 +68,12 @@ bash install.sh
|
||||
**Not: Mac'lerde GPU'larla eğitilen modeller, diğer cihazlarda eğitilenlere göre önemli ölçüde daha düşük kalitede sonuç verir, bu nedenle geçici olarak CPU'lar kullanıyoruz.**
|
||||
|
||||
1. `xcode-select --install` komutunu çalıştırarak Xcode komut satırı araçlarını yükleyin.
|
||||
2. FFmpeg'i yüklemek için `brew install ffmpeg` komutunu çalıştırın.
|
||||
3. Aşağıdaki komutları çalıştırarak programı yükleyin:
|
||||
2. Aşağıdaki komutları çalıştırarak programı yükleyin:
|
||||
|
||||
```bash
|
||||
conda create -n GPTSoVits python=3.9
|
||||
conda activate GPTSoVits
|
||||
pip install -r extra-req.txt --no-deps
|
||||
pip install -r requirements.txt
|
||||
bash install.sh --source <HF|HF-Mirror|ModelScope> [--download-uvr5]
|
||||
```
|
||||
|
||||
### El ile Yükleme
|
||||
@ -140,11 +138,11 @@ docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-Docker
|
||||
|
||||
## Önceden Eğitilmiş Modeller
|
||||
|
||||
**Eğer `install.sh` başarıyla çalıştırılırsa, No.1 adımını atlayabilirsiniz.**
|
||||
**Eğer `install.sh` başarıyla çalıştırılırsa, No.1,2,3 adımını atlayabilirsiniz.**
|
||||
|
||||
1. [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) üzerinden önceden eğitilmiş modelleri indirip `GPT_SoVITS/pretrained_models` dizinine yerleştirin.
|
||||
|
||||
2. [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) üzerinden modeli indirip sıkıştırmayı açın ve `G2PWModel` olarak yeniden adlandırın, ardından `GPT_SoVITS/text` dizinine yerleştirin. (Sadece Çince TTS için)
|
||||
2. [G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip) üzerinden modeli indirip sıkıştırmayı açın ve `G2PWModel` olarak yeniden adlandırın, ardından `GPT_SoVITS/text` dizinine yerleştirin. (Sadece Çince TTS için)
|
||||
|
||||
3. UVR5 (Vokal/Enstrümantal Ayrımı & Yankı Giderme) için, [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) üzerinden modelleri indirip `tools/uvr5/uvr5_weights` dizinine yerleştirin.
|
||||
|
||||
@ -254,7 +252,7 @@ V1 ortamından V2'yi kullanmak için:
|
||||
|
||||
3. [huggingface](https://huggingface.co/lj1995/GPT-SoVITS/tree/main/gsv-v2final-pretrained) adresinden v2 önceden eğitilmiş modelleri indirin ve bunları `GPT_SoVITS\pretrained_models\gsv-v2final-pretrained` dizinine yerleştirin.
|
||||
|
||||
Ek olarak Çince V2: [G2PWModel_1.1.zip](https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip) (G2PW modellerini indirip, zipten çıkarıp, `G2PWModel` olarak yeniden adlandırıp `GPT_SoVITS/text` dizinine yerleştirin.)
|
||||
Ek olarak Çince V2: [G2PWModel.zip(HF)](https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip)| [G2PWModel.zip(ModelScope)](https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip) (G2PW modellerini indirip, zipten çıkarıp, `G2PWModel` olarak yeniden adlandırıp `GPT_SoVITS/text` dizinine yerleştirin.)
|
||||
|
||||
## V3 Sürüm Notları
|
||||
|
||||
|
169
install.sh
169
install.sh
@ -7,8 +7,136 @@ cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
set -e
|
||||
|
||||
if ! command -v conda &>/dev/null; then
|
||||
echo "Conda Not Found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap 'echo "Error Occured at \"$BASH_COMMAND\" with exit code $?"; exit 1' ERR
|
||||
|
||||
is_HF=false
|
||||
is_HF_MIRROR=false
|
||||
is_MODELSCOPE=false
|
||||
DOWNLOAD_UVR5=false
|
||||
|
||||
print_help() {
|
||||
echo "Usage: bash install.sh [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --source HF|HF-Mirror|ModelScope Specify the model source (REQUIRED)"
|
||||
echo " --download-uvr5 Enable downloading the UVR5 model"
|
||||
echo " -h, --help Show this help message and exit"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " bash install.sh --source HF --download-uvr5"
|
||||
echo " bash install.sh --source ModelScope"
|
||||
}
|
||||
|
||||
# Show help if no arguments provided
|
||||
if [[ $# -eq 0 ]]; then
|
||||
print_help
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--source)
|
||||
case "$2" in
|
||||
HF)
|
||||
is_HF=true
|
||||
;;
|
||||
HF-Mirror)
|
||||
is_HF_MIRROR=true
|
||||
;;
|
||||
ModelScope)
|
||||
is_MODELSCOPE=true
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid Download Source: $2"
|
||||
echo "Choose From: [HF, HF-Mirror, ModelScope]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift 2
|
||||
;;
|
||||
--download-uvr5)
|
||||
DOWNLOAD_UVR5=true
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown Argument: $1"
|
||||
echo "Use -h or --help to see available options."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ! $is_HF && ! $is_HF_MIRROR && ! $is_MODELSCOPE; then
|
||||
echo "Error: Download Source is REQUIRED"
|
||||
echo ""
|
||||
print_help
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$is_HF" = "true" ]; then
|
||||
echo "Download Model From HuggingFace"
|
||||
PRETRINED_URL="https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/pretrained_models.zip"
|
||||
G2PW_URL="https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip"
|
||||
UVR5_URL="https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/uvr5_weights.zip"
|
||||
elif [ "$is_HF_MIRROR" = "true" ]; then
|
||||
echo "Download Model From HuggingFace-Mirror"
|
||||
PRETRINED_URL="https://hf-mirror.com/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/pretrained_models.zip"
|
||||
G2PW_URL="https://hf-mirror.com/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/G2PWModel.zip"
|
||||
UVR5_URL="https://hf-mirror.com/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/uvr5_weights.zip"
|
||||
elif [ "$is_MODELSCOPE" = "true" ]; then
|
||||
echo "Download Model From ModelScope"
|
||||
PRETRINED_URL="https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/pretrained_models.zip"
|
||||
G2PW_URL="https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/G2PWModel.zip"
|
||||
UVR5_URL="https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/uvr5_weights.zip"
|
||||
fi
|
||||
|
||||
if find "GPT_SoVITS/pretrained_models" -mindepth 1 ! -name '.gitignore' | grep -q .; then
|
||||
echo "Pretrained Model Exists"
|
||||
else
|
||||
echo "Download Pretrained Models"
|
||||
wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$PRETRINED_URL"
|
||||
|
||||
unzip pretrained_models.zip
|
||||
rm -rf pretrained_models.zip
|
||||
mv pretrained_models/* GPT_SoVITS/pretrained_models
|
||||
rm -rf pretrained_models
|
||||
fi
|
||||
|
||||
if [ ! -d "GPT_SoVITS/text/G2PWModel" ]; then
|
||||
echo "Download G2PWModel"
|
||||
wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$G2PW_URL"
|
||||
|
||||
unzip G2PWModel.zip
|
||||
rm -rf G2PWModel.zip
|
||||
mv G2PWModel GPT_SoVITS/text/G2PWModel
|
||||
else
|
||||
echo "G2PWModel Exists"
|
||||
fi
|
||||
|
||||
if [ "$DOWNLOAD_UVR5" = "true" ];then
|
||||
if find "tools/uvr5/uvr5_weights" -mindepth 1 ! -name '.gitignore' | grep -q .; then
|
||||
echo "UVR5 Model Exists"
|
||||
else
|
||||
echo "Download UVR5 Model"
|
||||
wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "$UVR5_URL"
|
||||
|
||||
unzip uvr5_weights.zip
|
||||
rm -rf uvr5_weights.zip
|
||||
mv uvr5_weights/* tools/uvr5/uvr5_weights
|
||||
rm -rf uvr5_weights
|
||||
fi
|
||||
fi
|
||||
|
||||
# 安装构建工具
|
||||
# Install build tools
|
||||
echo "Installing GCC..."
|
||||
@ -26,47 +154,6 @@ conda install zip -y
|
||||
|
||||
git-lfs install
|
||||
|
||||
# Download Pretrained Models
|
||||
if find "GPT_SoVITS/pretrained_models" -mindepth 1 ! -name '.gitignore' | grep -q .; then
|
||||
echo "Pretrained Model Exists"
|
||||
else
|
||||
echo "Download Pretrained Models"
|
||||
wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "https://www.modelscope.cn/models/XXXXRT/GPT-SoVITS-Pretrained/resolve/master/pretrained_models.zip"
|
||||
|
||||
unzip pretrained_models.zip
|
||||
rm -rf pretrained_models.zip
|
||||
mv pretrained_models/* GPT_SoVITS/pretrained_models
|
||||
rm -rf pretrained_models
|
||||
fi
|
||||
|
||||
# Download G2PW Models
|
||||
if [ ! -d "GPT_SoVITS/text/G2PWModel" ]; then
|
||||
echo "Download G2PWModel"
|
||||
wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "https://www.modelscope.cn/models/kamiorinn/g2pw/resolve/master/G2PWModel_1.1.zip"
|
||||
|
||||
unzip G2PWModel_1.1.zip
|
||||
rm -rf G2PWModel_1.1.zip
|
||||
mv G2PWModel_1.1 GPT_SoVITS/text/G2PWModel
|
||||
else
|
||||
echo "G2PWModel Exists"
|
||||
fi
|
||||
|
||||
if [ ! -d "GPT_SoVITS/pretrained_models/fast_langdetect" ]; then
|
||||
echo "Download Fast Langdetect Model"
|
||||
wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404 "https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin"
|
||||
|
||||
mkdir "GPT_SoVITS/pretrained_models/fast_langdetect"
|
||||
mv "lid.176.bin" "GPT_SoVITS/pretrained_models/fast_langdetect"
|
||||
else
|
||||
echo "Fast Langdetect Model Exists"
|
||||
fi
|
||||
|
||||
# 设置编译环境
|
||||
# Set up build environment
|
||||
export CMAKE_MAKE_PROGRAM="$CONDA_PREFIX/bin/cmake"
|
||||
export CC="$CONDA_PREFIX/bin/gcc"
|
||||
export CXX="$CONDA_PREFIX/bin/g++"
|
||||
|
||||
echo "Checking for CUDA installation..."
|
||||
if command -v nvidia-smi &>/dev/null; then
|
||||
USE_CUDA=true
|
||||
|
@ -4,7 +4,7 @@ tensorboard
|
||||
librosa==0.9.2
|
||||
numba
|
||||
pytorch-lightning>=2.4
|
||||
gradio<5
|
||||
gradio>=4.41,<5
|
||||
ffmpeg-python
|
||||
onnxruntime; sys_platform == 'darwin'
|
||||
onnxruntime-gpu; sys_platform != 'darwin'
|
||||
@ -34,7 +34,7 @@ ko_pron
|
||||
opencc; sys_platform != 'linux'
|
||||
opencc==1.1.1; sys_platform == 'linux'
|
||||
python_mecab_ko; sys_platform != 'win32'
|
||||
fastapi>=0.115.1
|
||||
fastapi[standard]>=0.115.1
|
||||
x_transformers
|
||||
torchmetrics<=1.5
|
||||
pydantic<=2.10.6
|
||||
|
Loading…
x
Reference in New Issue
Block a user