mirror of
https://github.com/open-webui/open-webui
synced 2025-03-16 10:28:28 +00:00
refac
This commit is contained in:
parent
d477f73c7e
commit
a4132322d9
@ -53,9 +53,11 @@ if USE_CUDA.lower() == "true":
|
|||||||
else:
|
else:
|
||||||
DEVICE_TYPE = "cpu"
|
DEVICE_TYPE = "cpu"
|
||||||
|
|
||||||
|
try:
|
||||||
if torch.backends.mps.is_available() and torch.backends.mps.is_built():
|
if torch.backends.mps.is_available() and torch.backends.mps.is_built():
|
||||||
DEVICE_TYPE = "mps"
|
DEVICE_TYPE = "mps"
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
# LOGGING
|
# LOGGING
|
||||||
|
Loading…
Reference in New Issue
Block a user