Skip to content

Commit

Permalink
Fix for non-AMD GPUs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lshqqytiger committed Feb 11, 2023
1 parent 72989e8 commit f69f079
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import contextlib
import torch
import torch_directml
from modules import errors, atiadlxx
from modules import errors
from modules.sd_hijack_utils import CondFunc
from packaging import version
from functools import reduce
Expand Down Expand Up @@ -98,6 +98,7 @@ def enable_tf32():
try:
dml = torch_directml.device(torch_directml.default_device())
if dml.type == "privateuseone" and "AMD" in torch_directml.device_name(dml.index):
from modules import atiadlxx
adl = atiadlxx.ATIADLxx()
hMEM = adl.getMemoryInfo2(0).iHyperMemorySize
else:
Expand Down

0 comments on commit f69f079

Please sign in to comment.