From 9d0be13cfee7499c76eed721345726566b1d6f4e Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Wed, 15 May 2024 19:43:23 +0900 Subject: [PATCH] fix don't remove all call back --- scripts/detail_daemon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/detail_daemon.py b/scripts/detail_daemon.py index bd17037..b71bdbe 100644 --- a/scripts/detail_daemon.py +++ b/scripts/detail_daemon.py @@ -8,7 +8,7 @@ matplotlib.use('Agg') import matplotlib.pyplot as plt import modules.scripts as scripts -from modules.script_callbacks import on_cfg_denoiser, remove_current_script_callbacks, on_infotext_pasted +from modules.script_callbacks import on_cfg_denoiser, remove_callbacks_for_function, on_infotext_pasted from modules.ui_components import InputAccordion @@ -107,13 +107,13 @@ class Script(scripts.Script): else: if hasattr(self, 'callback_added'): - remove_current_script_callbacks() + remove_callbacks_for_function(self.denoiser_callback) delattr(self, 'callback_added') # tqdm.write('\033[90mINFO: Detail Daemon callback removed\033[0m') def postprocess(self, p, processed, *args): if hasattr(self, 'callback_added'): - remove_current_script_callbacks() + remove_callbacks_for_function(self.denoiser_callback) delattr(self, 'callback_added') # tqdm.write('\033[90mINFO: Detail Daemon callback removed\033[0m')