MCPcopy Create free account
hub / github.com/DanielPFlorian/ComfyUI-WorkflowGenerator / __init__

Method __init__

utils/workflow_layout.py:19–29  ·  view source on GitHub ↗

Initialize layout engine. Args: nodes: List of node dictionaries links: List of link arrays [id, src_id, src_slot, dst_id, dst_slot, type]

(self, nodes: list[dict], links: list[list])

Source from the content-addressed store, hash-verified

17 NODE_SEP = 150 # Vertical spacing between nodes
18
19 def __init__(self, nodes: list[dict], links: list[list]):
20 """
21 Initialize layout engine.
22
23 Args:
24 nodes: List of node dictionaries
25 links: List of link arrays [id, src_id, src_slot, dst_id, dst_slot, type]
26 """
27 self.nodes = nodes
28 self.links = links
29 self.node_map = {node["id"]: node for node in nodes}
30
31 def apply_layout(self):
32 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected