mirror of
https://github.com/vladmandic/automatic
synced 2026-09-08 22:08:42 +02:00
11 lines
430 B
Python
11 lines
430 B
Python
import platform
|
|
import torch
|
|
from modules import shared, devices
|
|
|
|
|
|
def initialize_zluda():
|
|
if platform.system() == "Windows" and devices.cuda_ok and torch.cuda.get_device_name(devices.get_optimal_device()).endswith("[ZLUDA]"):
|
|
torch.backends.cudnn.enabled = False
|
|
if shared.opts.cross_attention_optimization == "Scaled-Dot-Product":
|
|
shared.opts.cross_attention_optimization = "Batch matrix-matrix"
|