mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix next node calling logic
This commit is contained in:
parent
82957bb826
commit
8edc25d35a
@ -79,14 +79,10 @@ class DefaultSessionRunner(SessionRunnerBase):
|
|||||||
raise ValueError("Queue item has no session")
|
raise ValueError("Queue item has no session")
|
||||||
invocation = None
|
invocation = None
|
||||||
# Loop over invocations until the session is complete or canceled
|
# Loop over invocations until the session is complete or canceled
|
||||||
while self.next_invocation(invocation, queue_item, self.cancel_event) and not self.cancel_event.is_set():
|
invocation = self.next_invocation(invocation, queue_item, self.cancel_event)
|
||||||
# Prepare the next node
|
while invocation is not None and not self.cancel_event.is_set():
|
||||||
invocation = queue_item.session.next()
|
|
||||||
if invocation is None:
|
|
||||||
# If there are no more invocations, complete the graph
|
|
||||||
break
|
|
||||||
# Build invocation context (the node-facing API
|
|
||||||
self.run_node(invocation.id, queue_item)
|
self.run_node(invocation.id, queue_item)
|
||||||
|
invocation = self.next_invocation(invocation, queue_item, self.cancel_event)
|
||||||
self.complete(queue_item)
|
self.complete(queue_item)
|
||||||
|
|
||||||
def complete(self, queue_item: SessionQueueItem):
|
def complete(self, queue_item: SessionQueueItem):
|
||||||
|
Loading…
Reference in New Issue
Block a user