This repository was archived by the owner on Nov 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +6
-29
lines changed
OnnxStack.StableDiffusion Expand file tree Collapse file tree 4 files changed +6
-29
lines changed Original file line number Diff line number Diff line change 11using Microsoft . ML . OnnxRuntime . Tensors ;
2- using OnnxStack . StableDiffusion . Enums ;
32using OnnxStack . StableDiffusion . Schedulers ;
43using System ;
54using System . Collections . Generic ;
@@ -8,11 +7,6 @@ namespace OnnxStack.StableDiffusion.Common
87{
98 public interface IScheduler : IDisposable
109 {
11- /// <summary>
12- /// Gets the compatible pipeline
13- /// </summary>
14- DiffuserPipelineType PipelineType { get ; }
15-
1610 /// <summary>
1711 /// Gets the initial noise sigma.
1812 /// </summary>
Original file line number Diff line number Diff line change 11using Microsoft . ML . OnnxRuntime ;
2- using NumSharp ;
32using OnnxStack . StableDiffusion . Config ;
43using OnnxStack . StableDiffusion . Enums ;
54
65using System ;
76using System . Linq ;
8- using System . Numerics ;
9- using System . Threading . Tasks ;
107
118namespace OnnxStack . StableDiffusion
129{
@@ -102,20 +99,19 @@ public static SchedulerType[] GetSchedulerTypes(this DiffuserPipelineType pipeli
10299 {
103100 return pipelineType switch
104101 {
105- DiffuserPipelineType . StableDiffusion => new [ ]
102+ DiffuserPipelineType . LatentConsistency => new [ ]
103+ {
104+ SchedulerType . LCM
105+ } ,
106+ _ => new [ ]
106107 {
107108 SchedulerType . LMS ,
108109 SchedulerType . Euler ,
109110 SchedulerType . EulerAncestral ,
110111 SchedulerType . DDPM ,
111112 SchedulerType . DDIM ,
112113 SchedulerType . KDPM2
113- } ,
114- DiffuserPipelineType . LatentConsistency => new [ ]
115- {
116- SchedulerType . LCM
117- } ,
118- _ => default
114+ }
119115 } ;
120116 }
121117
Original file line number Diff line number Diff line change 11using Microsoft . ML . OnnxRuntime . Tensors ;
2- using NumSharp ;
32using OnnxStack . Core ;
43using OnnxStack . StableDiffusion . Config ;
54using OnnxStack . StableDiffusion . Enums ;
65using OnnxStack . StableDiffusion . Helpers ;
76using System ;
87using System . Collections . Generic ;
98using System . Linq ;
10- using System . Net ;
119
1210namespace OnnxStack . StableDiffusion . Schedulers . LatentConsistency
1311{
@@ -30,12 +28,6 @@ public LCMScheduler() : this(new SchedulerOptions()) { }
3028 public LCMScheduler ( SchedulerOptions options ) : base ( options ) { }
3129
3230
33- /// <summary>
34- /// Gets the compatible pipeline.
35- /// </summary>
36- public override DiffuserPipelineType PipelineType => DiffuserPipelineType . LatentConsistency ;
37-
38-
3931 /// <summary>
4032 /// Initializes this instance.
4133 /// </summary>
Original file line number Diff line number Diff line change @@ -50,11 +50,6 @@ public SchedulerBase(SchedulerOptions schedulerOptions)
5050 /// </summary>
5151 public IReadOnlyList < int > Timesteps => _timesteps ;
5252
53- /// <summary>
54- /// Gets the compatible pipeline.
55- /// </summary>
56- public virtual DiffuserPipelineType PipelineType => DiffuserPipelineType . StableDiffusion ;
57-
5853 /// <summary>
5954 /// Scales the input.
6055 /// </summary>
You can’t perform that action at this time.
0 commit comments