File tree 2 files changed +13
-2
lines changed
StabilityMatrix.Avalonia/ViewModels/Inference
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
65
65
### Fixed
66
66
- Fixed incorrect IPAdapter download links in the HuggingFace model browser
67
67
- Fixed potential memory leak of transient controls (Inference Prompt and Output Image Viewer) not being garbage collected due to event subscriptions
68
+ - Fixed Batch Count seeds not being recorded properly in Inference projects and image metadata
68
69
69
70
## v2.11.5
70
71
### Added
Original file line number Diff line number Diff line change @@ -242,13 +242,23 @@ CancellationToken cancellationToken
242
242
var buildPromptArgs = new BuildPromptEventArgs { Overrides = overrides , SeedOverride = seed } ;
243
243
BuildPrompt ( buildPromptArgs ) ;
244
244
245
+ // update seed in project for batches
246
+ var inferenceProject = InferenceProjectDocument . FromLoadable ( this ) ;
247
+ if ( inferenceProject . State ? [ "Seed" ] ? [ "Seed" ] is not null )
248
+ {
249
+ inferenceProject = inferenceProject . WithState ( x => x [ "Seed" ] [ "Seed" ] = seed ) ;
250
+ }
251
+
245
252
var generationArgs = new ImageGenerationEventArgs
246
253
{
247
254
Client = ClientManager . Client ,
248
255
Nodes = buildPromptArgs . Builder . ToNodeDictionary ( ) ,
249
256
OutputNodeNames = buildPromptArgs . Builder . Connections . OutputNodeNames . ToArray ( ) ,
250
- Parameters = SaveStateToParameters ( new GenerationParameters ( ) ) ,
251
- Project = InferenceProjectDocument . FromLoadable ( this ) ,
257
+ Parameters = SaveStateToParameters ( new GenerationParameters ( ) ) with
258
+ {
259
+ Seed = Convert . ToUInt64 ( seed )
260
+ } ,
261
+ Project = inferenceProject ,
252
262
FilesToTransfer = buildPromptArgs . FilesToTransfer ,
253
263
BatchIndex = i ,
254
264
// Only clear output images on the first batch
You can’t perform that action at this time.
0 commit comments