Commit dca121e9 authored by AUTOMATIC1111's avatar AUTOMATIC1111

set the field to None instead

parent 0af4127f
...@@ -1076,13 +1076,13 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): ...@@ -1076,13 +1076,13 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
current = shared.sd_model.sd_checkpoint_info current = shared.sd_model.sd_checkpoint_info
try: try:
if self.hr_checkpoint_info is not None: if self.hr_checkpoint_info is not None:
del self.sampler self.sampler = None
sd_models.reload_model_weights(info=self.hr_checkpoint_info) sd_models.reload_model_weights(info=self.hr_checkpoint_info)
devices.torch_gc() devices.torch_gc()
return self.sample_hr_pass(samples, decoded_samples, seeds, subseeds, subseed_strength, prompts) return self.sample_hr_pass(samples, decoded_samples, seeds, subseeds, subseed_strength, prompts)
finally: finally:
del self.sampler self.sampler = None
sd_models.reload_model_weights(info=current) sd_models.reload_model_weights(info=current)
devices.torch_gc() devices.torch_gc()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment