aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-08-30 15:22:50 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2023-08-30 15:24:21 +0000
commit87cca029d7133b4060650b8ec33fc6772cc2f7dd (patch)
treeb98333882015bef22507cd840ca3723a1058aede /modules/processing.py
parent1ac11b3dae49568fc0b3ae6afe6627196a0a001e (diff)
downloadstable-diffusion-webui-gfx803-87cca029d7133b4060650b8ec33fc6772cc2f7dd.tar.gz
stable-diffusion-webui-gfx803-87cca029d7133b4060650b8ec33fc6772cc2f7dd.tar.bz2
stable-diffusion-webui-gfx803-87cca029d7133b4060650b8ec33fc6772cc2f7dd.zip
add an option to choose how to combine hires fix and refiner
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/modules/processing.py b/modules/processing.py
index 0138e5ac..f696e925 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -1148,18 +1148,12 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
else:
decoded_samples = None
- current = shared.sd_model.sd_checkpoint_info
- try:
- if self.hr_checkpoint_info is not None:
- 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:
- self.sampler = None
- sd_models.reload_model_weights(info=current)
- devices.torch_gc()
+ with sd_models.SkipWritingToConfig():
+ 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)
def sample_hr_pass(self, samples, decoded_samples, seeds, subseeds, subseed_strength, prompts):
if shared.state.interrupted: