From 8736d4a463da337ee9a351921a189d93f5e69d52 Mon Sep 17 00:00:00 2001 From: OpenClaw Agent Date: Fri, 17 Jul 2026 10:24:04 +0000 Subject: [PATCH] Remove stale ref_images input from saved nodes --- js/ltx_director.js | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/js/ltx_director.js b/js/ltx_director.js index 99a7ecf..7f264dd 100644 --- a/js/ltx_director.js +++ b/js/ltx_director.js @@ -11542,6 +11542,15 @@ app.registerExtension({ const fallbackWidget = node.widgets[fallbackIndex]; return fallbackWidget?.value ?? null; }; + this._removeLegacyInputs = function () { + if (!Array.isArray(self.inputs)) return; + for (const legacyName of ["ref_images"]) { + const idx = self.inputs.findIndex(i => i?.name === legacyName); + if (idx !== -1) { + self.removeInput(idx); + } + } + }; this._resolveNodeLinkedValue = function (targetNode, inputName, options = {}) { const originNode = self._findLinkedOriginNode(targetNode, inputName); if (!originNode) return null; @@ -11770,6 +11779,7 @@ app.registerExtension({ } } }; + this._removeLegacyInputs(); const origOnConnectionsChange = this.onConnectionsChange; this.onConnectionsChange = function (type, index, connected, link_info) { @@ -12176,13 +12186,14 @@ app.registerExtension({ }; const onConfigure = nodeType.prototype.onConfigure; - nodeType.prototype.onConfigure = function (info) { - // 1. Call parent/original onConfigure first, with info.widgets_values intact - const out = onConfigure ? onConfigure.apply(this, arguments) : undefined; - - if (info.properties) { - this.properties = { ...this.properties, ...info.properties }; - } + nodeType.prototype.onConfigure = function (info) { + // 1. Call parent/original onConfigure first, with info.widgets_values intact + const out = onConfigure ? onConfigure.apply(this, arguments) : undefined; + this._removeLegacyInputs?.(); + + if (info.properties) { + this.properties = { ...this.properties, ...info.properties }; + } console.log("[LTXDirector debug] onConfigure called. info.widgets_values:", info.widgets_values ? JSON.stringify(info.widgets_values) : "undefined");