Skip to content

Commit

Permalink
Update inference_webui.py
Browse files Browse the repository at this point in the history
  • Loading branch information
XXXXRT666 committed Feb 21, 2024
1 parent 97e3479 commit 83c9e8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions GPT_SoVITS/inference_webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
logging.getLogger("charset_normalizer").setLevel(logging.ERROR)
logging.getLogger("torchaudio._extension").setLevel(logging.ERROR)
import pdb
import torch

if os.path.exists("./gweight.txt"):
with open("./gweight.txt", 'r', encoding="utf-8") as file:
Expand Down Expand Up @@ -48,11 +49,11 @@
is_share = eval(is_share)
if "_CUDA_VISIBLE_DEVICES" in os.environ:
os.environ["CUDA_VISIBLE_DEVICES"] = os.environ["_CUDA_VISIBLE_DEVICES"]
is_half = eval(os.environ.get("is_half", "True"))
is_half = eval(os.environ.get("is_half", "True")) and not torch.backends.mps.is_available()
import gradio as gr
from transformers import AutoModelForMaskedLM, AutoTokenizer
import numpy as np
import librosa, torch
import librosa
from feature_extractor import cnhubert

cnhubert.cnhubert_base_path = cnhubert_base_path
Expand Down

0 comments on commit 83c9e8f

Please sign in to comment.