1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00
This commit is contained in:
comfyanonymous
2024-08-30 12:48:42 -04:00
parent e91662e784
commit 935ae153e1
2 changed files with 3 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ cpu_state = CPUState.GPU
total_vram = 0
xpu_available = False
torch_version = ""
try:
torch_version = torch.version.__version__
xpu_available = (int(torch_version[0]) < 2 or (int(torch_version[0]) == 2 and int(torch_version[2]) <= 4)) and torch.xpu.is_available()