@@ -45,7 +45,7 @@ public interface IStableDiffusionService
45
45
/// <param name="progressCallback">The callback used to provide progess of the current InferenceSteps.</param>
46
46
/// <param name="cancellationToken">The cancellation token.</param>
47
47
/// <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 ) ;
49
49
50
50
/// <summary>
51
51
/// Generates the StableDiffusion image using the prompt and options provided.
@@ -55,7 +55,7 @@ public interface IStableDiffusionService
55
55
/// <param name="progressCallback">The callback used to provide progess of the current InferenceSteps.</param>
56
56
/// <param name="cancellationToken">The cancellation token.</param>
57
57
/// <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 ) ;
59
59
60
60
/// <summary>
61
61
/// Generates the StableDiffusion image using the prompt and options provided.
@@ -65,7 +65,7 @@ public interface IStableDiffusionService
65
65
/// <param name="progressCallback">The callback used to provide progess of the current InferenceSteps.</param>
66
66
/// <param name="cancellationToken">The cancellation token.</param>
67
67
/// <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 ) ;
69
69
70
70
/// <summary>
71
71
/// Generates the StableDiffusion image using the prompt and options provided.
@@ -75,7 +75,7 @@ public interface IStableDiffusionService
75
75
/// <param name="progressCallback">The callback used to provide progess of the current InferenceSteps.</param>
76
76
/// <param name="cancellationToken">The cancellation token.</param>
77
77
/// <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 ) ;
79
79
80
80
/// <summary>
81
81
/// Generates a batch of StableDiffusion image using the prompt and options provided.
@@ -87,7 +87,7 @@ public interface IStableDiffusionService
87
87
/// <param name="progressCallback">The progress callback.</param>
88
88
/// <param name="cancellationToken">The cancellation token.</param>
89
89
/// <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 ) ;
91
91
92
92
/// <summary>
93
93
/// Generates a batch of StableDiffusion image using the prompt and options provided.
@@ -99,7 +99,7 @@ public interface IStableDiffusionService
99
99
/// <param name="progressCallback">The progress callback.</param>
100
100
/// <param name="cancellationToken">The cancellation token.</param>
101
101
/// <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 ) ;
103
103
104
104
/// <summary>
105
105
/// Generates a batch of StableDiffusion image using the prompt and options provided.
@@ -111,7 +111,7 @@ public interface IStableDiffusionService
111
111
/// <param name="progressCallback">The progress callback.</param>
112
112
/// <param name="cancellationToken">The cancellation token.</param>
113
113
/// <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 ) ;
115
115
116
116
/// <summary>
117
117
/// Generates a batch of StableDiffusion image using the prompt and options provided.
@@ -123,6 +123,6 @@ public interface IStableDiffusionService
123
123
/// <param name="progressCallback">The progress callback.</param>
124
124
/// <param name="cancellationToken">The cancellation token.</param>
125
125
/// <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 ) ;
127
127
}
128
128
}
0 commit comments