Browse Source

Merge pull request #507 from ionite34/fix-inference-denoise

Fix Inference Image to Image Denoise setting becoming hidden after changing schedulers
pull/495/head
Ionite 9 months ago committed by GitHub
parent
commit
14c47a7175
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 8
      StabilityMatrix.Avalonia/Controls/Inference/SamplerCard.axaml
  3. 2
      StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
  4. 8
      StabilityMatrix.Avalonia/ViewModels/Inference/InferenceTextToImageViewModel.cs
  5. 7
      StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs

4
CHANGELOG.md

@ -5,6 +5,10 @@ All notable changes to Stability Matrix will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
## v2.8.2
### Fixed
- Fixed Inference Image to Image Denoise setting becoming hidden after changing schedulers
## v2.8.1
### Fixed
- Fixed model links not working in RuinedFooocus for new installations

8
StabilityMatrix.Avalonia/Controls/Inference/SamplerCard.axaml

@ -123,7 +123,13 @@
<StackPanel>
<!-- Denoise Strength -->
<StackPanel IsVisible="{Binding IsDenoiseStrengthEnabled}">
<StackPanel>
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.Or}">
<Binding Path="IsDenoiseStrengthEnabled"/>
<Binding Path="IsDenoiseStrengthTempEnabled"/>
</MultiBinding>
</StackPanel.IsVisible>
<Grid ColumnDefinitions="*,Auto">
<TextBlock
VerticalAlignment="Center"

2
StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj

@ -17,7 +17,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<ApplicationIcon>./Assets/Icon.ico</ApplicationIcon>
<Version>2.8.0-dev.999</Version>
<Version>2.9.0-dev.999</Version>
<InformationalVersion>$(Version)</InformationalVersion>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

8
StabilityMatrix.Avalonia/ViewModels/Inference/InferenceTextToImageViewModel.cs

@ -114,14 +114,6 @@ public class InferenceTextToImageViewModel : InferenceGenerationViewModelBase, I
SamplerCardViewModel.IsRefinerStepsEnabled =
e.Sender is { IsRefinerSelectionEnabled: true, SelectedRefiner: not null };
});
SamplerCardViewModel
.WhenPropertyChanged(x => x.SelectedScheduler)
.Subscribe(e =>
{
e.Sender.IsDenoiseStrengthEnabled =
e.Sender.SelectedScheduler?.DisplayName.Equals("SD Turbo") ?? false;
});
}
/// <inheritdoc />

7
StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs

@ -42,6 +42,12 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo
[ObservableProperty]
private bool isDenoiseStrengthEnabled;
/// <summary>
/// Temporary enable for denoise strength, used for SDTurbo.
/// Denoise will be enabled if either this or <see cref="IsDenoiseStrengthEnabled"/> is true.
/// </summary>
public bool IsDenoiseStrengthTempEnabled => SelectedScheduler == ComfyScheduler.SDTurbo;
[ObservableProperty]
private double denoiseStrength = 0.7f;
@ -77,6 +83,7 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo
private bool isSchedulerSelectionEnabled;
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(IsDenoiseStrengthTempEnabled))]
[Required]
private ComfyScheduler? selectedScheduler = ComfyScheduler.Normal;

Loading…
Cancel
Save