File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { app } from '@/scripts/app'
88import { useComfyManagerStore } from '@/stores/comfyManagerStore'
99import { useNodeDefStore } from '@/stores/nodeDefStore'
1010import type { components } from '@/types/comfyRegistryTypes'
11+ import { collectAllNodes } from '@/utils/graphTraversalUtil'
1112
1213/**
1314 * Composable to find missing NodePacks from workflow
@@ -56,7 +57,8 @@ export const useMissingNodes = () => {
5657 }
5758
5859 const missingCoreNodes = computed < Record < string , LGraphNode [ ] > > ( ( ) => {
59- const missingNodes = app . graph . nodes . filter ( isMissingCoreNode )
60+ const allNodes = collectAllNodes ( app . graph )
61+ const missingNodes = allNodes . filter ( isMissingCoreNode )
6062 return groupBy ( missingNodes , ( node ) => String ( node . properties ?. ver || '' ) )
6163 } )
6264
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { useNodeDefStore } from '@/stores/nodeDefStore'
99import { useSystemStatsStore } from '@/stores/systemStatsStore'
1010import { SelectedVersion , UseNodePacksOptions } from '@/types/comfyManagerTypes'
1111import type { components } from '@/types/comfyRegistryTypes'
12+ import { collectAllNodes } from '@/utils/graphTraversalUtil'
1213
1314type WorkflowPack = {
1415 id :
@@ -109,11 +110,13 @@ export const useWorkflowPacks = (options: UseNodePacksOptions = {}) => {
109110 }
110111
111112 /**
112- * Get the node packs for all nodes in the workflow.
113+ * Get the node packs for all nodes in the workflow (including subgraphs) .
113114 */
114115 const getWorkflowPacks = async ( ) => {
115- if ( ! app . graph ?. nodes ?. length ) return [ ]
116- const packs = await Promise . all ( app . graph . nodes . map ( workflowNodeToPack ) )
116+ if ( ! app . graph ) return [ ]
117+ const allNodes = collectAllNodes ( app . graph )
118+ if ( ! allNodes . length ) return [ ]
119+ const packs = await Promise . all ( allNodes . map ( workflowNodeToPack ) )
117120 workflowPacks . value = packs . filter ( ( pack ) => pack !== undefined )
118121 }
119122
You can’t perform that action at this time.
0 commit comments