From 9747eb0d04a60224fe4e22d7dc26765ae489d41d Mon Sep 17 00:00:00 2001 From: Ionite Date: Sun, 15 Oct 2023 20:06:21 -0400 Subject: [PATCH] Add more metadata for design view --- .../DesignData/MockImageIndexService.cs | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/StabilityMatrix.Avalonia/DesignData/MockImageIndexService.cs b/StabilityMatrix.Avalonia/DesignData/MockImageIndexService.cs index 50c52e81..d6538b55 100644 --- a/StabilityMatrix.Avalonia/DesignData/MockImageIndexService.cs +++ b/StabilityMatrix.Avalonia/DesignData/MockImageIndexService.cs @@ -28,26 +28,27 @@ public class MockImageIndexService : IImageIndexService return RefreshIndex(InferenceImages); } + private static LocalImageFile GetSampleImage(string url) + { + return new LocalImageFile + { + AbsolutePath = url, + GenerationParameters = GenerationParameters.GetSample(), + ImageSize = new System.Drawing.Size(1024, 1024) + }; + } + /// public Task RefreshIndex(IndexCollection indexCollection) { - var toAdd = new LocalImageFile[] + var toAdd = new[] { - new() - { - AbsolutePath = - "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/4a7e00a7-6f18-42d4-87c0-10e792df2640/width=1152", - }, - new() - { - AbsolutePath = - "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/a318ac1f-3ad0-48ac-98cc-79126febcc17/width=1024" - }, - new() - { - AbsolutePath = - "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/16588c94-6595-4be9-8806-d7e6e22d198c/width=1152" - } + GetSampleImage( + "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/a318ac1f-3ad0-48ac-98cc-79126febcc17/width=1024" + ), + GetSampleImage( + "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/16588c94-6595-4be9-8806-d7e6e22d198c/width=1152" + ) }; indexCollection.ItemsSource.EditDiff(toAdd, LocalImageFile.Comparer);