Fix InpaintCrop widget updates by restricting patch to InpaintCrop nodes

This commit is contained in:
bananasss00
2025-02-10 23:16:19 +03:00
parent 6bf799ec68
commit e69731f522
+3 -1
View File
@@ -100,6 +100,9 @@ function toggleWidget(node, widget, show = false, suffix = "") {
app.registerExtension({
name: "inpaint-cropandstitch.showcontrol",
nodeCreated(node) {
if (node.comfyClass !== "InpaintCrop")
return;
inpaintCropAndStitchHandler(node);
for (const w of node.widgets || []) {
let widgetValue = w.value;
@@ -118,7 +121,6 @@ app.registerExtension({
return valueToReturn;
},
set(newVal) {
// If there's an original setter, use it. Otherwise, set widgetValue.
if (originalDescriptor && originalDescriptor.set) {
originalDescriptor.set.call(w, newVal);