Skip to content

Commit

Permalink
Merge pull request LykosAI#508 from ionite34/backport/main/pr-507
Browse files Browse the repository at this point in the history
[main] Merge pull request LykosAI#507 from ionite34/fix-inference-denoise
  • Loading branch information
ionite34 authored Feb 7, 2024
2 parents 9bd67b1 + c6ae44c commit 3b76534
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,6 @@ IModelIndexService modelIndexService
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 />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -77,6 +83,7 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo
private bool isSchedulerSelectionEnabled;

[ObservableProperty]
[NotifyPropertyChangedFor(nameof(IsDenoiseStrengthTempEnabled))]
[Required]
private ComfyScheduler? selectedScheduler = ComfyScheduler.Normal;

Expand Down

0 comments on commit 3b76534

Please sign in to comment.