diff --git a/src/schemas/comfyWorkflowSchema.ts b/src/schemas/comfyWorkflowSchema.ts index 2b67dcf0c7..74f7c7a8d0 100644 --- a/src/schemas/comfyWorkflowSchema.ts +++ b/src/schemas/comfyWorkflowSchema.ts @@ -224,6 +224,7 @@ const zConfig = z const zExtra = z .object({ ds: zDS.optional(), + frontendVersion: z.string().optional(), linkExtensions: z.array(zComfyLinkExtension).optional(), reroutes: z.array(zReroute).optional() }) diff --git a/src/utils/executionUtil.ts b/src/utils/executionUtil.ts index 018e3b1c07..b630be5398 100644 --- a/src/utils/executionUtil.ts +++ b/src/utils/executionUtil.ts @@ -41,6 +41,8 @@ export const graphToPrompt = async ( } compressWidgetInputSlots(workflow) + workflow.extra ??= {} + workflow.extra.frontendVersion = __COMFYUI_FRONTEND_VERSION__ const output: ComfyApiWorkflow = {} // Process nodes in order of execution