macOS fix

pull/15/head
MMqd 2023-08-21 23:58:54 -04:00
parent b6b32f6e07
commit b5d9c7d04f
1 changed files with 6 additions and 3 deletions

View File

@ -232,9 +232,12 @@ class AbstractModel():
p.sd_model_hash = self.sd_checkpoint_info.sd_model_hash
if version.parse(torch.version.cuda) < version.parse("10.2"):
torch.use_deterministic_algorithms(True)
else:
try:
if version.parse(torch.version.cuda) < version.parse("10.2"):
torch.use_deterministic_algorithms(True)
else:
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8"
except:
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8"
if p.init_image is not None: