diff --git a/notebook_colab.ipynb b/notebook_colab.ipynb index 381648e..372fd53 100755 --- a/notebook_colab.ipynb +++ b/notebook_colab.ipynb @@ -38,25 +38,10 @@ ], "source":[ + "!apt install python3.8-venv\n", "!git clone https://git.ecker.tech/mrq/ai-voice-cloning/\n", - "%cd ai-voice-cloning\n", - "\n", - "!git submodule init\n", - "!git submodule update --remote\n", - "\n", - "# TODO: fix venvs working for subprocess.Popen calling a bash script\n", - "#!apt install python3.8-venv\n", - "#!python -m venv venv\n", - "#!source ./venv/bin/activate\n", - "\n", - "!python -m pip install --upgrade pip\n", - "!pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116\n", - "!python -m pip install -r ./requirements.txt\n", - "!python -m pip install -r ./tortoise-tts/requirements.txt\n", - "!python -m pip install -e ./tortoise-tts/\n", - "!python -m pip install -r ./dlas/requirements.txt\n", - "\n", - "!rm ./tortoise-tts/{main,webui}.py" + "%cd /content/ai-voice-cloning\n", + "!./setup-cuda.sh" ] }, { @@ -120,58 +105,7 @@ { "cell_type":"markdown", "source":[ - "## Running (Inlined)" - ], - "metadata":{ - "id":"o1gkfw3B3JSk" - } - }, - { - "cell_type":"code", - "source":[ - "%cd /content/ai-voice-cloning\n", - "#!source ./venv/bin/activate\n", - "\n", - "import os\n", - "import sys\n", - "\n", - "sys.argv = [\"\"]\n", - "if './src/' not in sys.path:\n", - "\tsys.path.append('./src/')\n", - "if './tortoise-tts/' not in sys.path:\n", - "\tsys.path.append('./tortoise-tts/')\n", - "\n", - "if 'TORTOISE_MODELS_DIR' not in os.environ:\n", - "\tos.environ['TORTOISE_MODELS_DIR'] = os.path.realpath(os.path.join(os.getcwd(), './models/tortoise/'))\n", - "\n", - "if 'TRANSFORMERS_CACHE' not in os.environ:\n", - "\tos.environ['TRANSFORMERS_CACHE'] = os.path.realpath(os.path.join(os.getcwd(), './models/transformers/'))\n", - "\n", - "import utils\n", - "import webui\n", - "\n", - "args = utils.setup_args()\n", - "ui = webui.setup_gradio()\n", - "# Be very, very sure to check \"Do Not Load TTS On Startup\" in Settings after all the models download, then restart, before you start training\n", - "# You'll crash the runtime if you don't\n", - "if not args.defer_tts_load:\n", - "\tutils.setup_tortoise()\n", - "\n", - "ui.launch(share=True, prevent_thread_lock=True, height=1000)\n", - "ui.block_thread()" - ], - "metadata":{ - "id":"c_EQZLTA19c7" - }, - "execution_count":null, - "outputs":[ - - ] - }, - { - "cell_type":"markdown", - "source":[ - "## Running (non-inlined)" + "## Running" ], "metadata":{ "id":"EM3iNqgJF6Be" @@ -203,7 +137,6 @@ { "cell_type":"code", "source":[ - "!rm ./tortoise-tts/{main,webui}.py\n", "exit()" ], "metadata":{