1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-03 07:26:31 +08:00

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

@@ -64,6 +64,10 @@ if __name__ == "__main__":
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda_device)
print("Set cuda device to:", args.cuda_device)
if args.deterministic:
if 'CUBLAS_WORKSPACE_CONFIG' not in os.environ:
os.environ['CUBLAS_WORKSPACE_CONFIG'] = ":4096:8"
import cuda_malloc
import comfy.utils