diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-21 20:40:13 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-21 21:02:51 +0000 |
commit | 78f59a4e014d090bce7df3b218bfbcd7f11e0894 (patch) | |
tree | 093fbf72f28c3e3998955b5537b483b66bbccdce /modules/processing.py | |
parent | 216f67ec7cdec45bcfa9db40aa6bcac480e3637e (diff) | |
download | stable-diffusion-webui-gfx803-78f59a4e014d090bce7df3b218bfbcd7f11e0894.tar.gz stable-diffusion-webui-gfx803-78f59a4e014d090bce7df3b218bfbcd7f11e0894.tar.bz2 stable-diffusion-webui-gfx803-78f59a4e014d090bce7df3b218bfbcd7f11e0894.zip |
enable compact view for train tab
prevent previews from ruining hypernetwork training
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/processing.py b/modules/processing.py index 6e6371a1..bc541e2f 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -140,6 +140,7 @@ class StableDiffusionProcessing: self.override_settings = {k: v for k, v in (override_settings or {}).items() if k not in shared.restricted_opts}
self.override_settings_restore_afterwards = override_settings_restore_afterwards
self.is_using_inpainting_conditioning = False
+ self.disable_extra_networks = False
if not seed_enable_extras:
self.subseed = -1
@@ -567,7 +568,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: with devices.autocast():
p.init(p.all_prompts, p.all_seeds, p.all_subseeds)
- extra_networks.activate(p, extra_network_data)
+ if not p.disable_extra_networks:
+ extra_networks.activate(p, extra_network_data)
with open(os.path.join(shared.script_path, "params.txt"), "w", encoding="utf8") as file:
processed = Processed(p, [], p.seed, "")
@@ -684,7 +686,9 @@ 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)
- extra_networks.deactivate(p, extra_network_data)
+ if not p.disable_extra_networks:
+ extra_networks.deactivate(p, extra_network_data)
+
devices.torch_gc()
res = Processed(p, output_images, p.all_seeds[0], infotext(), comments="".join(["\n\n" + x for x in comments]), subseed=p.all_subseeds[0], index_of_first_image=index_of_first_image, infotexts=infotexts)
|