mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-07 11:00:43 -08:00
Release processing resources after it finishes
This commit is contained in:
parent
61af311f29
commit
c9148b2312
3 changed files with 8 additions and 3 deletions
|
|
@ -202,6 +202,10 @@ class StableDiffusionProcessing():
|
|||
def sample(self, conditioning, unconditional_conditioning, seeds, subseeds, subseed_strength):
|
||||
raise NotImplementedError()
|
||||
|
||||
def close(self):
|
||||
self.sd_model = None
|
||||
self.sampler = None
|
||||
|
||||
|
||||
class Processed:
|
||||
def __init__(self, p: StableDiffusionProcessing, images_list, seed=-1, info="", subseed=None, all_prompts=None, all_seeds=None, all_subseeds=None, index_of_first_image=0, infotexts=None):
|
||||
|
|
@ -597,9 +601,6 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
|
|||
if p.scripts is not None:
|
||||
p.scripts.postprocess(p, res)
|
||||
|
||||
p.sd_model = None
|
||||
p.sampler = None
|
||||
|
||||
return res
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue