mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix lora metadata item type
This commit is contained in:
parent
24daacecf2
commit
0b54bfb7c5
@ -1,6 +1,6 @@
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { zControlField, zIPAdapterField, zT2IAdapterField } from './common';
|
import { zControlField, zIPAdapterField, zModelFieldBase, zT2IAdapterField } from './common';
|
||||||
|
|
||||||
export const zLoRAWeight = z.number().nullish();
|
export const zLoRAWeight = z.number().nullish();
|
||||||
// #region Metadata-optimized versions of schemas
|
// #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/2106
|
||||||
// - https://github.com/colinhacks/zod/issues/2854
|
// - https://github.com/colinhacks/zod/issues/2854
|
||||||
export const zLoRAMetadataItem = z.object({
|
export const zLoRAMetadataItem = z.object({
|
||||||
lora: z.unknown(),
|
lora: zModelFieldBase.deepPartial(),
|
||||||
weight: zLoRAWeight,
|
weight: zLoRAWeight,
|
||||||
});
|
});
|
||||||
const zControlNetMetadataItem = zControlField.merge(z.object({ control_model: z.unknown() })).deepPartial();
|
const zControlNetMetadataItem = zControlField.merge(z.object({ control_model: z.unknown() })).deepPartial();
|
||||||
|
Loading…
Reference in New Issue
Block a user