From 1e90fc83fd6dcafe6157091012e2b78fd60c2ad9 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Mon, 29 Jan 2024 21:54:21 -0800 Subject: [PATCH] Update legacy_preprocessors.py --- .../scripts/legacy_preprocessors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions-builtin/forge_legacy_preprocessors/scripts/legacy_preprocessors.py b/extensions-builtin/forge_legacy_preprocessors/scripts/legacy_preprocessors.py index d445f47c..6f4d9fa0 100644 --- a/extensions-builtin/forge_legacy_preprocessors/scripts/legacy_preprocessors.py +++ b/extensions-builtin/forge_legacy_preprocessors/scripts/legacy_preprocessors.py @@ -98,8 +98,8 @@ class LegacyPreprocessor(Preprocessor): with context: result, is_image = self.call_function(img=input_image, res=resolution, thr_a=slider_1, thr_b=slider_2, **kwargs) - del is_image # Not used anymore - result = HWC3(result) + if is_image: + result = HWC3(result) if self.unload_function is not None: self.unload_function()