mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-28 23:30:16 +08:00
Fix execution context interaction
This commit is contained in:
parent
cac6690481
commit
73a11c0dbb
@ -18,7 +18,10 @@ _empty_execution_context = ExecutionContext(ServerStub())
|
|||||||
|
|
||||||
|
|
||||||
def current_execution_context() -> ExecutionContext:
|
def current_execution_context() -> ExecutionContext:
|
||||||
return _current_context.get()
|
try:
|
||||||
|
return _current_context.get()
|
||||||
|
except LookupError:
|
||||||
|
return _empty_execution_context
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user