mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-05 13:56:13 +02: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,7 +37,8 @@ def prefetch_queue_pop(queue, device, module):
|
||||
consumed = queue.pop(0)
|
||||
if consumed is not None:
|
||||
offload_stream, prefetch_state = consumed
|
||||
offload_stream.wait_stream(comfy.model_management.current_stream(device))
|
||||
if offload_stream is not None:
|
||||
offload_stream.wait_stream(comfy.model_management.current_stream(device))
|
||||
_, comfy_modules = prefetch_state
|
||||
if comfy_modules is not None:
|
||||
cleanup_prefetched_modules(comfy_modules)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user