From 3367362cec4e08835614a1604e13d8143767938c Mon Sep 17 00:00:00 2001 From: doctorpangloss <@hiddenswitch.com> Date: Thu, 8 Feb 2024 10:17:49 -0800 Subject: [PATCH] Fix directml again now that I understand what the command line is doing --- comfy/cli_args.py | 1 + comfy/model_management.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/comfy/cli_args.py b/comfy/cli_args.py index e8e62c3d0..3f66fb856 100644 --- a/comfy/cli_args.py +++ b/comfy/cli_args.py @@ -119,6 +119,7 @@ parser.add_argument("--plausible-analytics-domain", required=False, help="Specifies the domain name for analytics events.") parser.add_argument("--analytics-use-identity-provider", action="store_true", help="Uses platform identifiers for unique visitor analytics.") + if options.args_parsing: args, _ = parser.parse_known_args() else: diff --git a/comfy/model_management.py b/comfy/model_management.py index 0325cc48b..20d3ed705 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -37,7 +37,7 @@ if args.deterministic: torch.use_deterministic_algorithms(True, warn_only=True) directml_enabled = False -if args.directml: +if args.directml is not None: import torch_directml directml_enabled = True device_index = args.directml