fix: mps
This commit is contained in:
8
webui.py
8
webui.py
@@ -1,3 +1,8 @@
|
|||||||
|
import sys, os
|
||||||
|
|
||||||
|
if sys.platform == "darwin":
|
||||||
|
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
import argparse
|
import argparse
|
||||||
import commons
|
import commons
|
||||||
@@ -8,10 +13,7 @@ from text import cleaned_text_to_sequence, get_bert
|
|||||||
from text.cleaner import clean_text
|
from text.cleaner import clean_text
|
||||||
import gradio as gr
|
import gradio as gr
|
||||||
import webbrowser
|
import webbrowser
|
||||||
import sys, os
|
|
||||||
|
|
||||||
if sys.platform == "darwin":
|
|
||||||
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
|
|
||||||
|
|
||||||
def get_text(text, language_str, hps):
|
def get_text(text, language_str, hps):
|
||||||
norm_text, phone, tone, word2ph = clean_text(text, language_str)
|
norm_text, phone, tone, word2ph = clean_text(text, language_str)
|
||||||
|
|||||||
Reference in New Issue
Block a user