"vscode:/vscode.git/clone" did not exist on "9d54066ebc005415e46e85850f77360dd33b6623"
Commit 1f34bf08 authored by ltdrdata's avatar ltdrdata
Browse files

To support dynamic custom loading, separate the node registration

process based on the defs in the registerNodes function.
parent 606446d0
......@@ -1010,6 +1010,11 @@ export class ComfyApp {
const app = this;
// Load node definitions from the backend
const defs = await api.getNodeDefs();
this.registerNodesFromDefs(defs);
await this.#invokeExtensionsAsync("registerCustomNodes");
}
async registerNodesFromDefs(defs) {
await this.#invokeExtensionsAsync("addCustomNodeDefs", defs);
// Generate list of known widgets
......@@ -1082,8 +1087,6 @@ export class ComfyApp {
LiteGraph.registerNodeType(nodeId, node);
node.category = nodeData.category;
}
await this.#invokeExtensionsAsync("registerCustomNodes");
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment