mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 21:05:19 +00:00
fix: torch mps not working
Co-Authored-By: Rich Tong <1782087+richtong@users.noreply.github.com>
This commit is contained in:
parent
15a182c9d6
commit
960683eced
1 changed files with 2 additions and 0 deletions
|
|
@ -54,6 +54,8 @@ else:
|
||||||
DEVICE_TYPE = "cpu"
|
DEVICE_TYPE = "cpu"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import torch
|
||||||
|
|
||||||
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:
|
except Exception:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue