Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

allow converting optional widgets to inputs

hnmr29304b42bad87c2
diff --git a/web/extensions/core/widgetInputs.js b/web/extensions/core/widgetInputs.js
index ff9227d28..7e6688261 100644
--- a/web/extensions/core/widgetInputs.js
+++ b/web/extensions/core/widgetInputs.js
@@ -101,7 +101,7 @@ app.registerExtension({
callback: () => convertToWidget(this, w),
});
} else {
- const config = nodeData?.input?.required[w.name] || [w.type, w.options || {}];
+ const config = nodeData?.input?.required[w.name] || nodeData?.input?.optional?.[w.name] || [w.type, w.options || {}];
if (isConvertableWidget(w, config)) {
toInput.push({
content: `Convert ${w.name} to input`,