Merge af364358bedea07d7851613bbe9fef2a1b72bb40 into 836bfec1fbf7356d59bd2dbe3883997646554e20

This commit is contained in:
Zzzyt 2024-06-28 15:41:14 +08:00 committed by GitHub
commit 75453e82ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 33 additions and 34 deletions

View File

@ -25,11 +25,9 @@ import torch
infer_ttswebui = os.environ.get("infer_ttswebui", 9872)
infer_ttswebui = int(infer_ttswebui)
is_share = os.environ.get("is_share", "False")
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")) and torch.cuda.is_available()
from config import is_half,is_share
gpt_path = os.environ.get("gpt_path", None)
sovits_path = os.environ.get("sovits_path", None)
cnhubert_base_path = os.environ.get("cnhubert_base_path", None)

View File

@ -10,7 +10,7 @@ all_parts = os.environ.get("all_parts")
os.environ["CUDA_VISIBLE_DEVICES"] = os.environ.get("_CUDA_VISIBLE_DEVICES")
opt_dir = os.environ.get("opt_dir")
bert_pretrained_dir = os.environ.get("bert_pretrained_dir")
is_half = eval(os.environ.get("is_half", "True"))
from config import is_half
import sys, numpy as np, traceback, pdb
import os.path
from glob import glob

View File

@ -10,7 +10,7 @@ os.environ["CUDA_VISIBLE_DEVICES"]= os.environ.get("_CUDA_VISIBLE_DEVICES")
from feature_extractor import cnhubert
opt_dir= os.environ.get("opt_dir")
cnhubert.cnhubert_base_path= os.environ.get("cnhubert_base_dir")
is_half=eval(os.environ.get("is_half","True"))
from config import is_half
import pdb,traceback,numpy as np,logging
from scipy.io import wavfile

View File

@ -8,7 +8,7 @@ os.environ["CUDA_VISIBLE_DEVICES"] = os.environ.get("_CUDA_VISIBLE_DEVICES")
opt_dir = os.environ.get("opt_dir")
pretrained_s2G = os.environ.get("pretrained_s2G")
s2config_path = os.environ.get("s2config_path")
is_half = eval(os.environ.get("is_half", "True"))
from config import is_half
import math, traceback
import multiprocessing
import sys, pdb

View File

@ -42,6 +42,7 @@ if infer_device == "cuda":
is_half=False
if(infer_device=="cpu"):is_half=False
if(torch.backends.mps.is_available()):is_half=False
class Config:
def __init__(self):