Sort nodes before saving

This commit is contained in:
bonlime 2024-07-18 13:43:14 +03:00 committed by GitHub
parent 374e093e09
commit d3b32a4dae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2033,6 +2033,9 @@ export class ComfyApp {
}
const workflow = graph.serialize();
// links are already sorted, but nodes are not
workflow["nodes"] = Object.values(workflow["nodes"]).sort((a, b) => a.id - b.id);
const output = {};
// Process nodes in order of execution
for (const outerNode of graph.computeExecutionOrder(false)) {