Update nodes.py

This commit is contained in:
kijai
2024-01-14 17:16:40 +02:00
parent c71e470a11
commit cb2fb5fc56
+1 -1
View File
@@ -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(