fix cpu+fp16 inference issue

fix cpu+fp16 inference issue
This commit is contained in:
RVC-Boss
2024-08-01 21:47:30 +08:00
committed by GitHub
parent 9498fc775b
commit bce451a2d1
3 changed files with 8 additions and 6 deletions

View File

@@ -10,11 +10,12 @@ 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"))
import torch
is_half = eval(os.environ.get("is_half", "True")) and torch.cuda.is_available()
import pdb,traceback,numpy as np,logging
from scipy.io import wavfile
import librosa,torch
import librosa
now_dir = os.getcwd()
sys.path.append(now_dir)
from tools.my_utils import load_audio