Files
GPT-SoVITS/Colab-Inference.ipynb
T
XXXXRT666GitHubpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
d5e479dad6 Introduce Docker and Windows CI Workflow, Pre-commit Formatting, and Language Resource Auto-Download (#2351)
* Docker Auto-Build Workflow

* Rename

* Update

* Fix Bugs

* Disable Progress Bar When workflows triggered

* Fix Wget

* Fix Bugs

* Fix Bugs

* Update Wget

* Update Workflows

* Accelerate Docker Image Building

* Fix Install.sh

* Add Skip-Check For Action Runner

* Fix Dockerfile

* .

* .

* .

* .

* Delete File in Runner

* Add Sort

* Delete More Files

* Delete More

* .

* .

* .

* Add Pre-Commit Hook
Update Docker

* Add Code Spell Check

* [pre-commit.ci] trigger

* [pre-commit.ci] trigger

* [pre-commit.ci] trigger

* Fix Bugs

* .

* Disable Progress Bar and Logs while using GitHub Actions

* .

* .

* Fix Bugs

* update conda

* fix bugs

* Fix Bugs

* fix bugs

* .

* .

* Quiet Installation

* fix bugs

* .

* fix bug

* .

* Fix pre-commit.ci and Docker

* fix bugs

* .

* Update Docker & Pre-Commit

* fix  bugs

* Update Req

* Update Req

* Update OpenCC

* update precommit

* .

* Update .pre-commit-config.yaml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update Docs and fix bugs

* Fix \

* Fix MacOS

* .

* test

* .

* Add Tag Alias

* .

* fix bugs

* fix bugs

* make image smaller

* update pre-commit config

* .

* .

* fix bugs

* use miniconda

* Fix Wrong Path

* .

* debug

* debug

* revert

* Fix Bugs

* Update Docs, Add Dict Auto Download in install.sh

* update docker_build

* Update Docs for Install.sh

* update docker docs about architecture

* Add Xcode-Commandline-Tool Installation

* Update Docs

1. Add Missing VC17
2. Modufied the Order of FFmpeg Installation and Requirements Installation
3. Remove Duplicate FFmpeg

* Fix Wrong Cuda Version

* Update TESTED ENV

* Add PYTHONNOUSERSITE(-s)

* Fix Wrapper

* Update install.sh For Robustness

* Ignore .git

* Preload CUDNN For Ctranslate2

* Remove Gradio Warnings

* Update Colab

* Fix OpenCC Problems

* Update Win DLL Strategy

* Fix Onnxruntime-gpu NVRTC Error

* Fix Path Problems

* Add Windows Packages Workflow

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* .

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Fix Path

* Fix Path

* Enable Logging

* Set 7-Zip compression level to maximum (-mx=9)

* Use Multithread in ONNX Session

* Fix Tag Bugs

* Add Time

* Add Time

* Add Time

* Compress More

* Copy DLL to Solve VC Runtime DLL Missing Issues

* Expose FFmpeg Errors, Copy Only Part of Visual C++ Runtime

* Update build_windows_packages.ps1

* Update build_windows_packages.ps1

* Update build_windows_packages.ps1

* Update build_windows_packages.ps1

* WIP

* WIP

* WIP

* Update build_windows_packages.ps1

* Update install.sh

* Update build_windows_packages.ps1

* Update docker-publish.yaml

* Update install.sh

* Update Dockerfile

* Update docker_build.sh

* Update miniconda_install.sh

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update Colab-WebUI.ipynb

* Update Colab-Inference.ipynb

* Update docker-compose.yaml

* 更新 build_windows_packages.ps1

* Update install.sh

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-26 10:45:14 +08:00

4.9 KiB

Open In Colab

GPT-SoVITS Infer

Env Setup (Run Once Only)

环境配置, 只需运行一次

1.

In [ ]:
%%writefile /content/setup.sh
set -e

cd /content

git clone https://github.com/RVC-Boss/GPT-SoVITS.git

cd GPT-SoVITS

mkdir -p GPT_weights

mkdir -p SoVITS_weights

if conda env list | awk '{print $1}' | grep -Fxq "GPTSoVITS"; then
    :
else
    conda create -n GPTSoVITS python=3.10 -y
fi

source activate GPTSoVITS

pip install ipykernel

bash install.sh --device CU126 --source HF

2.

In [ ]:
%pip install -q condacolab
import condacolab
condacolab.install_from_url("https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh")
!cd /content && bash setup.sh

Download Model

Download From HuggingFace

In [ ]:
# Modify These
USER_ID = "AkitoP"
REPO_NAME = "GPT-SoVITS-v2-aegi"
BRANCH = "main"
GPT_PATH = "new_aegigoe-e100.ckpt"
SOVITS_PATH = "new_aegigoe_e60_s32220.pth"

# Do Not Modify
HF_BASE = "https://huggingface.co"
REPO_ID = f"{USER_ID}/{REPO_NAME}"
GPT_URL = f"{HF_BASE}/{REPO_ID}/blob/{BRANCH}/{GPT_PATH}"
SOVITS_URL = f"{HF_BASE}/{REPO_ID}/blob/{BRANCH}/{SOVITS_PATH}"

!cd "/content/GPT-SoVITS/GPT_weights" && wget "{GPT_URL}"
!cd "/content/GPT-SoVITS/SoVITS_weights" && wget "{SOVITS_URL}"

Download From ModelScope

In [ ]:
# Modify These
USER_ID = "aihobbyist"
REPO_NAME = "GPT-SoVits-V2-models"
BRANCH = "master"
GPT_PATH = "Genshin_Impact/EN/GPT_GenshinImpact_EN_5.1.ckpt"
SOVITS_PATH = "Wuthering_Waves/CN/SV_WutheringWaves_CN_1.3.pth"

# Do Not Modify
HF_BASE = "https://www.modelscope.cn/models"
REPO_ID = f"{USER_ID}/{REPO_NAME}"
GPT_URL = f"{HF_BASE}/{REPO_ID}/resolve/{BRANCH}/{GPT_PATH}"
SOVITS_URL = f"{HF_BASE}/{REPO_ID}/resolve/{BRANCH}/{SOVITS_PATH}"

!cd "/content/GPT-SoVITS/GPT_weights" && wget "{GPT_URL}"
!cd "/content/GPT-SoVITS/SoVITS_weights" && wget "{SOVITS_URL}"

Launch WebUI

启动 WebUI

In [ ]:
!cd /content/GPT-SoVITS && source activate GPTSoVITS && export is_share=True && python webui.py