Fix unwarranted workflow validation warning

This commit is contained in:
filtered
2025-05-22 12:19:33 +10:00
parent 61e13f09f8
commit 2166d65cca

View File

@@ -354,7 +354,8 @@ export const zComfyWorkflow1 = zBaseExportableGraph
reroutes: z.array(zReroute).optional(),
extra: zExtra.optional().nullable(),
models: z.array(zModelFile).optional(),
definitions: z.object({
definitions: z
.object({
subgraphs: z.lazy(
(): z.ZodArray<
z.ZodType<
@@ -366,6 +367,7 @@ export const zComfyWorkflow1 = zBaseExportableGraph
> => z.array(zSubgraphDefinition)
)
})
.optional()
})
.passthrough()
@@ -426,8 +428,9 @@ export const zSubgraphDefinition = zComfyWorkflow1
/** Ordered list of outputs from the subgraph itself. Similar to a reroute, with the input side in the subgraph, and the output side in the graph. */
outputs: z.array(zSubgraphIO).optional(),
/** A list of node widgets displayed in the parent graph, on the subgraph object. */
widgets: z.array(zExposedWidget),
definitions: z.object({
widgets: z.array(zExposedWidget).optional(),
definitions: z
.object({
subgraphs: z.lazy(
(): z.ZodArray<
z.ZodType<
@@ -439,6 +442,7 @@ export const zSubgraphDefinition = zComfyWorkflow1
> => zSubgraphDefinition.array()
)
})
.optional()
})
.passthrough()