@@ -134,32 +134,41 @@ private void OnModelChanged(ModelOptionsModel model)
134134 if ( model is null )
135135 return ;
136136
137+ SchedulerTypes . Clear ( ) ;
138+ foreach ( SchedulerType type in model . ModelOptions . PipelineType . GetSchedulerTypes ( ) )
139+ SchedulerTypes . Add ( type ) ;
140+
141+ SchedulerOptions . Width = 512 ;
142+ SchedulerOptions . Height = 512 ;
137143 if ( model . ModelOptions . PipelineType == DiffuserPipelineType . StableDiffusion )
138144 {
139145 SchedulerOptions . OriginalInferenceSteps = 100 ;
140146 SchedulerOptions . InferenceSteps = 30 ;
147+ SchedulerOptions . SchedulerType = SchedulerType . DDIM ;
141148 }
142149 else if ( model . ModelOptions . PipelineType == DiffuserPipelineType . LatentConsistency )
143150 {
144151 SchedulerOptions . OriginalInferenceSteps = 50 ;
145152 SchedulerOptions . InferenceSteps = 6 ;
146153 SchedulerOptions . GuidanceScale = 1f ;
154+ SchedulerOptions . SchedulerType = SchedulerType . LCM ;
147155 }
148156 else if ( model . ModelOptions . PipelineType == DiffuserPipelineType . InstaFlow )
149157 {
150158 SchedulerOptions . InferenceSteps = 1 ;
151159 SchedulerOptions . GuidanceScale = 0f ;
160+ SchedulerOptions . SchedulerType = SchedulerType . InstaFlow ;
152161 }
153-
154-
155- SchedulerTypes . Clear ( ) ;
156- if ( model is null )
157- return ;
158-
159- foreach ( SchedulerType type in model . ModelOptions . PipelineType . GetSchedulerTypes ( ) )
160- SchedulerTypes . Add ( type ) ;
161-
162- SchedulerOptions . SchedulerType = SchedulerTypes . FirstOrDefault ( ) ;
162+ else if ( model . ModelOptions . PipelineType == DiffuserPipelineType . StableDiffusionXL )
163+ {
164+ SchedulerOptions . OriginalInferenceSteps = 100 ;
165+ SchedulerOptions . InferenceSteps = 30 ;
166+ SchedulerOptions . GuidanceScale = 5f ;
167+ SchedulerOptions . Width = 1024 ;
168+ SchedulerOptions . Height = 1024 ;
169+ SchedulerOptions . SchedulerType = SchedulerType . EulerAncestral ;
170+ }
171+
163172 }
164173
165174
0 commit comments