diff --git a/Colab-WebUI.ipynb b/Colab-WebUI.ipynb new file mode 100644 index 00000000..b536caa5 --- /dev/null +++ b/Colab-WebUI.ipynb @@ -0,0 +1,1383 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "kTcCe-cOohXR" + }, + "source": [ + "# GPT-SoVITS WebUI" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "_o6a8GS2lWQM" + }, + "source": [ + "## Env Setup (Run Once Only)\n", + "## 环境配置, 只需运行一次" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "SGGhE5fjohXS" + }, + "source": [ + "### 1." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "id": "x-UOnJjmohXS", + "outputId": "f9470adc-b24e-4d85-e463-b668dcf0cbf0", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Writing /content/setup.sh\n" + ] + } + ], + "source": [ + "%%writefile /content/setup.sh\n", + "set -e\n", + "\n", + "cd /content\n", + "\n", + "git clone https://github.com/RVC-Boss/GPT-SoVITS.git\n", + "\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", + "pip install ipykernel\n", + "\n", + "bash install.sh --device CU126 --source HF --download-uvr5" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "E7NVdqZTohXS" + }, + "source": [ + "### 2." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "eHtTGuA4ohXT", + "outputId": "1cc5d9a5-8fb0-4672-e476-084ae0238fed", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "⏬ Downloading https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh...\n", + "📦 Installing...\n", + "📌 Adjusting configuration...\n", + "🩹 Patching environment...\n", + "⏲ Done in 0:01:50\n", + "🔁 Restarting kernel...\n", + "Cloning into 'GPT-SoVITS'...\n", + "remote: Enumerating objects: 5816, done.\u001b[K\n", + "remote: Counting objects: 100% (23/23), done.\u001b[K\n", + "remote: Compressing objects: 100% (19/19), done.\u001b[K\n", + "remote: Total 5816 (delta 13), reused 4 (delta 4), pack-reused 5793 (from 2)\u001b[K\n", + "Receiving objects: 100% (5816/5816), 14.06 MiB | 14.38 MiB/s, done.\n", + "Resolving deltas: 100% (3337/3337), done.\n", + "Channels:\n", + " - defaults\n", + "Platform: linux-64\n", + "Collecting package metadata (repodata.json): - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\bdone\n", + "Solving environment: | \b\b/ \b\bdone\n", + "\n", + "## Package Plan ##\n", + "\n", + " environment location: /usr/local/envs/GPTSoVITS\n", + "\n", + " added / updated specs:\n", + " - python=3.10\n", + "\n", + "\n", + "The following packages will be downloaded:\n", + "\n", + " package | build\n", + " ---------------------------|-----------------\n", + " ca-certificates-2025.12.2 | h06a4308_0 125 KB\n", + " expat-2.7.4 | h7354ed3_0 25 KB\n", + " ld_impl_linux-64-2.44 | h153f514_2 672 KB\n", + " libexpat-2.7.4 | h7354ed3_0 122 KB\n", + " libgcc-15.2.0 | h69a1729_7 806 KB\n", + " libgcc-ng-15.2.0 | h166f726_7 28 KB\n", + " libgomp-15.2.0 | h4751f2c_7 436 KB\n", + " libnsl-2.0.0 | h5eee18b_0 31 KB\n", + " libstdcxx-15.2.0 | h39759b7_7 3.7 MB\n", + " libstdcxx-ng-15.2.0 | hc03a8fd_7 28 KB\n", + " libxcb-1.17.0 | h9b100fa_0 430 KB\n", + " libzlib-1.3.1 | hb25bd0a_0 59 KB\n", + " ncurses-6.5 | h7934f7d_0 1.1 MB\n", + " openssl-3.0.19 | h1b28b03_0 4.4 MB\n", + " packaging-25.0 | py310h06a4308_1 164 KB\n", + " pip-25.3 | pyhc872135_0 1.1 MB\n", + " pthread-stubs-0.3 | h0ce48e5_1 5 KB\n", + " python-3.10.19 | h6fa692b_0 24.5 MB\n", + " readline-8.3 | hc2a1206_0 471 KB\n", + " setuptools-80.10.2 | py310h06a4308_0 1.3 MB\n", + " sqlite-3.51.1 | he0a8d7e_0 1.2 MB\n", + " tk-8.6.15 | h54e0aa7_0 3.4 MB\n", + " tzdata-2025c | he532380_0 118 KB\n", + " wheel-0.46.3 | py310h06a4308_0 54 KB\n", + " xorg-libx11-1.8.12 | h9b100fa_1 895 KB\n", + " xorg-libxau-1.0.12 | h9b100fa_0 13 KB\n", + " xorg-libxdmcp-1.1.5 | h9b100fa_0 19 KB\n", + " xorg-xorgproto-2024.1 | h5eee18b_1 580 KB\n", + " xz-5.6.4 | h5eee18b_1 567 KB\n", + " zlib-1.3.1 | hb25bd0a_0 96 KB\n", + " ------------------------------------------------------------\n", + " Total: 46.4 MB\n", + "\n", + "The following NEW packages will be INSTALLED:\n", + "\n", + " _libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main \n", + " _openmp_mutex pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu \n", + " bzip2 pkgs/main/linux-64::bzip2-1.0.8-h5eee18b_6 \n", + " ca-certificates pkgs/main/linux-64::ca-certificates-2025.12.2-h06a4308_0 \n", + " expat pkgs/main/linux-64::expat-2.7.4-h7354ed3_0 \n", + " ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.44-h153f514_2 \n", + " libexpat pkgs/main/linux-64::libexpat-2.7.4-h7354ed3_0 \n", + " libffi pkgs/main/linux-64::libffi-3.4.4-h6a678d5_1 \n", + " libgcc pkgs/main/linux-64::libgcc-15.2.0-h69a1729_7 \n", + " libgcc-ng pkgs/main/linux-64::libgcc-ng-15.2.0-h166f726_7 \n", + " libgomp pkgs/main/linux-64::libgomp-15.2.0-h4751f2c_7 \n", + " libnsl pkgs/main/linux-64::libnsl-2.0.0-h5eee18b_0 \n", + " libstdcxx pkgs/main/linux-64::libstdcxx-15.2.0-h39759b7_7 \n", + " libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-15.2.0-hc03a8fd_7 \n", + " libuuid pkgs/main/linux-64::libuuid-1.41.5-h5eee18b_0 \n", + " libxcb pkgs/main/linux-64::libxcb-1.17.0-h9b100fa_0 \n", + " libzlib pkgs/main/linux-64::libzlib-1.3.1-hb25bd0a_0 \n", + " ncurses pkgs/main/linux-64::ncurses-6.5-h7934f7d_0 \n", + " openssl pkgs/main/linux-64::openssl-3.0.19-h1b28b03_0 \n", + " packaging pkgs/main/linux-64::packaging-25.0-py310h06a4308_1 \n", + " pip pkgs/main/noarch::pip-25.3-pyhc872135_0 \n", + " pthread-stubs pkgs/main/linux-64::pthread-stubs-0.3-h0ce48e5_1 \n", + " python pkgs/main/linux-64::python-3.10.19-h6fa692b_0 \n", + " readline pkgs/main/linux-64::readline-8.3-hc2a1206_0 \n", + " setuptools pkgs/main/linux-64::setuptools-80.10.2-py310h06a4308_0 \n", + " sqlite pkgs/main/linux-64::sqlite-3.51.1-he0a8d7e_0 \n", + " tk pkgs/main/linux-64::tk-8.6.15-h54e0aa7_0 \n", + " tzdata pkgs/main/noarch::tzdata-2025c-he532380_0 \n", + " wheel pkgs/main/linux-64::wheel-0.46.3-py310h06a4308_0 \n", + " xorg-libx11 pkgs/main/linux-64::xorg-libx11-1.8.12-h9b100fa_1 \n", + " xorg-libxau pkgs/main/linux-64::xorg-libxau-1.0.12-h9b100fa_0 \n", + " xorg-libxdmcp pkgs/main/linux-64::xorg-libxdmcp-1.1.5-h9b100fa_0 \n", + " xorg-xorgproto pkgs/main/linux-64::xorg-xorgproto-2024.1-h5eee18b_1 \n", + " xz pkgs/main/linux-64::xz-5.6.4-h5eee18b_1 \n", + " zlib pkgs/main/linux-64::zlib-1.3.1-hb25bd0a_0 \n", + "\n", + "\n", + "\n", + "Downloading and Extracting Packages:\n", + "python-3.10.19 | 24.5 MB | : 0% 0/1 [00:00=0.1.1 (from ipykernel)\n", + " Downloading comm-0.2.3-py3-none-any.whl.metadata (3.7 kB)\n", + "Collecting debugpy>=1.6.5 (from ipykernel)\n", + " Downloading debugpy-1.8.20-cp310-cp310-manylinux_2_34_x86_64.whl.metadata (1.4 kB)\n", + "Collecting ipython>=7.23.1 (from ipykernel)\n", + " Downloading ipython-8.38.0-py3-none-any.whl.metadata (5.1 kB)\n", + "Collecting jupyter-client>=8.8.0 (from ipykernel)\n", + " Downloading jupyter_client-8.8.0-py3-none-any.whl.metadata (8.4 kB)\n", + "Collecting jupyter-core!=6.0.*,>=5.1 (from ipykernel)\n", + " Downloading jupyter_core-5.9.1-py3-none-any.whl.metadata (1.5 kB)\n", + "Collecting matplotlib-inline>=0.1 (from ipykernel)\n", + " Downloading matplotlib_inline-0.2.1-py3-none-any.whl.metadata (2.3 kB)\n", + "Collecting nest-asyncio>=1.4 (from ipykernel)\n", + " Downloading nest_asyncio-1.6.0-py3-none-any.whl.metadata (2.8 kB)\n", + "Requirement already satisfied: packaging>=22 in /usr/local/envs/GPTSoVITS/lib/python3.10/site-packages (from ipykernel) (25.0)\n", + "Collecting psutil>=5.7 (from ipykernel)\n", + " Downloading psutil-7.2.2-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl.metadata (22 kB)\n", + "Collecting pyzmq>=25 (from ipykernel)\n", + " Downloading pyzmq-27.1.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl.metadata (6.0 kB)\n", + "Collecting tornado>=6.4.1 (from ipykernel)\n", + " Downloading tornado-6.5.4-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.8 kB)\n", + "Collecting traitlets>=5.4.0 (from ipykernel)\n", + " Downloading traitlets-5.14.3-py3-none-any.whl.metadata (10 kB)\n", + "Collecting decorator (from ipython>=7.23.1->ipykernel)\n", + " Downloading decorator-5.2.1-py3-none-any.whl.metadata (3.9 kB)\n", + "Collecting exceptiongroup (from ipython>=7.23.1->ipykernel)\n", + " Downloading exceptiongroup-1.3.1-py3-none-any.whl.metadata (6.7 kB)\n", + "Collecting jedi>=0.16 (from ipython>=7.23.1->ipykernel)\n", + " Downloading jedi-0.19.2-py2.py3-none-any.whl.metadata (22 kB)\n", + "Collecting pexpect>4.3 (from ipython>=7.23.1->ipykernel)\n", + " Downloading pexpect-4.9.0-py2.py3-none-any.whl.metadata (2.5 kB)\n", + "Collecting prompt_toolkit<3.1.0,>=3.0.41 (from ipython>=7.23.1->ipykernel)\n", + " Downloading prompt_toolkit-3.0.52-py3-none-any.whl.metadata (6.4 kB)\n", + "Collecting pygments>=2.4.0 (from ipython>=7.23.1->ipykernel)\n", + " Downloading pygments-2.19.2-py3-none-any.whl.metadata (2.5 kB)\n", + "Collecting stack_data (from ipython>=7.23.1->ipykernel)\n", + " Downloading stack_data-0.6.3-py3-none-any.whl.metadata (18 kB)\n", + "Collecting typing_extensions>=4.6 (from ipython>=7.23.1->ipykernel)\n", + " Downloading typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB)\n", + "Collecting wcwidth (from prompt_toolkit<3.1.0,>=3.0.41->ipython>=7.23.1->ipykernel)\n", + " Downloading wcwidth-0.6.0-py3-none-any.whl.metadata (30 kB)\n", + "Collecting parso<0.9.0,>=0.8.4 (from jedi>=0.16->ipython>=7.23.1->ipykernel)\n", + " Downloading parso-0.8.5-py2.py3-none-any.whl.metadata (8.3 kB)\n", + "Collecting python-dateutil>=2.8.2 (from jupyter-client>=8.8.0->ipykernel)\n", + " Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)\n", + "Collecting platformdirs>=2.5 (from jupyter-core!=6.0.*,>=5.1->ipykernel)\n", + " Downloading platformdirs-4.5.1-py3-none-any.whl.metadata (12 kB)\n", + "Collecting ptyprocess>=0.5 (from pexpect>4.3->ipython>=7.23.1->ipykernel)\n", + " Downloading ptyprocess-0.7.0-py2.py3-none-any.whl.metadata (1.3 kB)\n", + "Collecting six>=1.5 (from python-dateutil>=2.8.2->jupyter-client>=8.8.0->ipykernel)\n", + " Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)\n", + "Collecting executing>=1.2.0 (from stack_data->ipython>=7.23.1->ipykernel)\n", + " Downloading executing-2.2.1-py2.py3-none-any.whl.metadata (8.9 kB)\n", + "Collecting asttokens>=2.1.0 (from stack_data->ipython>=7.23.1->ipykernel)\n", + " Downloading asttokens-3.0.1-py3-none-any.whl.metadata (4.9 kB)\n", + "Collecting pure-eval (from stack_data->ipython>=7.23.1->ipykernel)\n", + " Downloading pure_eval-0.2.3-py3-none-any.whl.metadata (6.3 kB)\n", + "Downloading ipykernel-7.2.0-py3-none-any.whl (118 kB)\n", + "Downloading comm-0.2.3-py3-none-any.whl (7.3 kB)\n", + "Downloading debugpy-1.8.20-cp310-cp310-manylinux_2_34_x86_64.whl (3.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m80.6 MB/s\u001b[0m \u001b[33m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading ipython-8.38.0-py3-none-any.whl (831 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m831.8/831.8 kB\u001b[0m \u001b[31m25.0 MB/s\u001b[0m \u001b[33m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading prompt_toolkit-3.0.52-py3-none-any.whl (391 kB)\n", + "Downloading jedi-0.19.2-py2.py3-none-any.whl (1.6 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m65.0 MB/s\u001b[0m \u001b[33m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading parso-0.8.5-py2.py3-none-any.whl (106 kB)\n", + "Downloading jupyter_client-8.8.0-py3-none-any.whl (107 kB)\n", + "Downloading jupyter_core-5.9.1-py3-none-any.whl (29 kB)\n", + "Downloading matplotlib_inline-0.2.1-py3-none-any.whl (9.5 kB)\n", + "Downloading nest_asyncio-1.6.0-py3-none-any.whl (5.2 kB)\n", + "Downloading pexpect-4.9.0-py2.py3-none-any.whl (63 kB)\n", + "Downloading platformdirs-4.5.1-py3-none-any.whl (18 kB)\n", + "Downloading psutil-7.2.2-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl (155 kB)\n", + "Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)\n", + "Downloading pygments-2.19.2-py3-none-any.whl (1.2 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m64.7 MB/s\u001b[0m \u001b[33m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)\n", + "Downloading pyzmq-27.1.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl (854 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m854.1/854.1 kB\u001b[0m \u001b[31m49.3 MB/s\u001b[0m \u001b[33m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading six-1.17.0-py2.py3-none-any.whl (11 kB)\n", + "Downloading tornado-6.5.4-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (445 kB)\n", + "Downloading traitlets-5.14.3-py3-none-any.whl (85 kB)\n", + "Downloading typing_extensions-4.15.0-py3-none-any.whl (44 kB)\n", + "Downloading decorator-5.2.1-py3-none-any.whl (9.2 kB)\n", + "Downloading exceptiongroup-1.3.1-py3-none-any.whl (16 kB)\n", + "Downloading stack_data-0.6.3-py3-none-any.whl (24 kB)\n", + "Downloading asttokens-3.0.1-py3-none-any.whl (27 kB)\n", + "Downloading executing-2.2.1-py2.py3-none-any.whl (28 kB)\n", + "Downloading pure_eval-0.2.3-py3-none-any.whl (11 kB)\n", + "Downloading wcwidth-0.6.0-py3-none-any.whl (94 kB)\n", + "Installing collected packages: pure-eval, ptyprocess, wcwidth, typing_extensions, traitlets, tornado, six, pyzmq, pygments, psutil, platformdirs, pexpect, parso, nest-asyncio, executing, decorator, debugpy, comm, asttokens, stack_data, python-dateutil, prompt_toolkit, matplotlib-inline, jupyter-core, jedi, exceptiongroup, jupyter-client, ipython, ipykernel\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m29/29\u001b[0m [ipykernel]\n", + "\u001b[1A\u001b[2KSuccessfully installed asttokens-3.0.1 comm-0.2.3 debugpy-1.8.20 decorator-5.2.1 exceptiongroup-1.3.1 executing-2.2.1 ipykernel-7.2.0 ipython-8.38.0 jedi-0.19.2 jupyter-client-8.8.0 jupyter-core-5.9.1 matplotlib-inline-0.2.1 nest-asyncio-1.6.0 parso-0.8.5 pexpect-4.9.0 platformdirs-4.5.1 prompt_toolkit-3.0.52 psutil-7.2.2 ptyprocess-0.7.0 pure-eval-0.2.3 pygments-2.19.2 python-dateutil-2.9.0.post0 pyzmq-27.1.0 six-1.17.0 stack_data-0.6.3 tornado-6.5.4 traitlets-5.14.3 typing_extensions-4.15.0 wcwidth-0.6.0\n", + "\u001b[1;32m[INFO]: \u001b[0mDetected system: Linux 6.6.105+ x86_64\n", + "\u001b[1;32m[INFO]: \u001b[0mDetected GCC Version: 11\n", + "\u001b[1;32m[INFO]: \u001b[0mSkip Installing GCC & G++ From Conda-Forge\n", + "\u001b[1;32m[INFO]: \u001b[0mInstalling libstdcxx-ng From Conda-Forge\n", + "\u001b[1;34m[SUCCESS]: \u001b[0mlibstdcxx-ng=11 Installed...\n", + "\u001b[1;32m[INFO]: \u001b[0mInstalling FFmpeg & CMake...\n", + "\u001b[1;34m[SUCCESS]: \u001b[0mFFmpeg & CMake Installed\n", + "\u001b[1;32m[INFO]: \u001b[0mInstalling unzip...\n", + "\u001b[1;34m[SUCCESS]: \u001b[0munzip Installed\n", + "\u001b[1;32m[INFO]: \u001b[0mDownload Model From HuggingFace\n", + "\u001b[1;32m[INFO]: \u001b[0mDownloading Pretrained Models...\n", + "pretrained_models.z 67%[============> ] 2.89G 5.52MB/s eta 5m 15s " + ] + } + ], + "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", + "!cd /content && bash setup.sh" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "280UlpdrohXT" + }, + "source": [ + "## Launch WebUI\n", + "## 启动 WebUI" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "4oRGUzkrk8C7" + }, + "outputs": [], + "source": [ + "!cd /content/GPT-SoVITS && source activate GPTSoVITS && export is_share=True && python webui.py" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "provenance": [], + "include_colab_link": true + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file