Always clone graph data when loading to fix some load issues.

This commit is contained in:
comfyanonymous 2023-11-15 15:55:02 -05:00
parent 629e4c552c
commit 7114cfec0e
1 changed files with 9 additions and 7 deletions

View File

@ -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