From b830297b9e6f7d384574b9fa3dfcfff01759f287 Mon Sep 17 00:00:00 2001 From: Florian Agsteiner Date: Wed, 12 Aug 2026 15:43:40 +0200 Subject: [PATCH] Update comfy/ops.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- comfy/ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/ops.py b/comfy/ops.py index 0a4b42947..4ef716ee9 100644 --- a/comfy/ops.py +++ b/comfy/ops.py @@ -1203,7 +1203,7 @@ def _load_quantized_module(module, super_load, state_dict, prefix, local_metadat raise ValueError(f"Missing W4A8 group scale (weight_s_rel) for layer {layer_name}") if scale.dtype == torch.uint8: scale = scale.view(torch.float8_e4m3fn) - if comfy.model_management.get_torch_device().type == "mps": + if device.type == "mps": # MPS has no fp8 casts at all, so the eager dequant path dies on # s_rel.float(). fp32 is the only other dtype the eager backend # declares for s_rel, so fp16 is not an option here.