diff --git a/nodes.py b/nodes.py index 2e57bd9..3d7344f 100644 --- a/nodes.py +++ b/nodes.py @@ -91,7 +91,7 @@ class CCSR_Upscale: height, width = resized_image.size(-2), resized_image.size(-1) shape = (1, 4, height // 8, width // 8) x_T = torch.randn(shape, device=self.model.device, dtype=dtype) - autocast_condition = dtype == torch.float16 or not comfy.model_management.is_device_mps(device) + autocast_condition = dtype == torch.float16 and not comfy.model_management.is_device_mps(device) with torch.autocast(comfy.model_management.get_autocast_device(device), dtype=dtype) if autocast_condition else nullcontext(): if not tiled: samples = sampler.sample_ccsr(