From fd8d1e13a0c79dec99209226ed6f5f2438a541c0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 6 Dec 2023 17:47:51 +1100 Subject: [PATCH] feat(ui): clarify workflow building node filter --- .../web/src/features/nodes/util/workflow/buildWorkflow.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/invokeai/frontend/web/src/features/nodes/util/workflow/buildWorkflow.ts b/invokeai/frontend/web/src/features/nodes/util/workflow/buildWorkflow.ts index ff57c2d2b1..9f1e9f7294 100644 --- a/invokeai/frontend/web/src/features/nodes/util/workflow/buildWorkflow.ts +++ b/invokeai/frontend/web/src/features/nodes/util/workflow/buildWorkflow.ts @@ -1,6 +1,7 @@ import { logger } from 'app/logging/logger'; import { parseify } from 'common/util/serialize'; import { NodesState } from 'features/nodes/store/types'; +import { isInvocationNode, isNotesNode } from 'features/nodes/types/invocation'; import { WorkflowV2, zWorkflowEdge, @@ -34,9 +35,7 @@ export const buildWorkflow: BuildWorkflowFunction = ({ }; clonedNodes - .filter((n) => - ['invocation', 'notes'].includes(n.type ?? '__UNKNOWN_NODE_TYPE__') - ) + .filter((n) => isInvocationNode(n) || isNotesNode(n)) // Workflows only contain invocation and notes nodes .forEach((node) => { const result = zWorkflowNode.safeParse(node); if (!result.success) {