mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-08 00:02:31 +08:00
prefetch: guard against no offload (#13703)
cast_ will return no stream if there is no work to do. guard against this is the consume logic.
This commit is contained in:
parent
c33d26c283
commit
c47633f3be
@ -37,6 +37,7 @@ def prefetch_queue_pop(queue, device, module):
|
|||||||
consumed = queue.pop(0)
|
consumed = queue.pop(0)
|
||||||
if consumed is not None:
|
if consumed is not None:
|
||||||
offload_stream, prefetch_state = consumed
|
offload_stream, prefetch_state = consumed
|
||||||
|
if offload_stream is not None:
|
||||||
offload_stream.wait_stream(comfy.model_management.current_stream(device))
|
offload_stream.wait_stream(comfy.model_management.current_stream(device))
|
||||||
_, comfy_modules = prefetch_state
|
_, comfy_modules = prefetch_state
|
||||||
if comfy_modules is not None:
|
if comfy_modules is not None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user