mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): clarify workflow building node filter
This commit is contained in:
parent
c42d692ea6
commit
fd8d1e13a0
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user