From 4d93f48f090e19a81d1608837e8e6449045601a8 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Thu, 10 Aug 2023 15:32:54 +0300 Subject: [PATCH] fix for multiple input accordions --- modules/ui_components.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui_components.py b/modules/ui_components.py index 9df9ddf40..bfe2fbd97 100644 --- a/modules/ui_components.py +++ b/modules/ui_components.py @@ -84,8 +84,8 @@ class InputAccordion(gr.Checkbox): def __init__(self, value, **kwargs): self.accordion_id = kwargs.get('elem_id') if self.accordion_id is None: - self.accordion_id = f"input-accordion-{self.global_index}" - self.global_index += 1 + self.accordion_id = f"input-accordion-{InputAccordion.global_index}" + InputAccordion.global_index += 1 kwargs['elem_id'] = self.accordion_id + "-checkbox" kwargs['visible'] = False