Support associated socket for widgets (#3326)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-04-06 11:50:21 -04:00
committed by GitHub
parent 6eb2b76621
commit ac53296b2e
41 changed files with 212 additions and 534 deletions

View File

@@ -38,6 +38,13 @@ export const graphToPrompt = async (
}
}
// Remove all unconnected widget input slots
for (const node of workflow.nodes) {
node.inputs = node.inputs?.filter(
(input) => !(input.widget && input.link === null)
)
}
const output: ComfyApiWorkflow = {}
// Process nodes in order of execution
for (const outerNode of graph.computeExecutionOrder(false)) {