diff --git a/comfy/ldm/modules/tomesd.py b/comfy/ldm/modules/tomesd.py index 5bf1acec9..1eafcd0aa 100644 --- a/comfy/ldm/modules/tomesd.py +++ b/comfy/ldm/modules/tomesd.py @@ -109,7 +109,7 @@ def get_functions(x, ratio, original_shape): w = original_w // downsample h = original_h // downsample r = int(x.shape[1] * ratio) - no_rand = True + no_rand = False m, u = bipartite_soft_matching_random2d(x, w, h, stride_x, stride_y, r, no_rand) return m, u diff --git a/web/extensions/core/widgetInputs.js b/web/extensions/core/widgetInputs.js index 4afb14110..f0d18d5a2 100644 --- a/web/extensions/core/widgetInputs.js +++ b/web/extensions/core/widgetInputs.js @@ -167,6 +167,8 @@ app.registerExtension({ const node = LiteGraph.createNode("PrimitiveNode"); app.graph.add(node); + node.widgets.addSeedControlWidget(node,node.widgets[0],"randomize"); + // Calculate a position that wont directly overlap another node const pos = [this.pos[0] - node.size[0] - 30, this.pos[1]]; while (isNodeAtPos(pos)) { @@ -306,6 +308,10 @@ app.registerExtension({ } } + if (widget.type === "combo") { + addSeedControlWidget(this, widget, "randomize"); + } + // When our value changes, update other widgets to reflect our changes // e.g. so LoadImage shows correct image const callback = widget.callback; diff --git a/web/scripts/widgets.js b/web/scripts/widgets.js index 98a7c9e93..ae726f414 100644 --- a/web/scripts/widgets.js +++ b/web/scripts/widgets.js @@ -51,6 +51,7 @@ export function addSeedControlWidget(node, targetWidget, defaultValue = "randomi console.log("default (fail)"); } }; + return seedControl; }