We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5073da5 commit 1c3b651Copy full SHA for 1c3b651
comfy/ops.py
@@ -86,7 +86,7 @@ def cast_bias_weight_with_vbar(s, dtype, device, bias_dtype, non_blocking, compu
86
#a clone conservatively as we are mmapped and some SFT files are packed misaligned
87
#If you are a custom node author reading this, please move your layer to the GPU
88
#or declare your ModelPatcher as CPU in the first place.
89
- if device is not None and device.type == "cpu":
+ if comfy.model_management.is_device_cpu(device):
90
weight = s.weight.to(dtype=dtype, copy=True)
91
if isinstance(weight, QuantizedTensor):
92
weight = weight.dequantize()
0 commit comments