diff --git a/scripts/!adetailer.py b/scripts/!adetailer.py index 6d1f8b9..3fdf4bb 100644 --- a/scripts/!adetailer.py +++ b/scripts/!adetailer.py @@ -557,6 +557,8 @@ class AfterDetailerScript(scripts.Script): msg = f"[-] ADetailer: 'NansException' occurred with {ordinal(n + 1)} settings.\n{e}" print(msg, file=sys.stderr) continue + finally: + p2.close() self.compare_prompt(p2, processed, n=n) p2 = copy(i2i) diff --git a/sd_webui/processing.py b/sd_webui/processing.py index fb9999c..c7d3a31 100644 --- a/sd_webui/processing.py +++ b/sd_webui/processing.py @@ -65,6 +65,9 @@ if TYPE_CHECKING: iteration: int = 1 is_hr_pass: bool = False + def close(self) -> None: + pass + @dataclass class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): sampler: Callable | None = None