Pārlūkot izejas kodu

enh: torch mps support

Timothy Jaeryang Baek 8 mēneši atpakaļ
vecāks
revīzija
d477f73c7e
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      backend/open_webui/env.py

+ 3 - 0
backend/open_webui/env.py

@@ -54,6 +54,9 @@ else:
     DEVICE_TYPE = "cpu"
 
 
+if torch.backends.mps.is_available() and torch.backends.mps.is_built():
+    DEVICE_TYPE = "mps"
+
 ####################################
 # LOGGING
 ####################################