From 18885f803a46adfe56b8fa0379e899e99fb286ab Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 19 Jul 2023 03:08:30 -0400 Subject: [PATCH 1/3] Add MX450 and MX550 to list of cards with broken fp16. --- comfy/model_management.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index 34d22429a..273dcb0c8 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -529,7 +529,7 @@ def should_use_fp16(device=None, model_params=0): return False #FP16 is just broken on these cards - nvidia_16_series = ["1660", "1650", "1630", "T500", "T550", "T600"] + nvidia_16_series = ["1660", "1650", "1630", "T500", "T550", "T600", "MX550", "MX450"] for x in nvidia_16_series: if x in props.name: return False From e032ca613859695ae1153987c6266e77d5411deb Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 19 Jul 2023 10:16:00 -0400 Subject: [PATCH 2/3] Fix ddim issue with older torch versions. --- comfy/k_diffusion/external.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/comfy/k_diffusion/external.py b/comfy/k_diffusion/external.py index 7335d56c4..c1a137d9c 100644 --- a/comfy/k_diffusion/external.py +++ b/comfy/k_diffusion/external.py @@ -91,7 +91,9 @@ class DiscreteSchedule(nn.Module): return log_sigma.exp() def predict_eps_discrete_timestep(self, input, t, **kwargs): - sigma = self.t_to_sigma(t.round()) + if t.dtype != torch.int64 and t.dtype != torch.int32: + t = t.round() + sigma = self.t_to_sigma(t) input = input * ((utils.append_dims(sigma, input.ndim) ** 2 + 1.0) ** 0.5) return (input - self(input, sigma, **kwargs)) / utils.append_dims(sigma, input.ndim) From 0b284f650bbdf6daf1fec039c0eb45602aee669d Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 19 Jul 2023 10:20:32 -0400 Subject: [PATCH 3/3] Fix typo. --- comfy/cli_args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/cli_args.py b/comfy/cli_args.py index 29e5fb159..dc1597d88 100644 --- a/comfy/cli_args.py +++ b/comfy/cli_args.py @@ -42,7 +42,7 @@ parser.add_argument("--auto-launch", action="store_true", help="Automatically la parser.add_argument("--cuda-device", type=int, default=None, metavar="DEVICE_ID", help="Set the id of the cuda device this instance will use.") cm_group = parser.add_mutually_exclusive_group() cm_group.add_argument("--cuda-malloc", action="store_true", help="Enable cudaMallocAsync (enabled by default for torch 2.0 and up).") -cm_group.add_argument("--disable-cuda-malloc", action="store_true", help="Enable cudaMallocAsync.") +cm_group.add_argument("--disable-cuda-malloc", action="store_true", help="Disable cudaMallocAsync.") parser.add_argument("--dont-upcast-attention", action="store_true", help="Disable upcasting of attention. Can boost speed but increase the chances of black images.")