Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Aug 23, 2024
1 parent 2c1d237 commit 5d8bbb7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions comfy/model_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ class CPUState(Enum):
xpu_available = False
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)
xpu_available = xpu_available and torch.xpu.is_available()
xpu_available = (int(torch_version[0]) < 2 or (int(torch_version[0]) == 2 and int(torch_version[2]) <= 4)) and torch.xpu.is_available()
except:
pass

Expand Down

0 comments on commit 5d8bbb7

Please sign in to comment.