better caster (#1480)

related to mps/rocm/cpu casting for fp16 and etc on clip
This commit is contained in:
lllyasviel
2023-12-17 17:09:15 -08:00
committed by GitHub
parent 69a23c4d60
commit 0e1aa8d084
6 changed files with 63 additions and 64 deletions
+4
View File
@@ -28,6 +28,10 @@ total_vram = 0
lowvram_available = True
xpu_available = False
if args.pytorch_deterministic:
print("Using deterministic algorithms for pytorch")
torch.use_deterministic_algorithms(True, warn_only=True)
directml_enabled = False
if args.directml is not None:
import torch_directml