diff options
author | InvincibleDude <81354513+InvincibleDude@users.noreply.github.com> | 2023-03-14 13:55:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 13:55:59 +0000 |
commit | f5e44364535ccc7efef445dacb6395c3942f2f17 (patch) | |
tree | ca7384e6225fccdae1e89db1e0ccc44dd60c7311 /modules/processing.py | |
parent | f6e27378404631d951656388fc178b784fe1495b (diff) | |
parent | a9fed7c364061ae6efb37f797b6b522cb3cf7aa2 (diff) | |
download | stable-diffusion-webui-gfx803-f5e44364535ccc7efef445dacb6395c3942f2f17.tar.gz stable-diffusion-webui-gfx803-f5e44364535ccc7efef445dacb6395c3942f2f17.tar.bz2 stable-diffusion-webui-gfx803-f5e44364535ccc7efef445dacb6395c3942f2f17.zip |
Merge branch 'master' into improved-hr-conflict-test
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/processing.py b/modules/processing.py index 694e2637..0a46174c 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -597,6 +597,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: if state.job_count == -1:
state.job_count = p.n_iter
+ extra_network_data = None
for n in range(p.n_iter):
p.iteration = n
@@ -620,6 +621,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: seeds = p.all_seeds[n * p.batch_size:(n + 1) * p.batch_size]
subseeds = p.all_subseeds[n * p.batch_size:(n + 1) * p.batch_size]
+ if p.scripts is not None:
+ p.scripts.before_process_batch(p, batch_number=n, prompts=prompts, seeds=seeds, subseeds=subseeds)
+
if len(prompts) == 0:
break
@@ -753,7 +757,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: if opts.grid_save:
images.save_image(grid, p.outpath_grids, "grid", p.all_seeds[0], p.all_prompts[0], opts.grid_format, info=infotext(), short_filename=not opts.grid_extended_filename, p=p, grid=True)
- if not p.disable_extra_networks:
+ if not p.disable_extra_networks and extra_network_data:
extra_networks.deactivate(p, extra_network_data)
devices.torch_gc()
@@ -944,7 +948,10 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): shared.state.nextjob()
- img2img_sampler_name = self.sampler_name if self.sampler_name != 'PLMS' else 'DDIM' # PLMS does not support img2img so we just silently switch ot DDIM
+ img2img_sampler_name = self.sampler_name
+
+ if self.sampler_name in ['PLMS', 'UniPC']: # PLMS/UniPC do not support img2img so we just silently switch to DDIM
+ img2img_sampler_name = 'DDIM'
if self.hr_sampler == '---':
pass
|