mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-24 19:52:18 +08:00
Enable non blocking transfers in lowvram mode.
This commit is contained in:
parent
6d23fd0618
commit
acc2ed8389
@ -34,7 +34,7 @@ def cast_bias_weight(s, input=None, dtype=None, device=None):
|
|||||||
device = input.device
|
device = input.device
|
||||||
|
|
||||||
bias = None
|
bias = None
|
||||||
non_blocking = comfy.model_management.device_should_use_non_blocking(device)
|
non_blocking = comfy.model_management.device_supports_non_blocking(device)
|
||||||
if s.bias is not None:
|
if s.bias is not None:
|
||||||
bias = cast_to(s.bias, dtype, device, non_blocking=non_blocking)
|
bias = cast_to(s.bias, dtype, device, non_blocking=non_blocking)
|
||||||
if s.bias_function is not None:
|
if s.bias_function is not None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user