merging changes

This commit is contained in:
Julien Lubimiv 2023-03-30 02:37:05 -04:00
commit 76d9fd22ec
3 changed files with 26 additions and 0 deletions

View File

@ -287,9 +287,15 @@ app.registerExtension({
widget.value = theirWidget.value;
}
}
<<<<<<< HEAD
if (widget.type === "combo") {
addSeedControlWidget(this, widget, "randomize");
=======
if (widget.type === "combo") {
addSeedControlWidget(this, widget, "fixed seed");
>>>>>>> 1518b385a7a2f22887dabd97f45548197f65fad3
}
// When our value changes, update other widgets to reflect our changes

View File

@ -771,10 +771,17 @@ class ComfyApp {
widget.value = widget.value.slice(7);
}
}
<<<<<<< HEAD
if (widget.name == "seed control after generating") {
if (widget.value == true) {
widget.value = "randomize";
=======
if (widget.name == "seed control after generating") {
if (widget.value == true) {
widget.value = "fixed seed";
>>>>>>> 1518b385a7a2f22887dabd97f45548197f65fad3
}
}
}

View File

@ -10,8 +10,13 @@ function getNumberDefaults(inputData, defaultStep) {
return { val: defaultVal, config: { min, max, step: 10.0 * step } };
}
<<<<<<< HEAD
export function addSeedControlWidget(node, targetWidget, defaultValue = "randomize", values) {
const seedControl = node.addWidget("combo", "seed control after generating", "randomize", function (v) { }, {
=======
export function addSeedControlWidget(node, targetWidget, defaultValue = "fixed seed", values) {
const seedControl = node.addWidget("combo", "seed control after generating", "fixed seed", function (v) { }, {
>>>>>>> 1518b385a7a2f22887dabd97f45548197f65fad3
values: ["fixed seed", "increment", "decrement", "randomize"]
})
seedControl.afterQueued = () => {
@ -50,13 +55,21 @@ export function addSeedControlWidget(node, targetWidget, defaultValue = "randomi
console.log("default (fail)");
}
};
<<<<<<< HEAD
=======
>>>>>>> 1518b385a7a2f22887dabd97f45548197f65fad3
return seedControl;
}
function seedWidget(node, inputName, inputData) {
const seed = ComfyWidgets.INT(node, inputName, inputData);
<<<<<<< HEAD
const seedControl = addSeedControlWidget(node, seed.widget, "randomize");
=======
const seedControl = addSeedControlWidget(node, seed.widget, "fixed seed");
>>>>>>> 1518b385a7a2f22887dabd97f45548197f65fad3
seed.widget.linkedWidgets = [seedControl];
return { widget: seed, seedControl };