@@ -22,6 +22,30 @@ public ModelFactory(OnnxStackUIConfig settings)
2222 _defaultTokenizerPath = defaultTokenizerPath ;
2323 }
2424
25+ public IEnumerable < UpscaleModelTemplate > GetUpscaleModelTemplates ( )
26+ {
27+ yield return new UpscaleModelTemplate ( "Upscale 2x" , 2 , 512 ) ;
28+ yield return new UpscaleModelTemplate ( "Upscale 4x" , 4 , 512 ) ;
29+ }
30+
31+
32+ public IEnumerable < StableDiffusionModelTemplate > GetStableDiffusionModelTemplates ( )
33+ {
34+ yield return new StableDiffusionModelTemplate ( "SD" , DiffuserPipelineType . StableDiffusion , ModelType . Base , 512 , DiffuserType . TextToImage , DiffuserType . ImageToImage , DiffuserType . ImageInpaintLegacy ) ;
35+ yield return new StableDiffusionModelTemplate ( "SD-Inpaint" , DiffuserPipelineType . StableDiffusion , ModelType . Base , 512 , DiffuserType . ImageInpaint ) ;
36+
37+ yield return new StableDiffusionModelTemplate ( "SDXL" , DiffuserPipelineType . StableDiffusionXL , ModelType . Base , 1024 , DiffuserType . TextToImage , DiffuserType . ImageToImage , DiffuserType . ImageInpaintLegacy ) ;
38+ yield return new StableDiffusionModelTemplate ( "SDXL-Inpaint" , DiffuserPipelineType . StableDiffusionXL , ModelType . Base , 1024 , DiffuserType . ImageInpaint ) ;
39+ yield return new StableDiffusionModelTemplate ( "SDXL-Refiner" , DiffuserPipelineType . StableDiffusionXL , ModelType . Refiner , 1024 , DiffuserType . ImageToImage , DiffuserType . ImageInpaintLegacy ) ;
40+ yield return new StableDiffusionModelTemplate ( "SDXL-Turbo" , DiffuserPipelineType . StableDiffusionXL , ModelType . Base , 512 , DiffuserType . TextToImage , DiffuserType . ImageToImage , DiffuserType . ImageInpaintLegacy ) ;
41+
42+ yield return new StableDiffusionModelTemplate ( "LCM" , DiffuserPipelineType . LatentConsistency , ModelType . Base , 512 , DiffuserType . TextToImage , DiffuserType . ImageToImage , DiffuserType . ImageInpaintLegacy ) ;
43+ yield return new StableDiffusionModelTemplate ( "LCM-SDXL" , DiffuserPipelineType . LatentConsistencyXL , ModelType . Base , 1024 , DiffuserType . TextToImage , DiffuserType . ImageToImage , DiffuserType . ImageInpaintLegacy ) ;
44+
45+ yield return new StableDiffusionModelTemplate ( "InstaFlow" , DiffuserPipelineType . InstaFlow , ModelType . Base , 512 , DiffuserType . TextToImage ) ;
46+ }
47+
48+
2549 public StableDiffusionModelSet CreateStableDiffusionModelSet ( string name , string folder , StableDiffusionModelTemplate modelTemplate )
2650 {
2751 var modelSet = new StableDiffusionModelSet
0 commit comments