mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-27 23:00:20 +08:00
seedControl can no longer become an input, removes .vs files
This commit is contained in:
parent
3d856e62dd
commit
1518b385a7
Binary file not shown.
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"CurrentProjectSetting": null
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"ExpandedNodes": [
|
|
||||||
"",
|
|
||||||
"\\web",
|
|
||||||
"\\web\\extensions",
|
|
||||||
"\\web\\extensions\\core",
|
|
||||||
"\\web\\scripts"
|
|
||||||
],
|
|
||||||
"SelectedNode": "\\web\\scripts\\widgets.js",
|
|
||||||
"PreviewInSolutionExplorer": false
|
|
||||||
}
|
|
||||||
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
@ -5,9 +5,13 @@ const CONVERTED_TYPE = "converted-widget";
|
|||||||
const VALID_TYPES = ["STRING", "combo", "number"];
|
const VALID_TYPES = ["STRING", "combo", "number"];
|
||||||
|
|
||||||
function isConvertableWidget(widget, config) {
|
function isConvertableWidget(widget, config) {
|
||||||
return VALID_TYPES.includes(widget.type) || VALID_TYPES.includes(config[0]);
|
if (widget.name == "seed control after generating")
|
||||||
|
widget.allowConvertToInput = false;
|
||||||
|
else
|
||||||
|
return VALID_TYPES.includes(widget.type) || VALID_TYPES.includes(config[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function hideWidget(node, widget, suffix = "") {
|
function hideWidget(node, widget, suffix = "") {
|
||||||
widget.origType = widget.type;
|
widget.origType = widget.type;
|
||||||
widget.origComputeSize = widget.computeSize;
|
widget.origComputeSize = widget.computeSize;
|
||||||
|
|||||||
@ -773,8 +773,9 @@ class ComfyApp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (widget.name == "seed control after generating") {
|
if (widget.name == "seed control after generating") {
|
||||||
if (widget.value == true)
|
if (widget.value == true) {
|
||||||
widget.value = "fixed seed";
|
widget.value = "fixed seed";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,16 +10,17 @@ function getNumberDefaults(inputData, defaultStep) {
|
|||||||
return { val: defaultVal, config: { min, max, step: 10.0 * step } };
|
return { val: defaultVal, config: { min, max, step: 10.0 * step } };
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addSeedControlWidget(node, targetWidget, defauly, options) {
|
export function addSeedControlWidget(node, targetWidget, defaultValue = "fixed seed", values) {
|
||||||
const seedControl = node.addWidget("combo", "seed control after generating", "fixed seed", function (v) { }, {
|
const seedControl = node.addWidget("combo", "seed control after generating", "fixed seed", function (v) { }, {
|
||||||
values: ["fixed seed", "increment", "decrement", "randomize"] },)
|
values: ["fixed seed", "increment", "decrement", "randomize"]
|
||||||
|
})
|
||||||
seedControl.afterQueued = () => {
|
seedControl.afterQueued = () => {
|
||||||
|
|
||||||
var v = seedControl.value;
|
var v = seedControl.value;
|
||||||
|
|
||||||
switch (v) {
|
switch (v) {
|
||||||
case ("fixed seed"):
|
case ("fixed seed"):
|
||||||
console.log("fixed seed");
|
console.log("Fixed Seed");
|
||||||
break;
|
break;
|
||||||
case ("increment"):
|
case ("increment"):
|
||||||
targetWidget.value += 1;
|
targetWidget.value += 1;
|
||||||
@ -58,7 +59,7 @@ function seedWidget(node, inputName, inputData) {
|
|||||||
const seedControl = addSeedControlWidget(node, seed.widget, "fixed seed");
|
const seedControl = addSeedControlWidget(node, seed.widget, "fixed seed");
|
||||||
|
|
||||||
seed.widget.linkedWidgets = [seedControl];
|
seed.widget.linkedWidgets = [seedControl];
|
||||||
return { widget: seed, seedControl};
|
return { widget: seed, seedControl };
|
||||||
}
|
}
|
||||||
|
|
||||||
const MultilineSymbol = Symbol();
|
const MultilineSymbol = Symbol();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user