Skip to content

Commit 088f705

Browse files
committed
Merge branch 'master' into beta
2 parents 165780a + b2517b4 commit 088f705

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

web/scripts/app.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ export class ComfyApp {
415415
node.prototype.setSizeForImage = function (force) {
416416
if(!force && this.animatedImages) return;
417417

418-
if (this.inputHeight) {
418+
if (this.inputHeight || this.freeWidgetSpace > 210) {
419419
this.setSize(this.size);
420420
return;
421421
}
@@ -1883,6 +1883,8 @@ export class ComfyApp {
18831883
if (pngInfo) {
18841884
if (pngInfo.workflow) {
18851885
await this.loadGraphData(JSON.parse(pngInfo.workflow));
1886+
} else if (pngInfo.prompt) {
1887+
this.loadApiJson(JSON.parse(pngInfo.prompt));
18861888
} else if (pngInfo.parameters) {
18871889
importA1111(this.graph, pngInfo.parameters);
18881890
}
@@ -1894,6 +1896,8 @@ export class ComfyApp {
18941896
this.loadGraphData(JSON.parse(pngInfo.workflow));
18951897
} else if (pngInfo.Workflow) {
18961898
this.loadGraphData(JSON.parse(pngInfo.Workflow)); // Support loading workflows from that webp custom node.
1899+
} else if (pngInfo.prompt) {
1900+
this.loadApiJson(JSON.parse(pngInfo.prompt));
18971901
}
18981902
}
18991903
} else if (file.type === "application/json" || file.name?.endsWith(".json")) {
@@ -1913,6 +1917,8 @@ export class ComfyApp {
19131917
const info = await getLatentMetadata(file);
19141918
if (info.workflow) {
19151919
await this.loadGraphData(JSON.parse(info.workflow));
1920+
} else if (info.prompt) {
1921+
this.loadApiJson(JSON.parse(info.prompt));
19161922
}
19171923
}
19181924
}

web/scripts/domWidget.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ function computeSize(size) {
120120
freeSpace -= 220;
121121
}
122122

123+
this.freeWidgetSpace = freeSpace;
124+
123125
if (freeSpace < 0) {
124126
// Not enough space for all widgets so we need to grow
125127
size[1] -= freeSpace;

0 commit comments

Comments
 (0)