Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ui-config for InputAccordion [custom_script_source] #15231

Conversation

light-and-ray
Copy link
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
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
Contributor Author

My bad. Fixed

@AUTOMATIC1111 AUTOMATIC1111 merged commit e8613db into AUTOMATIC1111:dev Mar 16, 2024
3 checks passed
@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