Register frontend only node defs (#468)

* Register frontend only node defs

* nit

* nit
This commit is contained in:
Chenlei Hu
2024-08-16 12:16:41 -04:00
committed by GitHub
parent 49a910d7b0
commit d1715972e3
2 changed files with 32 additions and 7 deletions

View File

@@ -190,8 +190,8 @@ export class ComfyNodeDefImpl {
}
}
export const SYSTEM_NODE_DEFS: ComfyNodeDef[] = [
{
export const SYSTEM_NODE_DEFS: Record<string, ComfyNodeDef> = {
PrimitiveNode: {
name: 'PrimitiveNode',
display_name: 'Primitive',
category: 'utils',
@@ -202,7 +202,7 @@ export const SYSTEM_NODE_DEFS: ComfyNodeDef[] = [
python_module: 'nodes',
description: 'Primitive values like numbers, strings, and booleans.'
},
{
Reroute: {
name: 'Reroute',
display_name: 'Reroute',
category: 'utils',
@@ -213,7 +213,7 @@ export const SYSTEM_NODE_DEFS: ComfyNodeDef[] = [
python_module: 'nodes',
description: 'Reroute the connection to another node.'
},
{
Note: {
name: 'Note',
display_name: 'Note',
category: 'utils',
@@ -224,7 +224,7 @@ export const SYSTEM_NODE_DEFS: ComfyNodeDef[] = [
python_module: 'nodes',
description: 'Node that add notes to your project'
}
]
}
function sortedTree(node: TreeNode): TreeNode {
// Create a new node with the same label and data