From 654458e7ecf9142f8064e05efa6375e2637ba471 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sun, 14 Jan 2024 17:26:54 +0200 Subject: [PATCH] Update nodes.py --- nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index 3d7344f..70697f9 100644 --- a/nodes.py +++ b/nodes.py @@ -55,7 +55,7 @@ class CCSR_Upscale: comfy.model_management.unload_all_models() device = comfy.model_management.get_torch_device() config_path = os.path.join(script_directory, "configs/model/ccsr_stage2.yaml") - dtype = torch.float16 if comfy.model_management.should_use_fp16() else torch.float32 + dtype = torch.float16 if comfy.model_management.should_use_fp16() and not comfy.model_management.is_device_mps(device) else torch.float32 if not hasattr(self, "model") or self.model is None: config = OmegaConf.load(config_path)