diff options
author | invincibledude <> | 2023-01-29 16:16:17 +0000 |
---|---|---|
committer | invincibledude <> | 2023-01-29 16:16:17 +0000 |
commit | 9beeef6267ecbcb16f8b24e0092194f0f00142a6 (patch) | |
tree | eb7809a3abef2b7182c42fb4a473a77507482356 /modules/processing.py | |
parent | 6127d2ff1bc5c3bc81d876e6dbc9a60f79aec898 (diff) | |
download | stable-diffusion-webui-gfx803-9beeef6267ecbcb16f8b24e0092194f0f00142a6.tar.gz stable-diffusion-webui-gfx803-9beeef6267ecbcb16f8b24e0092194f0f00142a6.tar.bz2 stable-diffusion-webui-gfx803-9beeef6267ecbcb16f8b24e0092194f0f00142a6.zip |
Extra networks loading fix
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/modules/processing.py b/modules/processing.py index a56915c5..98e83c69 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -558,6 +558,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: if type(p) == StableDiffusionProcessingTxt2Img:
if p.enable_hr and p.hr_prompt != '':
_, hr_extra_network_data = extra_networks.parse_prompts(p.all_hr_prompts[0:1])
+ extra_network_data.update(hr_extra_network_data)
if p.scripts is not None:
@@ -598,11 +599,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: sd_vae_approx.model()
if not p.disable_extra_networks:
- if type(p) == StableDiffusionProcessingTxt2Img:
- if p.enable_hr and p.hr_prompt != '':
- extra_networks.activate(p, extra_network_data | hr_extra_network_data)
- else:
- extra_networks.activate(p, extra_network_data)
+ extra_networks.activate(p, extra_network_data)
with open(os.path.join(paths.data_path, "params.txt"), "w", encoding="utf8") as file:
processed = Processed(p, [], p.seed, "")
@@ -753,11 +750,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: 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 type(p) == StableDiffusionProcessingTxt2Img:
- if p.enable_hr and p.hr_prompt != '':
- extra_networks.deactivate(p, extra_network_data | hr_extra_network_data)
- else:
- extra_networks.deactivate(p, extra_network_data)
+ extra_networks.deactivate(p, extra_network_data)
devices.torch_gc()
|