@@ -163,7 +163,7 @@ public Task NavigateAsync(ImageResult imageResult)
163163 HasInputResult = true ;
164164 HasInputMaskResult = false ;
165165 InputImageMask = null ;
166- if ( imageResult . Model . ModelOptions . Diffusers . Contains ( DiffuserType . ImageInpaint )
166+ if ( imageResult . Model . ModelOptions . Diffusers . Contains ( DiffuserType . ImageInpaint )
167167 || imageResult . Model . ModelOptions . Diffusers . Contains ( DiffuserType . ImageInpaintLegacy ) )
168168 {
169169 SelectedModel = imageResult . Model ;
@@ -198,8 +198,8 @@ private async Task Generate()
198198 Prompt = PromptOptions . Prompt ,
199199 NegativePrompt = PromptOptions . NegativePrompt ,
200200 SchedulerType = PromptOptions . SchedulerType ,
201- DiffuserType = SelectedModel . ModelOptions . Diffusers . Contains ( DiffuserType . ImageInpaint )
202- ? DiffuserType . ImageInpaint
201+ DiffuserType = SelectedModel . ModelOptions . Diffusers . Contains ( DiffuserType . ImageInpaint )
202+ ? DiffuserType . ImageInpaint
203203 : DiffuserType . ImageInpaintLegacy ,
204204 InputImage = new StableDiffusion . Models . InputImage
205205 {
@@ -213,7 +213,7 @@ private async Task Generate()
213213
214214 var schedulerOptions = SchedulerOptions . ToSchedulerOptions ( ) ;
215215 schedulerOptions . Strength = 1 ; // Make sure strength is 1 for Image Inpainting
216- var resultImage = await ExecuteStableDiffusion ( _selectedModel . ModelOptions , promptOptions , schedulerOptions ) ;
216+ var resultImage = await ExecuteStableDiffusion ( _selectedModel . ModelOptions , promptOptions , schedulerOptions ) ;
217217 if ( resultImage != null )
218218 {
219219 ResultImage = resultImage ;
@@ -233,9 +233,9 @@ private async Task Generate()
233233 /// </returns>
234234 private bool CanExecuteGenerate ( )
235235 {
236- return ! IsGenerating
237- && ! string . IsNullOrEmpty ( PromptOptions . Prompt )
238- && HasInputResult
236+ return ! IsGenerating
237+ && ! string . IsNullOrEmpty ( PromptOptions . Prompt )
238+ && HasInputResult
239239 && HasInputMaskResult ;
240240 }
241241
@@ -322,6 +322,7 @@ private async Task<ImageResult> ExecuteStableDiffusion(IModelOptions modelOption
322322 Model = _selectedModel ,
323323 Prompt = promptOptions . Prompt ,
324324 NegativePrompt = promptOptions . NegativePrompt ,
325+ PipelineType = _selectedModel . ModelOptions . PipelineType ,
325326 DiffuserType = promptOptions . DiffuserType ,
326327 SchedulerType = promptOptions . SchedulerType ,
327328 SchedulerOptions = schedulerOptions ,
0 commit comments