Browse Source

Merge pull request #508 from ionite34/backport/main/pr-507

[main] Merge pull request #507 from ionite34/fix-inference-denoise
pull/447/head
Ionite 9 months ago committed by GitHub
parent
commit
3b7653488a
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/), 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). 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 ## v2.8.1
### Fixed ### Fixed
- Fixed model links not working in RuinedFooocus for new installations - Fixed model links not working in RuinedFooocus for new installations

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

@ -123,7 +123,13 @@
<StackPanel> <StackPanel>
<!-- Denoise Strength --> <!-- 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"> <Grid ColumnDefinitions="*,Auto">
<TextBlock <TextBlock
VerticalAlignment="Center" VerticalAlignment="Center"

2
StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj

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

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

@ -114,14 +114,6 @@ public class InferenceTextToImageViewModel : InferenceGenerationViewModelBase, I
SamplerCardViewModel.IsRefinerStepsEnabled = SamplerCardViewModel.IsRefinerStepsEnabled =
e.Sender is { IsRefinerSelectionEnabled: true, SelectedRefiner: not null }; 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 /> /// <inheritdoc />

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

@ -42,6 +42,12 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo
[ObservableProperty] [ObservableProperty]
private bool isDenoiseStrengthEnabled; 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] [ObservableProperty]
private double denoiseStrength = 0.7f; private double denoiseStrength = 0.7f;
@ -77,6 +83,7 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo
private bool isSchedulerSelectionEnabled; private bool isSchedulerSelectionEnabled;
[ObservableProperty] [ObservableProperty]
[NotifyPropertyChangedFor(nameof(IsDenoiseStrengthTempEnabled))]
[Required] [Required]
private ComfyScheduler? selectedScheduler = ComfyScheduler.Normal; private ComfyScheduler? selectedScheduler = ComfyScheduler.Normal;

Loading…
Cancel
Save