mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-10 21:42:37 +08:00
Fix template nodes not being stored
This commit is contained in:
parent
73cc92af77
commit
c5eec07207
@ -9,12 +9,19 @@ const GROUP_SLOTS = Symbol();
|
||||
export async function registerGroupNodes(groupNodes, source, prefix) {
|
||||
if (!groupNodes) return;
|
||||
|
||||
let extra = app.graph.extra;
|
||||
if (!extra) app.graph.extra = extra = {};
|
||||
let nodes = extra.groupNodes;
|
||||
if (!nodes) extra.groupNodes = nodes = {};
|
||||
|
||||
for (const g in groupNodes) {
|
||||
const def = buildNodeDef(groupNodes[g], g, globalDefs, source);
|
||||
if (prefix) {
|
||||
def.display_name = prefix + "/" + def.display_name;
|
||||
}
|
||||
await app.registerNodeDef(source + "/" + g, def);
|
||||
|
||||
nodes[g] = groupNodes[g];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user