From 5c781dfd98d532042a40cb1e5e795cd7294a41e4 Mon Sep 17 00:00:00 2001 From: Rattus Date: Tue, 9 Dec 2025 08:32:14 +1000 Subject: [PATCH] Handle the None case for the dtype There are paths where this can be None. Default to fp32 in that case. --- comfy/model_patcher.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/comfy/model_patcher.py b/comfy/model_patcher.py index 8b5edeb52..8bddcaf23 100644 --- a/comfy/model_patcher.py +++ b/comfy/model_patcher.py @@ -139,6 +139,8 @@ def low_vram_patch_estimate_vram(model, key): if weight is None: return 0 model_dtype = getattr(model, "manual_cast_dtype", torch.float32) + if model_dtype is None: + model_dtype = torch.float32 return weight.numel() * model_dtype.itemsize * LOWVRAM_PATCH_ESTIMATE_MATH_FACTOR def get_key_weight(model, key):