mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-20 21:17:07 +08:00
In API json export, add groupTitle to nodes that come from a group
This commit is contained in:
parent
887a6341ed
commit
59805f290b
@ -1188,6 +1188,8 @@ export class GroupNodeHandler {
|
||||
await config.registerType();
|
||||
|
||||
const groupNode = LiteGraph.createNode(`workflow/${name}`);
|
||||
groupNode.title = name;
|
||||
|
||||
// Reuse the existing nodes for this instance
|
||||
groupNode.setInnerNodes(builder.nodes);
|
||||
groupNode[GROUP].populateWidgets();
|
||||
|
||||
@ -1960,6 +1960,7 @@ export class ComfyApp {
|
||||
for (const outerNode of this.graph.computeExecutionOrder(false)) {
|
||||
const skipNode = outerNode.mode === 2 || outerNode.mode === 4;
|
||||
const innerNodes = (!skipNode && outerNode.getInnerNodes) ? outerNode.getInnerNodes() : [outerNode];
|
||||
const groupTitle = outerNode.getInnerNodes ? outerNode.title : undefined;
|
||||
for (const node of innerNodes) {
|
||||
if (node.isVirtualNode) {
|
||||
continue;
|
||||
@ -2041,6 +2042,7 @@ export class ComfyApp {
|
||||
// Ignored by the backend.
|
||||
node_data["_meta"] = {
|
||||
title: node.title,
|
||||
groupTitle
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user