TRIAGE: Comment out proxy code in StableWildcard.js

(Minimal triage to allow the nodepack to be usable again, proxy behavior still needs to be fixed for long term behavior)
This commit is contained in:
ttrebuchon
2025-09-15 16:33:43 -04:00
committed by Michael Wolfe
parent ab02676118
commit 0fdd9276ac
+24 -19
View File
@@ -70,30 +70,35 @@ function stableWildcardNodeCreated(node, app) {
false
);
// TRIAGE: The below code was commented out due to breaking fundamental behavior
// in ComfyUI in later versions.
// Fixing/finding an alternative to the proxy will be necessary in order to
// re-enable updating the node title.
// The seed widget does not offer a change callback.
// Instead proxy the widget and hook the set function
node.widgets[1] = new Proxy(node.widgets[1], {
set(target, p, newValue, receiver) {
// node.widgets[1] = new Proxy(node.widgets[1], {
// set(target, p, newValue, receiver) {
// We are now responsible for all updates
target[p] = newValue;
// // We are now responsible for all updates
// target[p] = newValue;
// If the property updated was the value (thats the seed we care about)
if (p === 'value') {
// Using the UI slider to change the seed can call this function
// hundreds of times per second. We don't want to send a server request for
// every update, so only update once the value has stoped changing
if (lastCall) {
clearTimeout(lastCall);
}
// // If the property updated was the value (thats the seed we care about)
// if (p === 'value') {
// // Using the UI slider to change the seed can call this function
// // hundreds of times per second. We don't want to send a server request for
// // every update, so only update once the value has stoped changing
// if (lastCall) {
// clearTimeout(lastCall);
// }
lastCall = setTimeout(updateTitle.bind(null, node), 250);
}
// lastCall = setTimeout(updateTitle.bind(null, node), 250);
// }
// Return true for no issues
return true;
}
});
// // Return true for no issues
// return true;
// }
// });
}
// Create the Stable Wildcard extension
@@ -114,4 +119,4 @@ const StableWildcardsExtension = {
}
// Register app
app.registerExtension(StableWildcardsExtension);
app.registerExtension(StableWildcardsExtension);