From bc1f6e21856f7be25db5c5c2956b89c27db93b3d Mon Sep 17 00:00:00 2001 From: Michael Poutre Date: Tue, 5 Sep 2023 15:06:46 -0700 Subject: [PATCH] fix(ui/widgets): Only set widget forceInput option if a widget is added --- web/scripts/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/scripts/app.js b/web/scripts/app.js index 9c380d3..a3661da 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -1228,6 +1228,7 @@ export class ComfyApp { const inputData = inputs[inputName]; const type = inputData[0]; + let widgetCreated = true; if (Array.isArray(type)) { // Enums Object.assign(config, widgets.COMBO(this, inputName, inputData, app) || {}); @@ -1240,8 +1241,10 @@ export class ComfyApp { } else { // Node connection inputs this.addInput(inputName, type); + widgetCreated = false; } - if(inputData[1]?.forceInput && config?.widget) { + + if(widgetCreated && inputData[1]?.forceInput && config?.widget) { if (!config.widget.options) config.widget.options = {}; config.widget.options.forceInput = inputData[1].forceInput; }