Skip to content

Commit

Permalink
Always clone graph data when loading to fix some load issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Nov 15, 2023
1 parent 629e4c5 commit 7114cfe
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions web/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1489,16 +1489,18 @@ export class ComfyApp {

let reset_invalid_values = false;
if (!graphData) {
if (typeof structuredClone === "undefined")
{
graphData = JSON.parse(JSON.stringify(defaultGraph));
}else
{
graphData = structuredClone(defaultGraph);
}
graphData = defaultGraph;
reset_invalid_values = true;
}

if (typeof structuredClone === "undefined")
{
graphData = JSON.parse(JSON.stringify(graphData));
}else
{
graphData = structuredClone(graphData);
}

const missingNodeTypes = [];
for (let n of graphData.nodes) {
// Patch T2IAdapterLoader to ControlNetLoader since they are the same node now
Expand Down

0 comments on commit 7114cfe

Please sign in to comment.