mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
Add subgraph nodes to before/after exec
This commit is contained in:
@@ -1246,6 +1246,9 @@ export class ComfyApp {
|
|||||||
// Allow widgets to run callbacks before a prompt has been queued
|
// Allow widgets to run callbacks before a prompt has been queued
|
||||||
// e.g. random seed before every gen
|
// e.g. random seed before every gen
|
||||||
executeWidgetsCallback(this.graph.nodes, 'beforeQueued')
|
executeWidgetsCallback(this.graph.nodes, 'beforeQueued')
|
||||||
|
for (const subgraph of this.graph.subgraphs.values()) {
|
||||||
|
executeWidgetsCallback(subgraph.nodes, 'beforeQueued')
|
||||||
|
}
|
||||||
|
|
||||||
const p = await this.graphToPrompt(this.graph, { queueNodeIds })
|
const p = await this.graphToPrompt(this.graph, { queueNodeIds })
|
||||||
try {
|
try {
|
||||||
@@ -1291,6 +1294,10 @@ export class ComfyApp {
|
|||||||
.filter((n) => !!n),
|
.filter((n) => !!n),
|
||||||
'afterQueued'
|
'afterQueued'
|
||||||
)
|
)
|
||||||
|
for (const subgraph of this.graph.subgraphs.values()) {
|
||||||
|
executeWidgetsCallback(subgraph.nodes, 'afterQueued')
|
||||||
|
}
|
||||||
|
|
||||||
this.canvas.draw(true, true)
|
this.canvas.draw(true, true)
|
||||||
await this.ui.queue.update()
|
await this.ui.queue.update()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user