mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-25 22:00:19 +08:00
mm: default to 0 for NUM_STREAMS
Dont count the compute stream as an offload stream. This makes async offload accounting easier.
This commit is contained in:
parent
c38e7d6599
commit
104a5a7c0a
@ -1012,7 +1012,7 @@ def force_channels_last():
|
|||||||
|
|
||||||
|
|
||||||
STREAMS = {}
|
STREAMS = {}
|
||||||
NUM_STREAMS = 1
|
NUM_STREAMS = 0
|
||||||
if args.async_offload:
|
if args.async_offload:
|
||||||
NUM_STREAMS = 2
|
NUM_STREAMS = 2
|
||||||
logging.info("Using async weight offloading with {} streams".format(NUM_STREAMS))
|
logging.info("Using async weight offloading with {} streams".format(NUM_STREAMS))
|
||||||
@ -1030,7 +1030,7 @@ def current_stream(device):
|
|||||||
stream_counters = {}
|
stream_counters = {}
|
||||||
def get_offload_stream(device):
|
def get_offload_stream(device):
|
||||||
stream_counter = stream_counters.get(device, 0)
|
stream_counter = stream_counters.get(device, 0)
|
||||||
if NUM_STREAMS <= 1:
|
if NUM_STREAMS == 0:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if device in STREAMS:
|
if device in STREAMS:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user