From 07286a5daec7f038feb6602d1bd691e09448b405 Mon Sep 17 00:00:00 2001 From: Shaun Johnston Date: Sun, 28 Dec 2025 06:10:42 +1000 Subject: [PATCH] fix downstream slot problem with edit node --- js/friendly_pipe.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/js/friendly_pipe.js b/js/friendly_pipe.js index 30e203a..be418e1 100644 --- a/js/friendly_pipe.js +++ b/js/friendly_pipe.js @@ -252,6 +252,16 @@ function notifyDownstreamNodes(node, slotIndex, visited = new Set(), depth = 0) const graph = node.graph || app.graph; + console.log("[FriendlyPipe] notifyDownstreamNodes called:", { + nodeType: node.type, + nodeId: node.id, + slotIndex, + depth, + hasOutputs: !!node.outputs, + outputSlot: node.outputs?.[slotIndex], + links: node.outputs?.[slotIndex]?.links + }); + if (!node.outputs || !node.outputs[slotIndex] || !node.outputs[slotIndex].links) return; for (const linkId of node.outputs[slotIndex].links) { @@ -261,6 +271,12 @@ function notifyDownstreamNodes(node, slotIndex, visited = new Set(), depth = 0) const targetNode = graph.getNodeById(link.target_id); if (!targetNode) continue; + console.log("[FriendlyPipe] Found target node:", { + targetType: targetNode.type, + targetId: targetNode.id, + hasSyncWithSource: !!targetNode.syncWithSource + }); + // Prevent infinite loops const nodeKey = `${targetNode.id}-${graph.id || 'main'}`; if (visited.has(nodeKey)) continue; @@ -268,6 +284,7 @@ function notifyDownstreamNodes(node, slotIndex, visited = new Set(), depth = 0) // If target has syncWithSource, call it if (targetNode.syncWithSource) { + console.log("[FriendlyPipe] Calling syncWithSource on", targetNode.type, targetNode.id); targetNode.syncWithSource(); }