PhoenixStormJr commited on
Commit
35d8b90
·
verified ·
1 Parent(s): 683098e

Update infer_batch_rvc.py

Browse files
Files changed (1) hide show
  1. infer_batch_rvc.py +5 -5
infer_batch_rvc.py CHANGED
@@ -36,7 +36,7 @@ class Config:
36
  or "1070" in self.gpu_name
37
  or "1080" in self.gpu_name
38
  ):
39
- print("16/10系显卡和P40强制单精度")
40
  self.is_half = False
41
  for config_file in ["32k.json", "40k.json", "48k.json"]:
42
  with open(f"configs/{config_file}", "r") as f:
@@ -62,10 +62,10 @@ class Config:
62
  with open("trainset_preprocess_pipeline_print.py", "w") as f:
63
  f.write(strr)
64
  elif torch.backends.mps.is_available():
65
- print("没有发现支持的N, 使用MPS进行推理")
66
  self.device = "mps"
67
  else:
68
- print("没有发现支持的N, 使用CPU进行推理")
69
  self.device = "cpu"
70
  self.is_half = True
71
 
@@ -73,13 +73,13 @@ class Config:
73
  self.n_cpu = cpu_count()
74
 
75
  if self.is_half:
76
- # 6G显存配置
77
  x_pad = 3
78
  x_query = 10
79
  x_center = 60
80
  x_max = 65
81
  else:
82
- # 5G显存配置
83
  x_pad = 1
84
  x_query = 6
85
  x_center = 38
 
36
  or "1070" in self.gpu_name
37
  or "1080" in self.gpu_name
38
  ):
39
+ print("16 series/10 series graphics cards and P40 force single precision")
40
  self.is_half = False
41
  for config_file in ["32k.json", "40k.json", "48k.json"]:
42
  with open(f"configs/{config_file}", "r") as f:
 
62
  with open("trainset_preprocess_pipeline_print.py", "w") as f:
63
  f.write(strr)
64
  elif torch.backends.mps.is_available():
65
+ print("No supported N card found, use MPS for inference")
66
  self.device = "mps"
67
  else:
68
+ print("No supported N card found, using CPU for inference")
69
  self.device = "cpu"
70
  self.is_half = True
71
 
 
73
  self.n_cpu = cpu_count()
74
 
75
  if self.is_half:
76
+ # 6G video memory configuration
77
  x_pad = 3
78
  x_query = 10
79
  x_center = 60
80
  x_max = 65
81
  else:
82
+ # 5G video memory configuration
83
  x_pad = 1
84
  x_query = 6
85
  x_center = 38