mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-30 00:00:26 +08:00
seed controls now appear in new seed nodes
This commit is contained in:
parent
505821d982
commit
03502bc9ad
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"CurrentProjectSetting": null
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"SuppressEnvironmentCreationPrompt": true
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"ExpandedNodes": [
|
|
||||||
"",
|
|
||||||
"\\web",
|
|
||||||
"\\web\\extensions",
|
|
||||||
"\\web\\extensions\\core",
|
|
||||||
"\\web\\lib",
|
|
||||||
"\\web\\scripts"
|
|
||||||
],
|
|
||||||
"SelectedNode": "\\web\\scripts\\widgets.js",
|
|
||||||
"PreviewInSolutionExplorer": false
|
|
||||||
}
|
|
||||||
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
@ -263,8 +263,21 @@ app.registerExtension({
|
|||||||
this.outputs[0].type = linkType;
|
this.outputs[0].type = linkType;
|
||||||
this.outputs[0].name = type;
|
this.outputs[0].name = type;
|
||||||
this.outputs[0].widget = widget;
|
this.outputs[0].widget = widget;
|
||||||
|
/*
|
||||||
|
if (widget.name == "seed") {
|
||||||
|
|
||||||
|
widget = seedWidget(node, inputName, inputData);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
this.#createWidget(widget.config, theirNode, widget.name);
|
this.#createWidget(widget.config, theirNode, widget.name);
|
||||||
|
if (widget.name === "seed") {
|
||||||
|
addSeedControlWidget(this, this.widget, "randomize");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#createWidget(inputData, node, widgetName) {
|
#createWidget(inputData, node, widgetName) {
|
||||||
@ -278,19 +291,14 @@ app.registerExtension({
|
|||||||
|
|
||||||
if (type in ComfyWidgets) {
|
if (type in ComfyWidgets) {
|
||||||
widget = (ComfyWidgets[type](this, widgetName/*"value*"*/, inputData, app) || {}).widget;
|
widget = (ComfyWidgets[type](this, widgetName/*"value*"*/, inputData, app) || {}).widget;
|
||||||
if (widgetName == "seed") {
|
|
||||||
addSeedControlWidget(node, node.widgets[0],"randomize");
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
widget = this.addWidget(type, widgetName /*"value"*/, null, () => { }, {});
|
widget = this.addWidget(type, widgetName /*"value"*/, null, () => { }, {});
|
||||||
if (widgetName == "seed") {
|
|
||||||
addSeedControlWidget(node, node.widgets[0], "randomize");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (node?.widgets && widget) {
|
if (node?.widgets && widget) {
|
||||||
const theirWidget = node.widgets.find((w) => w.name === widgetName);
|
|
||||||
|
const theirWidget = node.widgets.find((w) => w.name === widgetName);
|
||||||
if (theirWidget) {
|
if (theirWidget) {
|
||||||
widget.value = theirWidget.value;
|
widget.value = theirWidget.value;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user