Skip to content

Commit

Permalink
set the field to None instead
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Jul 31, 2023
1 parent 0af4127 commit dca121e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,13 +1076,13 @@ def sample(self, conditioning, unconditional_conditioning, seeds, subseeds, subs
current = shared.sd_model.sd_checkpoint_info
try:
if self.hr_checkpoint_info is not None:
del self.sampler
self.sampler = None
sd_models.reload_model_weights(info=self.hr_checkpoint_info)
devices.torch_gc()

return self.sample_hr_pass(samples, decoded_samples, seeds, subseeds, subseed_strength, prompts)
finally:
del self.sampler
self.sampler = None
sd_models.reload_model_weights(info=current)
devices.torch_gc()

Expand Down

0 comments on commit dca121e

Please sign in to comment.