|
|
@ -617,6 +617,10 @@ class ComfyApp { |
|
|
|
|
|
|
|
|
|
|
|
api.addEventListener("executed", ({ detail }) => { |
|
|
|
api.addEventListener("executed", ({ detail }) => { |
|
|
|
this.nodeOutputs[detail.node] = detail.output; |
|
|
|
this.nodeOutputs[detail.node] = detail.output; |
|
|
|
|
|
|
|
const node = this.graph.getNodeById(detail.node); |
|
|
|
|
|
|
|
if (node.onExecuted) { |
|
|
|
|
|
|
|
node.onExecuted(detail.output); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
api.init(); |
|
|
|
api.init(); |
|
|
@ -739,6 +743,9 @@ class ComfyApp { |
|
|
|
const inputData = inputs[inputName]; |
|
|
|
const inputData = inputs[inputName]; |
|
|
|
const type = inputData[0]; |
|
|
|
const type = inputData[0]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(inputData[1]?.forceInput) { |
|
|
|
|
|
|
|
this.addInput(inputName, type); |
|
|
|
|
|
|
|
} else { |
|
|
|
if (Array.isArray(type)) { |
|
|
|
if (Array.isArray(type)) { |
|
|
|
// Enums
|
|
|
|
// Enums
|
|
|
|
Object.assign(config, widgets.COMBO(this, inputName, inputData, app) || {}); |
|
|
|
Object.assign(config, widgets.COMBO(this, inputName, inputData, app) || {}); |
|
|
@ -753,6 +760,7 @@ class ComfyApp { |
|
|
|
this.addInput(inputName, type); |
|
|
|
this.addInput(inputName, type); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (const o in nodeData["output"]) { |
|
|
|
for (const o in nodeData["output"]) { |
|
|
|
const output = nodeData["output"][o]; |
|
|
|
const output = nodeData["output"][o]; |
|
|
|