Update config.py
Browse files
config.py
CHANGED
@@ -81,7 +81,7 @@ class Config:
|
|
81 |
or "1070" in self.gpu_name
|
82 |
or "1080" in self.gpu_name
|
83 |
):
|
84 |
-
print("16
|
85 |
self.is_half = False
|
86 |
config_file_change_fp32()
|
87 |
else:
|
@@ -99,12 +99,12 @@ class Config:
|
|
99 |
with open("trainset_preprocess_pipeline_print.py", "w") as f:
|
100 |
f.write(strr)
|
101 |
elif torch.backends.mps.is_available():
|
102 |
-
print("
|
103 |
self.device = "mps"
|
104 |
self.is_half = False
|
105 |
config_file_change_fp32()
|
106 |
else:
|
107 |
-
print("
|
108 |
self.device = "cpu"
|
109 |
self.is_half = False
|
110 |
config_file_change_fp32()
|
@@ -113,13 +113,13 @@ class Config:
|
|
113 |
self.n_cpu = cpu_count()
|
114 |
|
115 |
if self.is_half:
|
116 |
-
# 6G
|
117 |
x_pad = 3
|
118 |
x_query = 10
|
119 |
x_center = 60
|
120 |
x_max = 65
|
121 |
else:
|
122 |
-
# 5G
|
123 |
x_pad = 1
|
124 |
x_query = 6
|
125 |
x_center = 38
|
|
|
81 |
or "1070" in self.gpu_name
|
82 |
or "1080" in self.gpu_name
|
83 |
):
|
84 |
+
print("16 series/10 series graphics cards and P40 force single precision")
|
85 |
self.is_half = False
|
86 |
config_file_change_fp32()
|
87 |
else:
|
|
|
99 |
with open("trainset_preprocess_pipeline_print.py", "w") as f:
|
100 |
f.write(strr)
|
101 |
elif torch.backends.mps.is_available():
|
102 |
+
print("No supported N card found, use MPS for inference")
|
103 |
self.device = "mps"
|
104 |
self.is_half = False
|
105 |
config_file_change_fp32()
|
106 |
else:
|
107 |
+
print("No supported N card found, using CPU for inference")
|
108 |
self.device = "cpu"
|
109 |
self.is_half = False
|
110 |
config_file_change_fp32()
|
|
|
113 |
self.n_cpu = cpu_count()
|
114 |
|
115 |
if self.is_half:
|
116 |
+
# 6G video memory configuration
|
117 |
x_pad = 3
|
118 |
x_query = 10
|
119 |
x_center = 60
|
120 |
x_max = 65
|
121 |
else:
|
122 |
+
# 5G video memory configuration
|
123 |
x_pad = 1
|
124 |
x_query = 6
|
125 |
x_center = 38
|