diff --git a/modules/advanced_parameters.py b/modules/advanced_parameters.py index 3f8d51b9..13920c32 100644 --- a/modules/advanced_parameters.py +++ b/modules/advanced_parameters.py @@ -1,18 +1,18 @@ -debugging_cn_preprocessor, skipping_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, \ +skipping_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, \ refiner_swap_method, \ freeu_enabled, freeu_b1, freeu_b2, freeu_s1, freeu_s2, \ debugging_inpaint_preprocessor, inpaint_disable_initial_latent, inpaint_engine, inpaint_strength, inpaint_respective_field, \ - inpaint_mask_upload_checkbox, invert_mask_checkbox, inpaint_erode_or_dilate = [None] * 19 + inpaint_mask_upload_checkbox, invert_mask_checkbox, inpaint_erode_or_dilate = [None] * 18 def set_all_advanced_parameters(*args): - global debugging_cn_preprocessor, skipping_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, \ + global skipping_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, \ refiner_swap_method, \ freeu_enabled, freeu_b1, freeu_b2, freeu_s1, freeu_s2, \ debugging_inpaint_preprocessor, inpaint_disable_initial_latent, inpaint_engine, inpaint_strength, inpaint_respective_field, \ inpaint_mask_upload_checkbox, invert_mask_checkbox, inpaint_erode_or_dilate - debugging_cn_preprocessor, skipping_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, \ + skipping_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, \ refiner_swap_method, \ freeu_enabled, freeu_b1, freeu_b2, freeu_s1, freeu_s2, \ debugging_inpaint_preprocessor, inpaint_disable_initial_latent, inpaint_engine, inpaint_strength, inpaint_respective_field, \ diff --git a/modules/async_worker.py b/modules/async_worker.py index c05e6fbd..0645210c 100644 --- a/modules/async_worker.py +++ b/modules/async_worker.py @@ -152,6 +152,7 @@ def worker(): overwrite_upscale_strength = args.pop() mixing_image_prompt_and_vary_upscale = args.pop() mixing_image_prompt_and_inpaint = args.pop() + debugging_cn_preprocessor = args.pop() cn_tasks = {x: [] for x in flags.ip_list} for _ in range(4): @@ -648,7 +649,7 @@ def worker(): cn_img = HWC3(cn_img) task[0] = core.numpy_to_pytorch(cn_img) - if advanced_parameters.debugging_cn_preprocessor: + if debugging_cn_preprocessor: yield_result(async_task, cn_img, do_not_show_finished_images=True) return for task in cn_tasks[flags.cn_cpds]: @@ -660,7 +661,7 @@ def worker(): cn_img = HWC3(cn_img) task[0] = core.numpy_to_pytorch(cn_img) - if advanced_parameters.debugging_cn_preprocessor: + if debugging_cn_preprocessor: yield_result(async_task, cn_img, do_not_show_finished_images=True) return for task in cn_tasks[flags.cn_ip]: @@ -671,7 +672,7 @@ def worker(): cn_img = resize_image(cn_img, width=224, height=224, resize_mode=0) task[0] = ip_adapter.preprocess(cn_img, ip_adapter_path=ip_adapter_path) - if advanced_parameters.debugging_cn_preprocessor: + if debugging_cn_preprocessor: yield_result(async_task, cn_img, do_not_show_finished_images=True) return for task in cn_tasks[flags.cn_ip_face]: @@ -685,7 +686,7 @@ def worker(): cn_img = resize_image(cn_img, width=224, height=224, resize_mode=0) task[0] = ip_adapter.preprocess(cn_img, ip_adapter_path=ip_adapter_face_path) - if advanced_parameters.debugging_cn_preprocessor: + if debugging_cn_preprocessor: yield_result(async_task, cn_img, do_not_show_finished_images=True) return diff --git a/webui.py b/webui.py index 000ee9fc..a4d6b49f 100644 --- a/webui.py +++ b/webui.py @@ -446,7 +446,7 @@ with shared.gradio_root: freeu_s2 = gr.Slider(label='S2', minimum=0, maximum=4, step=0.01, value=0.95) freeu_ctrls = [freeu_enabled, freeu_b1, freeu_b2, freeu_s1, freeu_s2] - adps = [debugging_cn_preprocessor, skipping_cn_preprocessor, controlnet_softness, + adps = [skipping_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, refiner_swap_method] adps += freeu_ctrls adps += inpaint_ctrls @@ -529,6 +529,7 @@ with shared.gradio_root: ctrls += [sampler_name, scheduler_name] ctrls += [overwrite_step, overwrite_switch, overwrite_width, overwrite_height, overwrite_vary_strength] ctrls += [overwrite_upscale_strength, mixing_image_prompt_and_vary_upscale, mixing_image_prompt_and_inpaint] + ctrls += [debugging_cn_preprocessor] ctrls += ip_ctrls state_is_generating = gr.State(False)