diff --git a/modules/config.py b/modules/config.py index 7062c0056..0f2038b61 100644 --- a/modules/config.py +++ b/modules/config.py @@ -517,6 +517,7 @@ def init_temp_path(path: str | None, default_path: str) -> str: default_ip_types = {} for image_count in range(default_controlnet_image_count): + image_count += 1 default_ip_images[image_count] = get_config_item_or_set_default( key=f'default_ip_image_{image_count}', default_value=None, diff --git a/webui.py b/webui.py index 5a2100e5c..1a4fb6cf7 100644 --- a/webui.py +++ b/webui.py @@ -221,6 +221,7 @@ def skip_clicked(currentTask): ip_ctrls = [] ip_ad_cols = [] for image_count in range(modules.config.default_controlnet_image_count): + image_count += 1 with gr.Column(): ip_image = grh.Image(label='Image', source='upload', type='numpy', show_label=False, height=300, value=modules.config.default_ip_images[image_count]) ip_images.append(ip_image)