forked from mrq/tortoise-tts
you should have migrated by now, if anything breaks it's on (You)
This commit is contained in:
parent
06bdf72b89
commit
0f3261e071
|
@ -1,5 +1,7 @@
|
||||||
# (QoL improvements for) TorToiSe
|
# (QoL improvements for) TorToiSe
|
||||||
|
|
||||||
This repo is for my modifications to [neonbjb/tortoise-tts](https://github.com/neonbjb/tortoise-tts).
|
This repo is for my modifications to [neonbjb/tortoise-tts](https://github.com/neonbjb/tortoise-tts). If you need the original README, refer to the original repo.
|
||||||
|
|
||||||
Please migrate to [mrq/ai-voice-cloning](https://git.ecker.tech/mrq/ai-voice-cloning) for future additions.
|
\> w-where'd everything go?
|
||||||
|
|
||||||
|
Please migrate to [mrq/ai-voice-cloning](https://git.ecker.tech/mrq/ai-voice-cloning), as that repo is the more cohesive package for voice cloning.
|
|
@ -1,5 +0,0 @@
|
||||||
import torch
|
|
||||||
|
|
||||||
devices = [f"cuda:{i} => {torch.cuda.get_device_name(i)}" for i in range(torch.cuda.device_count())]
|
|
||||||
|
|
||||||
print(devices)
|
|
36
main.py
36
main.py
|
@ -1,36 +0,0 @@
|
||||||
import os
|
|
||||||
import webui as mrq
|
|
||||||
|
|
||||||
print('DEPRECATION WARNING: this repo has been refractored to focus entirely on tortoise-tts. Please migrate to https://git.ecker.tech/mrq/ai-voice-cloning if you seek new features.')
|
|
||||||
|
|
||||||
if 'TORTOISE_MODELS_DIR' not in os.environ:
|
|
||||||
os.environ['TORTOISE_MODELS_DIR'] = os.path.realpath(os.path.join(os.getcwd(), './models/tortoise/'))
|
|
||||||
|
|
||||||
if 'TRANSFORMERS_CACHE' not in os.environ:
|
|
||||||
os.environ['TRANSFORMERS_CACHE'] = os.path.realpath(os.path.join(os.getcwd(), './models/transformers/'))
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
mrq.args = mrq.setup_args()
|
|
||||||
|
|
||||||
if mrq.args.listen_path is not None and mrq.args.listen_path != "/":
|
|
||||||
import uvicorn
|
|
||||||
uvicorn.run("main:app", host=mrq.args.listen_host, port=mrq.args.listen_port if not None else 8000)
|
|
||||||
else:
|
|
||||||
mrq.webui = mrq.setup_gradio()
|
|
||||||
mrq.webui.launch(share=mrq.args.share, prevent_thread_lock=True, server_name=mrq.args.listen_host, server_port=mrq.args.listen_port)
|
|
||||||
mrq.tts = mrq.setup_tortoise()
|
|
||||||
|
|
||||||
mrq.webui.block_thread()
|
|
||||||
elif __name__ == "main":
|
|
||||||
from fastapi import FastAPI
|
|
||||||
import gradio as gr
|
|
||||||
|
|
||||||
import sys
|
|
||||||
sys.argv = [sys.argv[0]]
|
|
||||||
|
|
||||||
app = FastAPI()
|
|
||||||
mrq.args = mrq.setup_args()
|
|
||||||
mrq.webui = mrq.setup_gradio()
|
|
||||||
app = gr.mount_gradio_app(app, mrq.webui, path=mrq.args.listen_path)
|
|
||||||
|
|
||||||
mrq.tts = mrq.setup_tortoise()
|
|
|
@ -1,8 +0,0 @@
|
||||||
python -m venv tortoise-venv
|
|
||||||
call .\tortoise-venv\Scripts\activate.bat
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
|
|
||||||
python -m pip install -r ./requirements.txt
|
|
||||||
python -m pip install -r ./requirements_legacy.txt
|
|
||||||
deactivate
|
|
||||||
pause
|
|
|
@ -1,8 +0,0 @@
|
||||||
python -m venv tortoise-venv
|
|
||||||
source ./tortoise-venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
# CUDA
|
|
||||||
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
|
|
||||||
python -m pip install -r ./requirements.txt
|
|
||||||
python -m pip install -r ./requirements_legacy.txt
|
|
||||||
deactivate
|
|
|
@ -1,8 +0,0 @@
|
||||||
python -m venv tortoise-venv
|
|
||||||
call .\tortoise-venv\Scripts\activate.bat
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
python -m pip install torch torchvision torchaudio torch-directml
|
|
||||||
python -m pip install -r ./requirements.txt
|
|
||||||
python -m pip install -r ./requirements_legacy.txt
|
|
||||||
deactivate
|
|
||||||
pause
|
|
|
@ -1,8 +0,0 @@
|
||||||
python -m venv tortoise-venv
|
|
||||||
source ./tortoise-venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
# ROCM
|
|
||||||
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.1.1 # 5.2 does not work for me desu
|
|
||||||
python -m pip install -r ./requirements.txt
|
|
||||||
python -m pip install -r ./requirements_legacy.txt
|
|
||||||
deactivate
|
|
|
@ -1,4 +0,0 @@
|
||||||
call .\tortoise-venv\Scripts\activate.bat
|
|
||||||
python main.py
|
|
||||||
deactivate
|
|
||||||
pause
|
|
3
start.sh
3
start.sh
|
@ -1,3 +0,0 @@
|
||||||
source ./tortoise-venv/bin/activate
|
|
||||||
python3 ./main.py
|
|
||||||
deactivate
|
|
|
@ -1,137 +0,0 @@
|
||||||
{
|
|
||||||
"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/ai-voice-cloning/\n",
|
|
||||||
"%cd ai-voice-cloning\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"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type":"code",
|
|
||||||
"source":[
|
|
||||||
"# colab requires the runtime to restart before use\n",
|
|
||||||
"exit()"
|
|
||||||
],
|
|
||||||
"metadata":{
|
|
||||||
"id":"FVUOtSASCSJ8"
|
|
||||||
},
|
|
||||||
"execution_count":null,
|
|
||||||
"outputs":[
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type":"markdown",
|
|
||||||
"source":[
|
|
||||||
"## Running"
|
|
||||||
],
|
|
||||||
"metadata":{
|
|
||||||
"id":"o1gkfw3B3JSk"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type":"code",
|
|
||||||
"source":[
|
|
||||||
"%cd /content/ai-voice-cloning\n",
|
|
||||||
"\n",
|
|
||||||
"import os\n",
|
|
||||||
"import sys\n",
|
|
||||||
"\n",
|
|
||||||
"sys.argv = [\"\"]\n",
|
|
||||||
"sys.path.append('./src/')\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",
|
|
||||||
"from utils import *\n",
|
|
||||||
"from webui import *\n",
|
|
||||||
"\n",
|
|
||||||
"args = setup_args()\n",
|
|
||||||
"\n",
|
|
||||||
"webui = setup_gradio()\n",
|
|
||||||
"tts = setup_tortoise()\n",
|
|
||||||
"webui.launch(share=True, prevent_thread_lock=True, height=1000)\n",
|
|
||||||
"webui.block_thread()"
|
|
||||||
],
|
|
||||||
"metadata":{
|
|
||||||
"id":"c_EQZLTA19c7"
|
|
||||||
},
|
|
||||||
"execution_count":null,
|
|
||||||
"outputs":[
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type":"markdown",
|
|
||||||
"source":[
|
|
||||||
"## Exporting"
|
|
||||||
],
|
|
||||||
"metadata":{
|
|
||||||
"id":"2AnVQxEJx47p"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type":"code",
|
|
||||||
"source":[
|
|
||||||
"%cd /content/ai-voice-cloning\n",
|
|
||||||
"!apt install -y p7zip-full\n",
|
|
||||||
"from datetime import datetime\n",
|
|
||||||
"timestamp = datetime.now().strftime('%m-%d-%Y_%H:%M:%S')\n",
|
|
||||||
"!mkdir -p \"../{timestamp}\"\n",
|
|
||||||
"!mv ./results/* \"../{timestamp}/.\"\n",
|
|
||||||
"!7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on \"../{timestamp}.7z\" \"../{timestamp}/\"\n",
|
|
||||||
"!ls ~/\n",
|
|
||||||
"!echo \"Finished zipping, archive is available at {timestamp}.7z\""
|
|
||||||
],
|
|
||||||
"metadata":{
|
|
||||||
"id":"YOACiDCXx72G"
|
|
||||||
},
|
|
||||||
"execution_count":null,
|
|
||||||
"outputs":[
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
git fetch --all
|
|
||||||
git reset --hard origin/main
|
|
||||||
call .\update.bat
|
|
|
@ -1,3 +0,0 @@
|
||||||
git fetch --all
|
|
||||||
git reset --hard origin/main
|
|
||||||
./update.sh
|
|
|
@ -1,7 +0,0 @@
|
||||||
git pull
|
|
||||||
python -m venv tortoise-venv
|
|
||||||
call .\tortoise-venv\Scripts\activate.bat
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
python -m pip install -r ./requirements.txt
|
|
||||||
deactivate
|
|
||||||
pause
|
|
|
@ -1,6 +0,0 @@
|
||||||
git pull
|
|
||||||
python -m venv tortoise-venv
|
|
||||||
source ./tortoise-venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
python -m pip install -r ./requirements.txt
|
|
||||||
deactivate
|
|
Loading…
Reference in New Issue
Block a user