mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-08 15:37:46 +08:00
Merge b73dd32462 into b08debceca
This commit is contained in:
commit
ccae3939d6
@ -317,7 +317,10 @@ def cast_bias_weight(s, input=None, dtype=None, device=None, bias_dtype=None, of
|
||||
prefetched = hasattr(s, "_prefetch")
|
||||
offload_stream = None
|
||||
offload_device = None
|
||||
if not prefetched:
|
||||
# comfy_aimdo is only registered for CUDA / ROCm backends. On MPS (and
|
||||
# CPU) we have to skip the vbar fast path and fall back to the plain
|
||||
# cast in resolve_cast_module_with_vbar below.
|
||||
if not prefetched and device.type not in ("cpu", "mps"):
|
||||
offload_stream = cast_modules_with_vbar([s], dtype, device, bias_dtype, non_blocking)
|
||||
comfy.model_management.sync_stream(device, offload_stream)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user