From d40072fd9e343966da91df328040408440cb52e6 Mon Sep 17 00:00:00 2001 From: Ionite Date: Wed, 9 Aug 2023 17:25:54 -0400 Subject: [PATCH] Add Dimension enable toggle to SamplerCardViewModel --- .../Models/Inference/SamplerCardModel.cs | 4 +--- .../Inference/InferenceTextToImageViewModel.cs | 13 ++++++++++++- .../ViewModels/Inference/SamplerCardViewModel.cs | 14 +++----------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/StabilityMatrix.Avalonia/Models/Inference/SamplerCardModel.cs b/StabilityMatrix.Avalonia/Models/Inference/SamplerCardModel.cs index 7008b721..107efbe3 100644 --- a/StabilityMatrix.Avalonia/Models/Inference/SamplerCardModel.cs +++ b/StabilityMatrix.Avalonia/Models/Inference/SamplerCardModel.cs @@ -13,12 +13,10 @@ public class SamplerCardModel public bool IsCfgScaleEnabled { get; init; } = true; public double CfgScale { get; init; } - public bool IsScaleSizeMode { get; init; } + public bool IsDimensionsEnabled { get; init; } public int Width { get; init; } public int Height { get; init; } - public double Scale { get; init; } - public bool IsSamplerSelectionEnabled { get; init; } = true; public string? SelectedSampler { get; init; } } diff --git a/StabilityMatrix.Avalonia/ViewModels/Inference/InferenceTextToImageViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Inference/InferenceTextToImageViewModel.cs index aaf4a637..553a7ddc 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Inference/InferenceTextToImageViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Inference/InferenceTextToImageViewModel.cs @@ -83,7 +83,18 @@ public partial class InferenceTextToImageViewModel ConfigCardViewModel = vmFactory.Get().WithCards(new ViewModelBase[] { - vmFactory.Get() + vmFactory.Get(), + vmFactory.Get().WithCards(new ViewModelBase[] + { + vmFactory.Get(), + vmFactory.Get(vm => + { + vm.IsScaleSizeMode = true; + vm.IsCfgScaleEnabled = false; + vm.IsSamplerSelectionEnabled = false; + vm.IsDenoiseStrengthEnabled = true; + }), + }) }); } diff --git a/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs index 54f8fcfb..f1150032 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs @@ -20,16 +20,10 @@ public partial class SamplerCardViewModel : ViewModelBase, ILoadableState