mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-06 19:42:34 +08:00
fixes to pinning rework
This commit is contained in:
parent
46f9ac1967
commit
74584f69c6
@ -96,7 +96,6 @@ def cast_bias_weight_with_vbar(s, dtype, device, bias_dtype, non_blocking, compu
|
|||||||
pin = comfy.pinned_memory.get_pin(s)
|
pin = comfy.pinned_memory.get_pin(s)
|
||||||
if pin is not None:
|
if pin is not None:
|
||||||
xfer_source = [ pin ]
|
xfer_source = [ pin ]
|
||||||
resident = True #If pinned data exists, it always has LowVram already applied
|
|
||||||
else:
|
else:
|
||||||
for data, geometry in zip([ s.weight, s.bias ], cast_geometry):
|
for data, geometry in zip([ s.weight, s.bias ], cast_geometry):
|
||||||
if data is None:
|
if data is None:
|
||||||
@ -127,7 +126,7 @@ def cast_bias_weight_with_vbar(s, dtype, device, bias_dtype, non_blocking, compu
|
|||||||
|
|
||||||
if pin is not None:
|
if pin is not None:
|
||||||
comfy.model_management.cast_to_gathered(xfer_source, pin)
|
comfy.model_management.cast_to_gathered(xfer_source, pin)
|
||||||
xfer_srouce = [ pin ]
|
xfer_source = [ pin ]
|
||||||
#send it over
|
#send it over
|
||||||
comfy.model_management.cast_to_gathered(xfer_source, xfer_dest, non_blocking=non_blocking, stream=offload_stream)
|
comfy.model_management.cast_to_gathered(xfer_source, xfer_dest, non_blocking=non_blocking, stream=offload_stream)
|
||||||
comfy.model_management.sync_stream(device, offload_stream)
|
comfy.model_management.sync_stream(device, offload_stream)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user