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
99### Fixed
1010- Fixed incorrect IPAdapter download links in the HuggingFace model browser
1111- 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
1213
1314## v2.11.5
1415### Added
Original file line number Diff line number Diff line change @@ -214,13 +214,23 @@ CancellationToken cancellationToken
214214 var buildPromptArgs = new BuildPromptEventArgs { Overrides = overrides , SeedOverride = seed } ;
215215 BuildPrompt ( buildPromptArgs ) ;
216216
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+
217224 var generationArgs = new ImageGenerationEventArgs
218225 {
219226 Client = ClientManager . Client ,
220227 Nodes = buildPromptArgs . Builder . ToNodeDictionary ( ) ,
221228 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 ,
224234 FilesToTransfer = buildPromptArgs . FilesToTransfer ,
225235 BatchIndex = i ,
226236 // Only clear output images on the first batch
You can’t perform that action at this time.
0 commit comments