mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 06:19:58 +00:00
Fix a bug that prevented subgraph reuse (#1103)
This commit is contained in:
@@ -278,7 +278,7 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
|
||||
/** The list of nodes to add to. */
|
||||
nodes: ExecutableLGraphNode[] = [],
|
||||
/** The set of visited nodes. */
|
||||
visited = new WeakSet<SubgraphNode>(),
|
||||
visited = new Set<SubgraphNode>(),
|
||||
/** The path of subgraph node IDs. */
|
||||
subgraphNodePath: readonly NodeId[] = [],
|
||||
): ExecutableLGraphNode[] {
|
||||
@@ -289,7 +289,7 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
|
||||
|
||||
for (const node of this.subgraph.nodes) {
|
||||
if ("getInnerNodes" in node) {
|
||||
node.getInnerNodes(nodes, visited, subgraphInstanceIdPath)
|
||||
node.getInnerNodes(nodes, new Set(visited), subgraphInstanceIdPath)
|
||||
} else {
|
||||
// Create minimal DTOs rather than cloning the node
|
||||
const aVeryRealNode = new ExecutableNodeDTO(node, subgraphInstanceIdPath, this)
|
||||
|
||||
Reference in New Issue
Block a user