[feat] Node Definition Filter Registry System (#4497)

This commit is contained in:
Christian Byrne
2025-07-22 12:27:32 -07:00
committed by GitHub
parent 7b32a2fb6e
commit 280131d33d
3 changed files with 357 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ import {
isFloatInputSpec,
isIntInputSpec
} from '@/schemas/nodeDefSchema'
import type { ComfyNodeDefImpl } from '@/stores/nodeDefStore'
import { lcm } from './mathUtil'
@@ -138,3 +139,11 @@ export const mergeInputSpec = (
return mergeCommonInputSpec(spec1, spec2)
}
/**
* Checks if a node definition represents a subgraph node.
* Subgraph nodes are created with category='subgraph' and python_module='nodes'.
*/
export const isSubgraphNode = (nodeDef: ComfyNodeDefImpl): boolean => {
return nodeDef.category === 'subgraph' && nodeDef.python_module === 'nodes'
}