diff --git a/comfy/ops.py b/comfy/ops.py index 4690b48bd..139307cfe 100644 --- a/comfy/ops.py +++ b/comfy/ops.py @@ -21,7 +21,7 @@ import comfy.model_management def cast_to(weight, dtype=None, device=None, non_blocking=False): - if weight.dtype == torch.float32: + if dtype == torch.float32: non_blocking = False return weight.to(device=device, dtype=dtype, non_blocking=non_blocking)