|
|
@ -20,16 +20,10 @@ public partial class SamplerCardViewModel : ViewModelBase, ILoadableState<Sample |
|
|
|
[ObservableProperty] private bool isCfgScaleEnabled = true; |
|
|
|
[ObservableProperty] private bool isCfgScaleEnabled = true; |
|
|
|
[ObservableProperty] private double cfgScale = 7; |
|
|
|
[ObservableProperty] private double cfgScale = 7; |
|
|
|
|
|
|
|
|
|
|
|
// Switch between the 2 size modes |
|
|
|
[ObservableProperty] private bool isDimensionsEnabled; |
|
|
|
[ObservableProperty] private bool isScaleSizeMode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Absolute size mode |
|
|
|
|
|
|
|
[ObservableProperty] private int width = 512; |
|
|
|
[ObservableProperty] private int width = 512; |
|
|
|
[ObservableProperty] private int height = 512; |
|
|
|
[ObservableProperty] private int height = 512; |
|
|
|
|
|
|
|
|
|
|
|
// Scale size mode |
|
|
|
|
|
|
|
[ObservableProperty] private double scale = 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ObservableProperty] private bool isSamplerSelectionEnabled = true; |
|
|
|
[ObservableProperty] private bool isSamplerSelectionEnabled = true; |
|
|
|
|
|
|
|
|
|
|
|
[ObservableProperty, Required] |
|
|
|
[ObservableProperty, Required] |
|
|
@ -50,10 +44,9 @@ public partial class SamplerCardViewModel : ViewModelBase, ILoadableState<Sample |
|
|
|
DenoiseStrength = state.DenoiseStrength; |
|
|
|
DenoiseStrength = state.DenoiseStrength; |
|
|
|
IsCfgScaleEnabled = state.IsCfgScaleEnabled; |
|
|
|
IsCfgScaleEnabled = state.IsCfgScaleEnabled; |
|
|
|
CfgScale = state.CfgScale; |
|
|
|
CfgScale = state.CfgScale; |
|
|
|
IsScaleSizeMode = state.IsScaleSizeMode; |
|
|
|
IsDimensionsEnabled = state.IsDimensionsEnabled; |
|
|
|
Width = state.Width; |
|
|
|
Width = state.Width; |
|
|
|
Height = state.Height; |
|
|
|
Height = state.Height; |
|
|
|
Scale = state.Scale; |
|
|
|
|
|
|
|
IsSamplerSelectionEnabled = state.IsSamplerSelectionEnabled; |
|
|
|
IsSamplerSelectionEnabled = state.IsSamplerSelectionEnabled; |
|
|
|
SelectedSampler = state.SelectedSampler is null ? null |
|
|
|
SelectedSampler = state.SelectedSampler is null ? null |
|
|
|
: new ComfySampler(state.SelectedSampler); |
|
|
|
: new ComfySampler(state.SelectedSampler); |
|
|
@ -69,10 +62,9 @@ public partial class SamplerCardViewModel : ViewModelBase, ILoadableState<Sample |
|
|
|
DenoiseStrength = DenoiseStrength, |
|
|
|
DenoiseStrength = DenoiseStrength, |
|
|
|
IsCfgScaleEnabled = IsCfgScaleEnabled, |
|
|
|
IsCfgScaleEnabled = IsCfgScaleEnabled, |
|
|
|
CfgScale = CfgScale, |
|
|
|
CfgScale = CfgScale, |
|
|
|
IsScaleSizeMode = IsScaleSizeMode, |
|
|
|
IsDimensionsEnabled = IsDimensionsEnabled, |
|
|
|
Width = Width, |
|
|
|
Width = Width, |
|
|
|
Height = Height, |
|
|
|
Height = Height, |
|
|
|
Scale = Scale, |
|
|
|
|
|
|
|
IsSamplerSelectionEnabled = IsSamplerSelectionEnabled, |
|
|
|
IsSamplerSelectionEnabled = IsSamplerSelectionEnabled, |
|
|
|
SelectedSampler = SelectedSampler?.Name |
|
|
|
SelectedSampler = SelectedSampler?.Name |
|
|
|
}; |
|
|
|
}; |
|
|
|