Update ops.py

This commit is contained in:
comfyanonymous 2024-08-18 14:34:03 -04:00 committed by GitHub
parent 6afde26cf3
commit 64937567ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,6 @@ import comfy.model_management
def cast_to(weight, dtype=None, device=None, non_blocking=False): def cast_to(weight, dtype=None, device=None, non_blocking=False):
if dtype == torch.float32:
non_blocking = False non_blocking = False
return weight.to(device=device, dtype=dtype, non_blocking=non_blocking) return weight.to(device=device, dtype=dtype, non_blocking=non_blocking)