Add --deterministic option to make pytorch use deterministic algorithms.

This commit is contained in:
comfyanonymous
2023-12-17 16:59:21 -05:00
parent a036b94075
commit 2f9d6a97ec
3 changed files with 9 additions and 1 deletions

View File

@@ -28,6 +28,10 @@ total_vram = 0
lowvram_available = True
xpu_available = False
if args.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