Move ExecutionBlocker to a better location

This commit is contained in:
Jacob Segal 2023-09-20 19:49:17 -07:00
parent a2a537cde6
commit d233db0ef1
4 changed files with 10 additions and 8 deletions

View File

@ -164,3 +164,9 @@ class ExecutionList(TopologicalSort):
node_id = self.staged_node_id
self.pop_node(node_id)
self.staged_node_id = None
# Return this from a node and any users will be blocked with the given error message.
class ExecutionBlocker:
def __init__(self, message):
self.message = message

View File

@ -84,11 +84,6 @@ class GraphBuilder:
id = self.prefix + id
del self.nodes[id]
# Return this from a node and any users will be blocked with the given error message.
class ExecutionBlocker:
def __init__(self, message):
self.message = message
class Node:
def __init__(self, id, class_type, inputs):
self.id = id

View File

@ -1,4 +1,5 @@
from comfy.graph_utils import GraphBuilder, is_link, ExecutionBlocker
from comfy.graph_utils import GraphBuilder, is_link
from comfy.graph import ExecutionBlocker
NUM_FLOW_SOCKETS = 5
class WhileLoopOpen:

View File

@ -13,8 +13,8 @@ import nodes
import comfy.model_management
import comfy.graph_utils
from comfy.graph import get_input_info, ExecutionList, DynamicPrompt
from comfy.graph_utils import is_link, ExecutionBlocker, GraphBuilder
from comfy.graph import get_input_info, ExecutionList, DynamicPrompt, ExecutionBlocker
from comfy.graph_utils import is_link, GraphBuilder
from comfy.caching import HierarchicalCache, LRUCache, CacheKeySetInputSignature, CacheKeySetInputSignatureWithID, CacheKeySetID
class ExecutionResult(Enum):