From 7d496f4ad06b350840f6f40811a302d5e79ec133 Mon Sep 17 00:00:00 2001 From: Olivia Godone-Maresca <8977984+ogmaresca@users.noreply.github.com> Date: Wed, 2 Aug 2023 00:43:21 -0400 Subject: [PATCH] Add ControlNet model and filter to metadata (#1454) --- ui/easydiffusion/utils/save_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/easydiffusion/utils/save_utils.py b/ui/easydiffusion/utils/save_utils.py index 49743554..89dae991 100644 --- a/ui/easydiffusion/utils/save_utils.py +++ b/ui/easydiffusion/utils/save_utils.py @@ -21,6 +21,8 @@ TASK_TEXT_MAPPING = { "seed": "Seed", "use_stable_diffusion_model": "Stable Diffusion model", "clip_skip": "Clip Skip", + "use_controlnet_model": "ControlNet model", + "control_filter_to_apply": "ControlNet Filter", "use_vae_model": "VAE model", "sampler_name": "Sampler", "width": "Width", @@ -260,10 +262,12 @@ def get_printable_request(req: GenerateImageRequest, task_data: TaskData, output del metadata["lora_alpha"] if task_data.use_upscale != "latent_upscaler" and "latent_upscaler_steps" in metadata: del metadata["latent_upscaler_steps"] + if task_data.use_controlnet_model is None and "control_filter_to_apply" in metadata: + del metadata["control_filter_to_apply"] if not using_diffusers: for key in ( - x for x in ["use_lora_model", "lora_alpha", "clip_skip", "tiling", "latent_upscaler_steps"] if x in metadata + x for x in ["use_lora_model", "lora_alpha", "clip_skip", "tiling", "latent_upscaler_steps", "use_controlnet_model", "control_filter_to_apply"] if x in metadata ): del metadata[key]