feat: count image from 1, making config keys more user friendly

This commit is contained in:
Manuel Schmid 2024-07-27 23:04:54 +02:00
parent 4a5f691b9e
commit 8cc246a51d
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
2 changed files with 2 additions and 0 deletions

View File

@ -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,

View File

@ -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)