mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-19 11:16:59 +08:00
Fix restoring outputs with combinatorial batches
This commit is contained in:
parent
b185b9cac7
commit
a72722d471
@ -353,7 +353,12 @@ export class ComfyApp {
|
|||||||
|
|
||||||
node.prototype.onDrawBackground = function (ctx) {
|
node.prototype.onDrawBackground = function (ctx) {
|
||||||
if (!this.flags.collapsed) {
|
if (!this.flags.collapsed) {
|
||||||
const output = app.nodeOutputs[this.id + ""];
|
// Outputs returned by the frontend for each node are a list, one for each combinatorial batch run.
|
||||||
|
// With no combinatorial outputs, it's a list of length 1.
|
||||||
|
// For now select only the first batch output.
|
||||||
|
const batchOutputs = app.nodeOutputs[this.id + ""];
|
||||||
|
if (batchOutputs && batchOutputs.length > 0) {
|
||||||
|
const output = batchOutputs[0];
|
||||||
if (output && output.images) {
|
if (output && output.images) {
|
||||||
if (this.images !== output.images) {
|
if (this.images !== output.images) {
|
||||||
this.images = output.images;
|
this.images = output.images;
|
||||||
@ -377,6 +382,7 @@ export class ComfyApp {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.imgs && this.imgs.length) {
|
if (this.imgs && this.imgs.length) {
|
||||||
const canvas = graph.list_of_graphcanvas[0];
|
const canvas = graph.list_of_graphcanvas[0];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user