Spaces:
No application file
No application file
Update config.py
Browse files
config.py
CHANGED
|
@@ -155,33 +155,7 @@ class Config:
|
|
| 155 |
x_query = 5
|
| 156 |
x_center = 30
|
| 157 |
x_max = 32
|
| 158 |
-
|
| 159 |
-
logger.info("Use DirectML instead")
|
| 160 |
-
if (
|
| 161 |
-
os.path.exists(
|
| 162 |
-
"runtime\Lib\site-packages\onnxruntime\capi\DirectML.dll"
|
| 163 |
-
)
|
| 164 |
-
== False
|
| 165 |
-
):
|
| 166 |
-
try:
|
| 167 |
-
os.rename(
|
| 168 |
-
"runtime\Lib\site-packages\onnxruntime",
|
| 169 |
-
"runtime\Lib\site-packages\onnxruntime-cuda",
|
| 170 |
-
)
|
| 171 |
-
except:
|
| 172 |
-
pass
|
| 173 |
-
try:
|
| 174 |
-
os.rename(
|
| 175 |
-
"runtime\Lib\site-packages\onnxruntime-dml",
|
| 176 |
-
"runtime\Lib\site-packages\onnxruntime",
|
| 177 |
-
)
|
| 178 |
-
except:
|
| 179 |
-
pass
|
| 180 |
-
# if self.device != "cpu":
|
| 181 |
-
import torch_directml
|
| 182 |
-
|
| 183 |
-
self.device = torch_directml.device(torch_directml.default_device())
|
| 184 |
-
self.is_half = False
|
| 185 |
else:
|
| 186 |
if self.instead:
|
| 187 |
logger.info(f"Use {self.instead} instead")
|
|
|
|
| 155 |
x_query = 5
|
| 156 |
x_center = 30
|
| 157 |
x_max = 32
|
| 158 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
else:
|
| 160 |
if self.instead:
|
| 161 |
logger.info(f"Use {self.instead} instead")
|