|
|
@ -1878,6 +1878,8 @@ export class ComfyApp { |
|
|
|
if (pngInfo) { |
|
|
|
if (pngInfo) { |
|
|
|
if (pngInfo.workflow) { |
|
|
|
if (pngInfo.workflow) { |
|
|
|
await this.loadGraphData(JSON.parse(pngInfo.workflow)); |
|
|
|
await this.loadGraphData(JSON.parse(pngInfo.workflow)); |
|
|
|
|
|
|
|
} else if (pngInfo.prompt) { |
|
|
|
|
|
|
|
this.loadApiJson(JSON.parse(pngInfo.prompt)); |
|
|
|
} else if (pngInfo.parameters) { |
|
|
|
} else if (pngInfo.parameters) { |
|
|
|
importA1111(this.graph, pngInfo.parameters); |
|
|
|
importA1111(this.graph, pngInfo.parameters); |
|
|
|
} |
|
|
|
} |
|
|
@ -1889,6 +1891,8 @@ export class ComfyApp { |
|
|
|
this.loadGraphData(JSON.parse(pngInfo.workflow)); |
|
|
|
this.loadGraphData(JSON.parse(pngInfo.workflow)); |
|
|
|
} else if (pngInfo.Workflow) { |
|
|
|
} else if (pngInfo.Workflow) { |
|
|
|
this.loadGraphData(JSON.parse(pngInfo.Workflow)); // Support loading workflows from that webp custom node.
|
|
|
|
this.loadGraphData(JSON.parse(pngInfo.Workflow)); // Support loading workflows from that webp custom node.
|
|
|
|
|
|
|
|
} else if (pngInfo.prompt) { |
|
|
|
|
|
|
|
this.loadApiJson(JSON.parse(pngInfo.prompt)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (file.type === "application/json" || file.name?.endsWith(".json")) { |
|
|
|
} else if (file.type === "application/json" || file.name?.endsWith(".json")) { |
|
|
@ -1908,6 +1912,8 @@ export class ComfyApp { |
|
|
|
const info = await getLatentMetadata(file); |
|
|
|
const info = await getLatentMetadata(file); |
|
|
|
if (info.workflow) { |
|
|
|
if (info.workflow) { |
|
|
|
await this.loadGraphData(JSON.parse(info.workflow)); |
|
|
|
await this.loadGraphData(JSON.parse(info.workflow)); |
|
|
|
|
|
|
|
} else if (info.prompt) { |
|
|
|
|
|
|
|
this.loadApiJson(JSON.parse(info.prompt)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|