Skip to content

fix ui-config for InputAccordion [custom_script_source]#15231

Merged
AUTOMATIC1111 merged 1 commit intoAUTOMATIC1111:devfrom
light-and-ray:fix_ui-config_for_InputAccordion
Mar 16, 2024
Merged

fix ui-config for InputAccordion [custom_script_source]#15231
AUTOMATIC1111 merged 1 commit intoAUTOMATIC1111:devfrom
light-and-ray:fix_ui-config_for_InputAccordion

Conversation

@light-and-ray
Copy link
Copy Markdown
Contributor

@light-and-ray light-and-ray commented Mar 12, 2024

Description

If InputAccordion is under script's ui, its value is loaded from non custom script path. But when default is changed, it saves by custom script path, and wont be loaded next time. Also it's not happened with invisible checkbox, and the InputAccordion works as disabled dispite visual checkbox is on

Also i've fixed this condition:

if isinstance(obj, gr.Accordion) and isinstance(x, InputAccordion) and field == 'value':
  field = 'open'
  • It's always false because obj can't be gr.Accordion and InputAccordion at the same time.
  • InputAccordion is a child of gr.Checkbox and doesn't have open field

Checklist:

@AUTOMATIC1111
Copy link
Copy Markdown
Owner

I agree with custom_script_source change, but the condition is right - obj and x are not the same thing.

@light-and-ray light-and-ray force-pushed the fix_ui-config_for_InputAccordion branch from 1cdd36a to cc8ea32 Compare March 16, 2024 08:32
@light-and-ray
Copy link
Copy Markdown
Contributor Author

My bad. Fixed

@AUTOMATIC1111 AUTOMATIC1111 merged commit e8613db into AUTOMATIC1111:dev Mar 16, 2024
@light-and-ray light-and-ray deleted the fix_ui-config_for_InputAccordion branch March 17, 2024 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants