mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-27 23:00:20 +08:00
Merge branch 'master' into fizzle296
This commit is contained in:
commit
d0935a876b
@ -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
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -51,6 +51,7 @@ export function addSeedControlWidget(node, targetWidget, defaultValue = "randomi
|
||||
console.log("default (fail)");
|
||||
}
|
||||
};
|
||||
|
||||
return seedControl;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user