mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 05:49:54 +00:00
[feat] Node Definition Filter Registry System (#4497)
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user