mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-14 16:20:50 +08:00
17 lines
730 B
Python
17 lines
730 B
Python
import torch
|
|
|
|
if torch.cuda.get_device_name().endswith("[ZLUDA]"):
|
|
print(" ")
|
|
print("***----------------------ZLUDA-----------------------------***")
|
|
print(" :: ZLUDA detected, disabling non-supported functions.")
|
|
torch.backends.cudnn.enabled = False
|
|
print(" :: CuDNN, flash_sdp, math_sdp, mem_efficient_sdp disabled) ")
|
|
torch.backends.cuda.enable_flash_sdp(False)
|
|
torch.backends.cuda.enable_math_sdp(True)
|
|
torch.backends.cuda.enable_mem_efficient_sdp(False)
|
|
print("***--------------------------------------------------------***")
|
|
print(" :: Device:", torch.cuda.get_device_name())
|
|
print(" ")
|
|
else:
|
|
print(" :: ZLUDA isn't detected, please try patching it.")
|