Pendrokar commited on
Commit
13db872
β€’
1 Parent(s): c79df46

rm a DirectX lib import

Browse files
Files changed (1) hide show
  1. server.py +1 -11
server.py CHANGED
@@ -94,17 +94,7 @@ if __name__ == '__main__':
94
  pass
95
 
96
  if CPU_ONLY:
97
- try:
98
- import torch_directml
99
- torch_dml_device = torch_directml.device()
100
- logger.info("Successfully got the torch DirectML device")
101
- except Exception as e:
102
- # I've implemented support for DirectML, but at the time of writing (08/04/2023, v0.1.13.1.dev230301), it's hella broken...
103
- # Not a single model can successfully .forward() when switching to DirectML device from cpu. I'm leaving in the code however,
104
- # as I'd still like to add support for it once things are more stable. This try/catch should run ok when it's installed
105
- torch_dml_device = torch.device("cpu")
106
- logger.exception("Failed to get torch DirectML; falling back to cpu device")
107
- # ========================
108
 
109
 
110
  try:
 
94
  pass
95
 
96
  if CPU_ONLY:
97
+ torch_dml_device = torch.device("cpu")
 
 
 
 
 
 
 
 
 
 
98
 
99
 
100
  try: