Revert "Restrict applyToGraph to PrimitiveNode" (#2677)

This commit is contained in:
Chenlei Hu
2025-02-21 22:56:51 -05:00
committed by GitHub
parent d7c9a43aba
commit f43eac7c71
3 changed files with 7 additions and 4 deletions

View File

@@ -1,7 +1,6 @@
import type { LGraph } from '@comfyorg/litegraph'
import { LGraphEventMode } from '@comfyorg/litegraph'
import { isPrimitiveNode } from '@/nodes/PrimitiveNode'
import type { ComfyApiWorkflow, ComfyWorkflowJSON } from '@/types/comfyWorkflow'
/**
@@ -20,8 +19,11 @@ export const graphToPrompt = async (
? outerNode.getInnerNodes()
: [outerNode]
for (const node of innerNodes) {
if (isPrimitiveNode(node)) {
node.applyToGraph()
if (node.isVirtualNode) {
// Don't serialize frontend only nodes but let them make changes
if (node.applyToGraph) {
node.applyToGraph()
}
}
}
}