mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-27 14:50:20 +08:00
missing reflection of filename on send to img feature
This commit is contained in:
parent
a298e69b0a
commit
1b2e55718b
@ -551,10 +551,10 @@ class ComfyApp {
|
|||||||
const nodeData = defs[nodeId];
|
const nodeData = defs[nodeId];
|
||||||
const node = Object.assign(
|
const node = Object.assign(
|
||||||
function ComfyNode() {
|
function ComfyNode() {
|
||||||
const inputs = nodeData["input"]["required"];
|
const inputs = Object.assign(nodeData["input"]["required"], nodeData["input"]["widget"]);
|
||||||
const config = { minWidth: 1, minHeight: 1 };
|
const config = { minWidth: 1, minHeight: 1 };
|
||||||
for (const inputName in inputs) {
|
for (const inputName in inputs) {
|
||||||
const inputs = Object.assign(nodeData["input"]["required"], nodeData["input"]["widget"]);
|
const inputData = inputs[inputName];
|
||||||
const type = inputData[0];
|
const type = inputData[0];
|
||||||
|
|
||||||
if (Array.isArray(type)) {
|
if (Array.isArray(type)) {
|
||||||
|
|||||||
@ -51,6 +51,7 @@ function imagesendWidget(node, inputName, inputData, app) {
|
|||||||
|
|
||||||
const image_name = node.images[0].filename;
|
const image_name = node.images[0].filename;
|
||||||
const copied = false;
|
const copied = false;
|
||||||
|
const imageWidget = node.widgets.find((w) => w.name === "image");
|
||||||
|
|
||||||
for(let i in app.graph._nodes) {
|
for(let i in app.graph._nodes) {
|
||||||
var n = app.graph._nodes[i];
|
var n = app.graph._nodes[i];
|
||||||
@ -64,6 +65,7 @@ function imagesendWidget(node, inputName, inputData, app) {
|
|||||||
await api.sendOutputToInputImage(image_name);
|
await api.sendOutputToInputImage(image_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imageWidget.value = data.name;
|
||||||
const thatImageWidget = n.widgets.find((w) => w.value === "image");
|
const thatImageWidget = n.widgets.find((w) => w.value === "image");
|
||||||
await showImage(n,thatImageWidget,image_name);
|
await showImage(n,thatImageWidget,image_name);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user