mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-25 17:24:07 +00:00
[Refactor] Move Widget.beforeQueued invocation from graphToPrompt to queuePrompt (#2667)
This commit is contained in:
@@ -15,14 +15,6 @@ export const graphToPrompt = async (
|
||||
const { sortNodes = false } = options
|
||||
|
||||
for (const outerNode of graph.computeExecutionOrder(false)) {
|
||||
if (outerNode.widgets) {
|
||||
for (const widget of outerNode.widgets) {
|
||||
// Allow widgets to run callbacks before a prompt has been queued
|
||||
// e.g. random seed before every gen
|
||||
widget.beforeQueued?.()
|
||||
}
|
||||
}
|
||||
|
||||
const innerNodes = outerNode.getInnerNodes
|
||||
? outerNode.getInnerNodes()
|
||||
: [outerNode]
|
||||
|
||||
Reference in New Issue
Block a user