From 0b54bfb7c5f7b94d1a6853a82b9949536c85242f Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 26 Feb 2024 11:59:05 +1100 Subject: [PATCH] fix(ui): fix lora metadata item type --- invokeai/frontend/web/src/features/nodes/types/metadata.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/features/nodes/types/metadata.ts b/invokeai/frontend/web/src/features/nodes/types/metadata.ts index 2789abaaca..132f9f781a 100644 --- a/invokeai/frontend/web/src/features/nodes/types/metadata.ts +++ b/invokeai/frontend/web/src/features/nodes/types/metadata.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; -import { zControlField, zIPAdapterField, zT2IAdapterField } from './common'; +import { zControlField, zIPAdapterField, zModelFieldBase, zT2IAdapterField } from './common'; export const zLoRAWeight = z.number().nullish(); // #region Metadata-optimized versions of schemas @@ -8,7 +8,7 @@ export const zLoRAWeight = z.number().nullish(); // - https://github.com/colinhacks/zod/issues/2106 // - https://github.com/colinhacks/zod/issues/2854 export const zLoRAMetadataItem = z.object({ - lora: z.unknown(), + lora: zModelFieldBase.deepPartial(), weight: zLoRAWeight, }); const zControlNetMetadataItem = zControlField.merge(z.object({ control_model: z.unknown() })).deepPartial();