tidy(ui): remove extraneous zod schema

This commit is contained in:
psychedelicious 2024-04-06 14:48:51 +11:00
parent 55f7a7737a
commit 4d0a49298c
2 changed files with 1 additions and 9 deletions

View File

@ -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();

View File

@ -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>;