diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-04 11:23:22 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-04 11:23:22 +0000 |
commit | 61652461242951966e5b4cee83ce359cefa91c17 (patch) | |
tree | c836daf1780e531866d43944dee9d033da03a22c /modules/processing.py | |
parent | 6c6ae28bf5fd1e8bc3e8f64a3430b6f29f338f77 (diff) | |
download | stable-diffusion-webui-gfx803-61652461242951966e5b4cee83ce359cefa91c17.tar.gz stable-diffusion-webui-gfx803-61652461242951966e5b4cee83ce359cefa91c17.tar.bz2 stable-diffusion-webui-gfx803-61652461242951966e5b4cee83ce359cefa91c17.zip |
support interrupting after the previous change
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py index 9cbecdd8..6f5599c7 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -361,7 +361,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed: shared.state.job = f"Batch {n+1} out of {p.n_iter}"
with devices.autocast():
- samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength).to(devices.dtype)
+ samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength)
if state.interrupted:
@@ -369,6 +369,8 @@ def process_images(p: StableDiffusionProcessing) -> Processed: # use the image collected previously in sampler loop
samples_ddim = shared.state.current_latent
+ samples_ddim = samples_ddim.to(devices.dtype)
+
x_samples_ddim = p.sd_model.decode_first_stage(samples_ddim)
x_samples_ddim = torch.clamp((x_samples_ddim + 1.0) / 2.0, min=0.0, max=1.0)
|