forked from mrq/tortoise-tts
fixing brain worms
This commit is contained in:
parent
d53edf540e
commit
30298b9ca3
9
main.py
9
main.py
|
@ -1,5 +1,14 @@
|
||||||
import webui as mrq
|
import webui as mrq
|
||||||
|
|
||||||
|
if 'XDG_CACHE_HOME' not in os.environ:
|
||||||
|
os.environ['XDG_CACHE_HOME'] = os.path.realpath('./models/')
|
||||||
|
|
||||||
|
if 'TORTOISE_MODELS_DIR' not in os.environ:
|
||||||
|
os.environ['TORTOISE_MODELS_DIR'] = os.path.realpath('./models/tortoise/')
|
||||||
|
|
||||||
|
if 'TRANSFORMERS_CACHE' not in os.environ:
|
||||||
|
os.environ['TRANSFORMERS_CACHE'] = os.path.realpath('./models/transformers/')
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
mrq.args = mrq.setup_args()
|
mrq.args = mrq.setup_args()
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,6 @@ import gc
|
||||||
from time import time
|
from time import time
|
||||||
from urllib import request
|
from urllib import request
|
||||||
|
|
||||||
if 'TORTOISE_MODELS_DIR' not in os.environ:
|
|
||||||
os.environ['TORTOISE_MODELS_DIR'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../models/tortoise/')
|
|
||||||
|
|
||||||
if 'TRANSFORMERS_CACHE' not in os.environ:
|
|
||||||
os.environ['TRANSFORMERS_CACHE'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../models/transformers/')
|
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
import torch.nn.functional as F
|
import torch.nn.functional as F
|
||||||
import progressbar
|
import progressbar
|
||||||
|
@ -38,7 +32,7 @@ pbar = None
|
||||||
|
|
||||||
STOP_SIGNAL = False
|
STOP_SIGNAL = False
|
||||||
|
|
||||||
MODELS_DIR = os.environ.get('TORTOISE_MODELS_DIR')
|
MODELS_DIR = os.environ.get('TORTOISE_MODELS_DIR', os.path.realpath('./models/tortoise/'))
|
||||||
MODELS = {
|
MODELS = {
|
||||||
'autoregressive.pth': 'https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/autoregressive.pth',
|
'autoregressive.pth': 'https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/autoregressive.pth',
|
||||||
'classifier.pth': 'https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/classifier.pth',
|
'classifier.pth': 'https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/classifier.pth',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user