fix: close Processing object after generation

This commit is contained in:
Bingsu
2023-07-03 00:51:09 +09:00
parent b4c4176a11
commit 63a06db094
2 changed files with 5 additions and 0 deletions

View File

@@ -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)

View File

@@ -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