Clear sampler before decoding images

More significant VRAM reduction.
This commit is contained in:
catboxanon 2023-08-13 04:40:34 -04:00
parent da80d649fd
commit 69f49c8d39
1 changed files with 3 additions and 0 deletions

View File

@ -1192,6 +1192,9 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
sd_models.apply_token_merging(self.sd_model, self.get_token_merging_ratio())
self.sampler = None
devices.torch_gc()
decoded_samples = decode_latent_batch(self.sd_model, samples, target_device=devices.cpu, check_for_nans=True)
self.is_hr_pass = False