Colab notebook (part II)

This commit is contained in:
mrq 2023-02-10 16:12:11 +00:00
parent 939c89f16e
commit 07c54ad361

View File

@ -1 +1,96 @@
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"private_outputs":true,"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"},"accelerator":"GPU","gpuClass":"standard"},"cells":[{"cell_type":"markdown","source":["## Initialization"],"metadata":{"id":"ni41hmE03DL6"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"FtsMKKfH18iM"},"outputs":[],"source":["!git clone https://git.ecker.tech/mrq/tortoise-tts/\n","%cd tortoise-tts\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","!pip install Pillow==9.0.0 # errors out only when importing\n","!python setup.py install"]},{"cell_type":"markdown","source":["## Running"],"metadata":{"id":"o1gkfw3B3JSk"}},{"cell_type":"code","source":["import webui as mrq\n","\n","mrq.args = mrq.setup_args()\n","mrq.webui = mrq.setup_gradio()\n","mrq.webui.launch(share=True, prevent_thread_lock=True)\n","mrq.tts = mrq.setup_tortoise()\n","mrq.webui.block_thread()"],"metadata":{"id":"c_EQZLTA19c7"},"execution_count":null,"outputs":[]}]}
{
"nbformat":4,
"nbformat_minor":0,
"metadata":{
"colab":{
"private_outputs":true,
"provenance":[
]
},
"kernelspec":{
"name":"python3",
"display_name":"Python 3"
},
"language_info":{
"name":"python"
},
"accelerator":"GPU",
"gpuClass":"standard"
},
"cells":[
{
"cell_type":"markdown",
"source":[
"## Initialization"
],
"metadata":{
"id":"ni41hmE03DL6"
}
},
{
"cell_type":"code",
"execution_count":null,
"metadata":{
"id":"FtsMKKfH18iM"
},
"outputs":[
],
"source":[
"!git clone https://git.ecker.tech/mrq/tortoise-tts/\n",
"%cd tortoise-tts\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 setup.py install"
]
},
{
"cell_type":"code",
"source":[
"# hotfix for colab\n",
"!pip install Pillow==9.0.0\n",
"exit()"
],
"metadata":{
"id":"FVUOtSASCSJ8"
},
"execution_count":null,
"outputs":[
]
},
{
"cell_type":"markdown",
"source":[
"## Running"
],
"metadata":{
"id":"o1gkfw3B3JSk"
}
},
{
"cell_type":"code",
"source":[
"%cd tortoise-tts\n",
"import webui as mrq\n",
"import sys\n",
"sys.argv = [\"\"]\n",
"\n",
"mrq.args = mrq.setup_args()\n",
"mrq.webui = mrq.setup_gradio()\n",
"mrq.webui.launch(share=True, prevent_thread_lock=True)\n",
"mrq.tts = mrq.setup_tortoise()\n",
"mrq.webui.block_thread()"
],
"metadata":{
"id":"c_EQZLTA19c7"
},
"execution_count":null,
"outputs":[
]
}
]
}