From 9ae66c778d86ba93673afc56f3ca0f0c37966780 Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Mon, 20 Oct 2025 20:22:30 -0700 Subject: [PATCH] Fix nodeDef resolution for virtual nodes. (#6175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit image Virtual nodes (like primitives) don't have a nodeData. As a result, the existing call to attempt lookup from a node instance fails. This is fixed by adding `node.type` as a fallback ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6175-Fix-nodeDef-resolution-for-virtual-nodes-2936d73d365081b0abfcfe8532a50f8e) by [Unito](https://www.unito.io) --- src/stores/nodeDefStore.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/stores/nodeDefStore.ts b/src/stores/nodeDefStore.ts index 25e82a93c..232bba7fb 100644 --- a/src/stores/nodeDefStore.ts +++ b/src/stores/nodeDefStore.ts @@ -342,8 +342,7 @@ export const useNodeDefStore = defineStore('nodeDef', () => { nodeDefsByDisplayName.value[nodeDef.display_name] = nodeDefImpl } function fromLGraphNode(node: LGraphNode): ComfyNodeDefImpl | null { - // Frontend-only nodes don't have nodeDef - const nodeTypeName = node.constructor?.nodeData?.name + const nodeTypeName = node.constructor?.nodeData?.name ?? node.type if (!nodeTypeName) return null const nodeDef = nodeDefsByName.value[nodeTypeName] ?? null return nodeDef