"ppocr/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "5c417939179ea86a20c01b20ae2b6ff065de4436"
Commit 0782ac2a authored by Chris's avatar Chris
Browse files

defaultInput

parent 9261587d
......@@ -142,7 +142,7 @@ app.registerExtension({
const r = origOnNodeCreated ? origOnNodeCreated.apply(this) : undefined;
if (this.widgets) {
for (const w of this.widgets) {
if (w?.options?.forceInput) {
if (w?.options?.forceInput || w?.options?.defaultInput) {
const config = nodeData?.input?.required[w.name] || nodeData?.input?.optional?.[w.name] || [w.type, w.options || {}];
convertToInput(this, w, config);
}
......
......@@ -1248,6 +1248,10 @@ export class ComfyApp {
if (!config.widget.options) config.widget.options = {};
config.widget.options.forceInput = inputData[1].forceInput;
}
if(widgetCreated && inputData[1]?.defaultInput && config?.widget) {
if (!config.widget.options) config.widget.options = {};
config.widget.options.defaultInput = inputData[1].defaultInput;
}
}
for (const o in nodeData["output"]) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment