Skip to content

Commit 1c3b651

Browse files
Refactor. (#12794)
1 parent 5073da5 commit 1c3b651

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy/ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def cast_bias_weight_with_vbar(s, dtype, device, bias_dtype, non_blocking, compu
8686
#a clone conservatively as we are mmapped and some SFT files are packed misaligned
8787
#If you are a custom node author reading this, please move your layer to the GPU
8888
#or declare your ModelPatcher as CPU in the first place.
89-
if device is not None and device.type == "cpu":
89+
if comfy.model_management.is_device_cpu(device):
9090
weight = s.weight.to(dtype=dtype, copy=True)
9191
if isinstance(weight, QuantizedTensor):
9292
weight = weight.dequantize()

0 commit comments

Comments
 (0)