@@ -73,7 +73,7 @@ public DiffuserBase(IOnnxModelService onnxModelService, IPromptService promptSer
7373 /// <param name="scheduler">The scheduler.</param>
7474 /// <param name="timesteps">The timesteps.</param>
7575 /// <returns></returns>
76- protected abstract Task < DenseTensor < float > > PrepareLatents ( IModelOptions model , PromptOptions prompt , SchedulerOptions options , IScheduler scheduler , IReadOnlyList < int > timesteps ) ;
76+ protected abstract Task < DenseTensor < float > > PrepareLatentsAsync ( IModelOptions model , PromptOptions prompt , SchedulerOptions options , IScheduler scheduler , IReadOnlyList < int > timesteps ) ;
7777
7878
7979 /// <summary>
@@ -87,7 +87,7 @@ public DiffuserBase(IOnnxModelService onnxModelService, IPromptService promptSer
8787 /// <param name="progressCallback">The progress callback.</param>
8888 /// <param name="cancellationToken">The cancellation token.</param>
8989 /// <returns></returns>
90- protected abstract Task < DenseTensor < float > > SchedulerStep ( IModelOptions modelOptions , PromptOptions promptOptions , SchedulerOptions schedulerOptions , DenseTensor < float > promptEmbeddings , bool performGuidance , Action < int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
90+ protected abstract Task < DenseTensor < float > > SchedulerStepAsync ( IModelOptions modelOptions , PromptOptions promptOptions , SchedulerOptions schedulerOptions , DenseTensor < float > promptEmbeddings , bool performGuidance , Action < int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
9191
9292
9393 /// <summary>
@@ -113,7 +113,7 @@ public virtual async Task<DenseTensor<float>> DiffuseAsync(IModelOptions modelOp
113113 var promptEmbeddings = await _promptService . CreatePromptAsync ( modelOptions , promptOptions , performGuidance ) ;
114114
115115 // Run Scheduler steps
116- var schedulerResult = await SchedulerStep ( modelOptions , promptOptions , schedulerOptions , promptEmbeddings , performGuidance , progressCallback , cancellationToken ) ;
116+ var schedulerResult = await SchedulerStepAsync ( modelOptions , promptOptions , schedulerOptions , promptEmbeddings , performGuidance , progressCallback , cancellationToken ) ;
117117
118118 _logger ? . LogEnd ( $ "End", diffuseTime ) ;
119119
@@ -153,7 +153,7 @@ public virtual async IAsyncEnumerable<BatchResult> DiffuseBatchAsync(IModelOptio
153153 var schedulerCallback = ( int step , int steps ) => progressCallback ? . Invoke ( batchIndex , batchSchedulerOptions . Count , step , steps ) ;
154154 foreach ( var batchSchedulerOption in batchSchedulerOptions )
155155 {
156- yield return new BatchResult ( batchSchedulerOption , await SchedulerStep ( modelOptions , promptOptions , batchSchedulerOption , promptEmbeddings , performGuidance , schedulerCallback , cancellationToken ) ) ;
156+ yield return new BatchResult ( batchSchedulerOption , await SchedulerStepAsync ( modelOptions , promptOptions , batchSchedulerOption , promptEmbeddings , performGuidance , schedulerCallback , cancellationToken ) ) ;
157157 batchIndex ++ ;
158158 }
159159
@@ -203,7 +203,7 @@ protected virtual DenseTensor<float> PerformGuidance(DenseTensor<float> noisePre
203203 /// <param name="options">The options.</param>
204204 /// <param name="latents">The latents.</param>
205205 /// <returns></returns>
206- protected virtual async Task < DenseTensor < float > > DecodeLatents ( IModelOptions model , PromptOptions prompt , SchedulerOptions options , DenseTensor < float > latents )
206+ protected virtual async Task < DenseTensor < float > > DecodeLatentsAsync ( IModelOptions model , PromptOptions prompt , SchedulerOptions options , DenseTensor < float > latents )
207207 {
208208 var timestamp = _logger ? . LogBegin ( "Begin..." ) ;
209209
0 commit comments