From edd446098129e84a17028a3598d9c8f70dfdd767 Mon Sep 17 00:00:00 2001 From: Ionite Date: Wed, 31 Jan 2024 21:05:35 -0500 Subject: [PATCH] Fix controlnet missing image error --- CHANGELOG.md | 4 ++++ .../ViewModels/Inference/Modules/ControlNetModule.cs | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c57469cf..e0366be7 100644 --- a/CHANGELOG.md +++ b/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.0-pre.5 +### Fixed +- Fixed error when ControlNet module image paths are not found, even if the module is disabled + ## v2.8.0-pre.4 ### Added - Added Recommended Models dialog after one-click installer diff --git a/StabilityMatrix.Avalonia/ViewModels/Inference/Modules/ControlNetModule.cs b/StabilityMatrix.Avalonia/ViewModels/Inference/Modules/ControlNetModule.cs index 5f8c6c51..23260daf 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Inference/Modules/ControlNetModule.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Inference/Modules/ControlNetModule.cs @@ -24,7 +24,11 @@ public class ControlNetModule : ModuleBase protected override IEnumerable GetInputImages() { - if (GetCard().SelectImageCardViewModel.ImageSource is { } image) + if ( + IsEnabled + && GetCard().SelectImageCardViewModel + is { ImageSource: { } image, IsImageFileNotFound: false } + ) { yield return image; }