Fix loadGraphData func call (#3918)

This commit is contained in:
Chenlei Hu 2024-07-01 12:10:44 -04:00 committed by GitHub
parent 521421f53e
commit 7c5fa7f4a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -2314,14 +2314,14 @@ export class ComfyApp {
} else if(this.isApiJson(jsonContent)) { } else if(this.isApiJson(jsonContent)) {
this.loadApiJson(jsonContent, fileName); this.loadApiJson(jsonContent, fileName);
} else { } else {
await this.loadGraphData(jsonContent, true, fileName); await this.loadGraphData(jsonContent, true, true, fileName);
} }
}; };
reader.readAsText(file); reader.readAsText(file);
} else if (file.name?.endsWith(".latent") || file.name?.endsWith(".safetensors")) { } else if (file.name?.endsWith(".latent") || file.name?.endsWith(".safetensors")) {
const info = await getLatentMetadata(file); const info = await getLatentMetadata(file);
if (info.workflow) { if (info.workflow) {
await this.loadGraphData(JSON.parse(info.workflow), true, fileName); await this.loadGraphData(JSON.parse(info.workflow), true, true, fileName);
} else if (info.prompt) { } else if (info.prompt) {
this.loadApiJson(JSON.parse(info.prompt)); this.loadApiJson(JSON.parse(info.prompt));
} else { } else {