Extra networks loading fix
This commit is contained in:
parent
6127d2ff1b
commit
9beeef6267
@ -558,6 +558,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
|
|||||||
if type(p) == StableDiffusionProcessingTxt2Img:
|
if type(p) == StableDiffusionProcessingTxt2Img:
|
||||||
if p.enable_hr and p.hr_prompt != '':
|
if p.enable_hr and p.hr_prompt != '':
|
||||||
_, hr_extra_network_data = extra_networks.parse_prompts(p.all_hr_prompts[0:1])
|
_, 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:
|
if p.scripts is not None:
|
||||||
@ -598,10 +599,6 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
|
|||||||
sd_vae_approx.model()
|
sd_vae_approx.model()
|
||||||
|
|
||||||
if not p.disable_extra_networks:
|
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:
|
with open(os.path.join(paths.data_path, "params.txt"), "w", encoding="utf8") as file:
|
||||||
@ -753,10 +750,6 @@ 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)
|
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:
|
||||||
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()
|
devices.torch_gc()
|
||||||
|
Loading…
Reference in New Issue
Block a user