From f761927e03d10819a9149b6f42faa31b8c218209 Mon Sep 17 00:00:00 2001 From: Ionite Date: Mon, 4 Dec 2023 21:43:22 -0500 Subject: [PATCH] Fix hires overrides --- .../ViewModels/Inference/Modules/ModuleBase.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/StabilityMatrix.Avalonia/ViewModels/Inference/Modules/ModuleBase.cs b/StabilityMatrix.Avalonia/ViewModels/Inference/Modules/ModuleBase.cs index d8323406..3b38b0f6 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Inference/Modules/ModuleBase.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Inference/Modules/ModuleBase.cs @@ -20,9 +20,17 @@ public abstract class ModuleBase : StackExpanderViewModel, IComfyStep, IInputIma /// public void ApplyStep(ModuleApplyStepEventArgs e) { - if ( - (e.IsEnabledOverrides.TryGetValue(GetType(), out var isEnabledOverride) && !isEnabledOverride) || !IsEnabled - ) + if (e.IsEnabledOverrides.TryGetValue(GetType(), out var isEnabledOverride)) + { + if (isEnabledOverride) + { + OnApplyStep(e); + } + + return; + } + + if (!IsEnabled) { return; }