File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
StabilityMatrix.Avalonia/ViewModels/Inference Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
9
9
### Fixed
10
10
- Fixed incorrect IPAdapter download links in the HuggingFace model browser
11
11
- Fixed potential memory leak of transient controls (Inference Prompt and Output Image Viewer) not being garbage collected due to event subscriptions
12
+ - Fixed Batch Count seeds not being recorded properly in Inference projects and image metadata
12
13
13
14
## v2.11.5
14
15
### Added
Original file line number Diff line number Diff line change @@ -214,13 +214,23 @@ CancellationToken cancellationToken
214
214
var buildPromptArgs = new BuildPromptEventArgs { Overrides = overrides , SeedOverride = seed } ;
215
215
BuildPrompt ( buildPromptArgs ) ;
216
216
217
+ // update seed in project for batches
218
+ var inferenceProject = InferenceProjectDocument . FromLoadable ( this ) ;
219
+ if ( inferenceProject . State ? [ "Seed" ] ? [ "Seed" ] is not null )
220
+ {
221
+ inferenceProject = inferenceProject . WithState ( x => x [ "Seed" ] [ "Seed" ] = seed ) ;
222
+ }
223
+
217
224
var generationArgs = new ImageGenerationEventArgs
218
225
{
219
226
Client = ClientManager . Client ,
220
227
Nodes = buildPromptArgs . Builder . ToNodeDictionary ( ) ,
221
228
OutputNodeNames = buildPromptArgs . Builder . Connections . OutputNodeNames . ToArray ( ) ,
222
- Parameters = SaveStateToParameters ( new GenerationParameters ( ) ) ,
223
- Project = InferenceProjectDocument . FromLoadable ( this ) ,
229
+ Parameters = SaveStateToParameters ( new GenerationParameters ( ) ) with
230
+ {
231
+ Seed = Convert . ToUInt64 ( seed )
232
+ } ,
233
+ Project = inferenceProject ,
224
234
FilesToTransfer = buildPromptArgs . FilesToTransfer ,
225
235
BatchIndex = i ,
226
236
// Only clear output images on the first batch
You can’t perform that action at this time.
0 commit comments