From 8cc246a51d9852510b75f683cc7f4ca07ed305d9 Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Sat, 27 Jul 2024 23:04:54 +0200 Subject: [PATCH] feat: count image from 1, making config keys more user friendly --- modules/config.py | 1 + webui.py | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/config.py b/modules/config.py index 7062c005..0f2038b6 100644 --- a/modules/config.py +++ b/modules/config.py @@ -517,6 +517,7 @@ default_ip_weights = {} 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 5a2100e5..1a4fb6cf 100644 --- a/webui.py +++ b/webui.py @@ -221,6 +221,7 @@ with shared.gradio_root: 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)