Merge branch 'master' into fizzle296

This commit is contained in:
flyingshutter 2023-04-01 01:12:05 +02:00 committed by GitHub
commit d0935a876b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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;

View File

@ -51,6 +51,7 @@ export function addSeedControlWidget(node, targetWidget, defaultValue = "randomi
console.log("default (fail)");
}
};
return seedControl;
}