mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy(ui): remove extraneous zod schema
This commit is contained in:
parent
55f7a7737a
commit
4d0a49298c
@ -43,7 +43,6 @@ import {
|
||||
isParameterHeight,
|
||||
isParameterHRFEnabled,
|
||||
isParameterHRFMethod,
|
||||
isParameterInitialImage,
|
||||
isParameterLoRAWeight,
|
||||
isParameterNegativePrompt,
|
||||
isParameterNegativeStylePromptSDXL,
|
||||
@ -140,7 +139,7 @@ const parseScheduler: MetadataParseFunc<ParameterScheduler> = (metadata) =>
|
||||
getProperty(metadata, 'scheduler', isParameterScheduler);
|
||||
|
||||
const parseInitialImage: MetadataParseFunc<ImageDTO> = async (metadata) => {
|
||||
const imageName = await getProperty(metadata, 'init_image', isParameterInitialImage);
|
||||
const imageName = await getProperty(metadata, 'init_image', isString);
|
||||
const imageDTORequest = getStore().dispatch(imagesApi.endpoints.getImageDTO.initiate(imageName));
|
||||
const imageDTO = await imageDTORequest.unwrap();
|
||||
imageDTORequest.unsubscribe();
|
||||
|
@ -126,13 +126,6 @@ const zParameterT2IAdapterModel = zModelIdentifierField;
|
||||
export type ParameterT2IAdapterModel = z.infer<typeof zParameterT2IAdapterModel>;
|
||||
// #endregion
|
||||
|
||||
// #region I2I Initial Image
|
||||
const zParameterInitialImage = z.string();
|
||||
export type ParameterInitialImage = z.infer<typeof zParameterInitialImage>;
|
||||
export const isParameterInitialImage = (val: unknown): val is ParameterInitialImage =>
|
||||
zParameterInitialImage.safeParse(val).success;
|
||||
// #endregion
|
||||
|
||||
// #region Strength (l2l strength)
|
||||
const zParameterStrength = z.number().min(0).max(1);
|
||||
export type ParameterStrength = z.infer<typeof zParameterStrength>;
|
||||
|
Loading…
Reference in New Issue
Block a user