Skip to content

Commit 4b75528

Browse files
[fix] Fix graph configuration callbacks not reaching subgraph nodes (#4572)
1 parent dd14144 commit 4b75528

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/scripts/app.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -752,16 +752,12 @@ export class ComfyApp {
752752
fixLinkInputSlots(this)
753753

754754
// Fire callbacks before the onConfigure, this is used by widget inputs to setup the config
755-
for (const node of graph.nodes) {
756-
node.onGraphConfigured?.()
757-
}
755+
triggerCallbackOnAllNodes(this, 'onGraphConfigured')
758756

759757
const r = onConfigure?.apply(this, args)
760758

761759
// Fire after onConfigure, used by primitives to generate widget using input nodes config
762-
for (const node of graph.nodes) {
763-
node.onAfterGraphConfigured?.()
764-
}
760+
triggerCallbackOnAllNodes(this, 'onAfterGraphConfigured')
765761

766762
return r
767763
}

0 commit comments

Comments
 (0)