@@ -45,7 +45,7 @@ public interface IStableDiffusionService
4545 /// <param name="progressCallback">The callback used to provide progess of the current InferenceSteps.</param>
4646 /// <param name="cancellationToken">The cancellation token.</param>
4747 /// <returns>The diffusion result as <see cref="DenseTensor<float>"/></returns>
48- Task < DenseTensor < float > > GenerateAsync ( StableDiffusionModelSet model , PromptOptions prompt , SchedulerOptions options , Action < int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
48+ Task < DenseTensor < float > > GenerateAsync ( StableDiffusionModelSet model , PromptOptions prompt , SchedulerOptions options , Action < DiffusionProgress > progressCallback = null , CancellationToken cancellationToken = default ) ;
4949
5050 /// <summary>
5151 /// Generates the StableDiffusion image using the prompt and options provided.
@@ -55,7 +55,7 @@ public interface IStableDiffusionService
5555 /// <param name="progressCallback">The callback used to provide progess of the current InferenceSteps.</param>
5656 /// <param name="cancellationToken">The cancellation token.</param>
5757 /// <returns>The diffusion result as <see cref="SixLabors.ImageSharp.Image<Rgba32>"/></returns>
58- Task < Image < Rgba32 > > GenerateAsImageAsync ( StableDiffusionModelSet model , PromptOptions prompt , SchedulerOptions options , Action < int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
58+ Task < Image < Rgba32 > > GenerateAsImageAsync ( StableDiffusionModelSet model , PromptOptions prompt , SchedulerOptions options , Action < DiffusionProgress > progressCallback = null , CancellationToken cancellationToken = default ) ;
5959
6060 /// <summary>
6161 /// Generates the StableDiffusion image using the prompt and options provided.
@@ -65,7 +65,7 @@ public interface IStableDiffusionService
6565 /// <param name="progressCallback">The callback used to provide progess of the current InferenceSteps.</param>
6666 /// <param name="cancellationToken">The cancellation token.</param>
6767 /// <returns>The diffusion result as <see cref="byte[]"/></returns>
68- Task < byte [ ] > GenerateAsBytesAsync ( StableDiffusionModelSet model , PromptOptions prompt , SchedulerOptions options , Action < int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
68+ Task < byte [ ] > GenerateAsBytesAsync ( StableDiffusionModelSet model , PromptOptions prompt , SchedulerOptions options , Action < DiffusionProgress > progressCallback = null , CancellationToken cancellationToken = default ) ;
6969
7070 /// <summary>
7171 /// Generates the StableDiffusion image using the prompt and options provided.
@@ -75,7 +75,7 @@ public interface IStableDiffusionService
7575 /// <param name="progressCallback">The callback used to provide progess of the current InferenceSteps.</param>
7676 /// <param name="cancellationToken">The cancellation token.</param>
7777 /// <returns>The diffusion result as <see cref="System.IO.Stream"/></returns>
78- Task < Stream > GenerateAsStreamAsync ( StableDiffusionModelSet model , PromptOptions prompt , SchedulerOptions options , Action < int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
78+ Task < Stream > GenerateAsStreamAsync ( StableDiffusionModelSet model , PromptOptions prompt , SchedulerOptions options , Action < DiffusionProgress > progressCallback = null , CancellationToken cancellationToken = default ) ;
7979
8080 /// <summary>
8181 /// Generates a batch of StableDiffusion image using the prompt and options provided.
@@ -87,7 +87,7 @@ public interface IStableDiffusionService
8787 /// <param name="progressCallback">The progress callback.</param>
8888 /// <param name="cancellationToken">The cancellation token.</param>
8989 /// <returns></returns>
90- IAsyncEnumerable < BatchResult > GenerateBatchAsync ( StableDiffusionModelSet model , PromptOptions promptOptions , SchedulerOptions schedulerOptions , BatchOptions batchOptions , Action < int , int , int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
90+ IAsyncEnumerable < BatchResult > GenerateBatchAsync ( StableDiffusionModelSet model , PromptOptions promptOptions , SchedulerOptions schedulerOptions , BatchOptions batchOptions , Action < DiffusionProgress > progressCallback = null , CancellationToken cancellationToken = default ) ;
9191
9292 /// <summary>
9393 /// Generates a batch of StableDiffusion image using the prompt and options provided.
@@ -99,7 +99,7 @@ public interface IStableDiffusionService
9999 /// <param name="progressCallback">The progress callback.</param>
100100 /// <param name="cancellationToken">The cancellation token.</param>
101101 /// <returns></returns>
102- IAsyncEnumerable < Image < Rgba32 > > GenerateBatchAsImageAsync ( StableDiffusionModelSet model , PromptOptions promptOptions , SchedulerOptions schedulerOptions , BatchOptions batchOptions , Action < int , int , int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
102+ IAsyncEnumerable < Image < Rgba32 > > GenerateBatchAsImageAsync ( StableDiffusionModelSet model , PromptOptions promptOptions , SchedulerOptions schedulerOptions , BatchOptions batchOptions , Action < DiffusionProgress > progressCallback = null , CancellationToken cancellationToken = default ) ;
103103
104104 /// <summary>
105105 /// Generates a batch of StableDiffusion image using the prompt and options provided.
@@ -111,7 +111,7 @@ public interface IStableDiffusionService
111111 /// <param name="progressCallback">The progress callback.</param>
112112 /// <param name="cancellationToken">The cancellation token.</param>
113113 /// <returns></returns>
114- IAsyncEnumerable < byte [ ] > GenerateBatchAsBytesAsync ( StableDiffusionModelSet model , PromptOptions promptOptions , SchedulerOptions schedulerOptions , BatchOptions batchOptions , Action < int , int , int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
114+ IAsyncEnumerable < byte [ ] > GenerateBatchAsBytesAsync ( StableDiffusionModelSet model , PromptOptions promptOptions , SchedulerOptions schedulerOptions , BatchOptions batchOptions , Action < DiffusionProgress > progressCallback = null , CancellationToken cancellationToken = default ) ;
115115
116116 /// <summary>
117117 /// Generates a batch of StableDiffusion image using the prompt and options provided.
@@ -123,6 +123,6 @@ public interface IStableDiffusionService
123123 /// <param name="progressCallback">The progress callback.</param>
124124 /// <param name="cancellationToken">The cancellation token.</param>
125125 /// <returns></returns>
126- IAsyncEnumerable < Stream > GenerateBatchAsStreamAsync ( StableDiffusionModelSet model , PromptOptions promptOptions , SchedulerOptions schedulerOptions , BatchOptions batchOptions , Action < int , int , int , int > progressCallback = null , CancellationToken cancellationToken = default ) ;
126+ IAsyncEnumerable < Stream > GenerateBatchAsStreamAsync ( StableDiffusionModelSet model , PromptOptions promptOptions , SchedulerOptions schedulerOptions , BatchOptions batchOptions , Action < DiffusionProgress > progressCallback = null , CancellationToken cancellationToken = default ) ;
127127 }
128128}
0 commit comments