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 @@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
6565### Fixed
6666- Fixed incorrect IPAdapter download links in the HuggingFace model browser
6767- 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
6869
6970## v2.11.5
7071### Added
Original file line number Diff line number Diff line change @@ -242,13 +242,23 @@ CancellationToken cancellationToken
242242 var buildPromptArgs = new BuildPromptEventArgs { Overrides = overrides , SeedOverride = seed } ;
243243 BuildPrompt ( buildPromptArgs ) ;
244244
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+
245252 var generationArgs = new ImageGenerationEventArgs
246253 {
247254 Client = ClientManager . Client ,
248255 Nodes = buildPromptArgs . Builder . ToNodeDictionary ( ) ,
249256 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 ,
252262 FilesToTransfer = buildPromptArgs . FilesToTransfer ,
253263 BatchIndex = i ,
254264 // Only clear output images on the first batch
You can’t perform that action at this time.
0 commit comments