11import {
22 SchedulerParam ,
33 zBaseModel ,
4+ zMainModel ,
45 zMainOrOnnxModel ,
6+ zOnnxModel ,
57 zSDXLRefinerModel ,
68 zScheduler ,
79} from 'features/parameters/types/parameterSchemas' ;
@@ -769,12 +771,14 @@ export const zCoreMetadata = z
769771 steps : z . number ( ) . int ( ) . nullish ( ) ,
770772 scheduler : z . string ( ) . nullish ( ) ,
771773 clip_skip : z . number ( ) . int ( ) . nullish ( ) ,
772- model : zMainOrOnnxModel . nullish ( ) ,
773- controlnets : z . array ( zControlField ) . nullish ( ) ,
774+ model : z
775+ . union ( [ zMainModel . deepPartial ( ) , zOnnxModel . deepPartial ( ) ] )
776+ . nullish ( ) ,
777+ controlnets : z . array ( zControlField . deepPartial ( ) ) . nullish ( ) ,
774778 loras : z
775779 . array (
776780 z . object ( {
777- lora : zLoRAModelField ,
781+ lora : zLoRAModelField . deepPartial ( ) ,
778782 weight : z . number ( ) ,
779783 } )
780784 )
@@ -784,15 +788,15 @@ export const zCoreMetadata = z
784788 init_image : z . string ( ) . nullish ( ) ,
785789 positive_style_prompt : z . string ( ) . nullish ( ) ,
786790 negative_style_prompt : z . string ( ) . nullish ( ) ,
787- refiner_model : zSDXLRefinerModel . nullish ( ) ,
791+ refiner_model : zSDXLRefinerModel . deepPartial ( ) . nullish ( ) ,
788792 refiner_cfg_scale : z . number ( ) . nullish ( ) ,
789793 refiner_steps : z . number ( ) . int ( ) . nullish ( ) ,
790794 refiner_scheduler : z . string ( ) . nullish ( ) ,
791- refiner_positive_aesthetic_store : z . number ( ) . nullish ( ) ,
792- refiner_negative_aesthetic_store : z . number ( ) . nullish ( ) ,
795+ refiner_positive_aesthetic_score : z . number ( ) . nullish ( ) ,
796+ refiner_negative_aesthetic_score : z . number ( ) . nullish ( ) ,
793797 refiner_start : z . number ( ) . nullish ( ) ,
794798 } )
795- . catchall ( z . record ( z . any ( ) ) ) ;
799+ . passthrough ( ) ;
796800
797801export type CoreMetadata = z . infer < typeof zCoreMetadata > ;
798802
0 commit comments